[GH-ISSUE #1281] Trying to update the MAC vendor list gives a 403 error. #632

Open
opened 2026-02-28 00:03:56 +03:00 by kerem · 1 comment
Owner

Originally created by @demondev on GitHub (Jul 24, 2020).
Original GitHub issue: https://github.com/SpacehuhnTech/esp8266_deauther/issues/1281

This page suggested some websites take the huff if you don't provide some fake browser info, that indeed seemed to be the problem.

I changed the first few lines of update_manf.py to read as below and it cured the problem:

import argparse
from urllib.request import urlopen, Request

WS_MANUF_FILE_URL = "https://code.wireshark.org/review/gitweb?p=wireshark.git;a=blob_plain;f=manuf"
headers = {"User-Agent": "Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2228.0 Safari/537.3"}
macs = []
vendors = []
tempVendors = []

def padhex(s):
    return '0x' + s[2:].zfill(2)

def parse_options():
    parser = argparse.ArgumentParser()
    parser.add_argument("-o", "--output", help="Output file name for macs list", required=True)
    parser.add_argument("-s", "--small", action='store_true', help="Generate small file only with most used 10 000 macs")
    parser.add_argument("-u", "--url", help="Wireshark oui/manuf file url")

    opt = parser.parse_args()

    return opt

def generate_lists(url, output, small):

    global tempVendors
    global vendors
    global macs

    if url:
        req = Request(url, headers)
        data = urlopen(req)
    else:
        req = Request(url=WS_MANUF_FILE_URL, headers=headers)
        data = urlopen(req)
Originally created by @demondev on GitHub (Jul 24, 2020). Original GitHub issue: https://github.com/SpacehuhnTech/esp8266_deauther/issues/1281 This [page](https://medium.com/@speedforcerun/python-crawler-http-error-403-forbidden-1623ae9ba0f) suggested some websites take the huff if you don't provide some fake browser info, that indeed seemed to be the problem. I changed the first few lines of update_manf.py to read as below and it cured the problem: ``` import argparse from urllib.request import urlopen, Request WS_MANUF_FILE_URL = "https://code.wireshark.org/review/gitweb?p=wireshark.git;a=blob_plain;f=manuf" headers = {"User-Agent": "Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2228.0 Safari/537.3"} macs = [] vendors = [] tempVendors = [] def padhex(s): return '0x' + s[2:].zfill(2) def parse_options(): parser = argparse.ArgumentParser() parser.add_argument("-o", "--output", help="Output file name for macs list", required=True) parser.add_argument("-s", "--small", action='store_true', help="Generate small file only with most used 10 000 macs") parser.add_argument("-u", "--url", help="Wireshark oui/manuf file url") opt = parser.parse_args() return opt def generate_lists(url, output, small): global tempVendors global vendors global macs if url: req = Request(url, headers) data = urlopen(req) else: req = Request(url=WS_MANUF_FILE_URL, headers=headers) data = urlopen(req) ```
Author
Owner

@demondev commented on GitHub (Jul 24, 2020):

Also reported here https://github.com/SpacehuhnTech/esp8266_deauther/issues/1233 although this seemed to resolve itself .

<!-- gh-comment-id:663770468 --> @demondev commented on GitHub (Jul 24, 2020): Also reported here https://github.com/SpacehuhnTech/esp8266_deauther/issues/1233 although this seemed to resolve itself .
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/esp8266_deauther#632
No description provided.