diff --git a/nmap_oui_update.py b/nmap_oui_update.py index db7170a..19b8d61 100644 --- a/nmap_oui_update.py +++ b/nmap_oui_update.py @@ -97,7 +97,9 @@ def download_ieee_oui_file() -> bool: """ Downloads the OUI data from the IEEE """ print_info("Downloading latest copy of OUI data from IEEE...") dst = os.path.join(get_root_program_path(), OUI_DATA) - res = requests.get(IEEE_URL) + headers = {"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36"} + res = requests.get(IEEE_URL, headers=headers) + if res.status_code == 200 and "(base 16)" in res.text: with open(dst, 'wt', encoding='utf-8') as fil: fil.write(res.text)