lanscan icon indicating copy to clipboard operation
lanscan copied to clipboard

Cannot find vendors

Open newza-fullmetal opened this issue 6 years ago • 1 comments

Hi !!

I am using lanscan for the first time. I passed the installations steps with success. I am scanning my local wi-fi network. I get all the informations excepts the vendors. why ? And I also noticed that sometimes some connected devices are not seen by the scan.

Thank you for your help

Newza

newza-fullmetal avatar Jun 22 '18 14:06 newza-fullmetal

`

I ran into the same issue. It seems that macvendorlookup.com API is down for more than a year.. I fixed it by edititing the file (on Linux systems) /usr/local/lib/python3.5/dist-packages/lanscan/lanscan.py

Look for function get_vendor(mac), put some remarks (#) in front of the 2 buggy lines and add the correct url and return. It should look similar to this:

def get_vendor(mac):
    try:
        # url = 'http://www.macvendorlookup.com/api/v2/' + mac
        # return requests.get(url).json()[0]['company']
        url = 'https://macvendors.co/api/' + mac
        return requests.get(url).json()['result']['company']

Hope this helps....

piMyHome avatar Feb 15 '19 14:02 piMyHome