From de4f5964d7a3c03aa800eff0674eef5e79c57b26 Mon Sep 17 00:00:00 2001 From: Cyberistic Date: Mon, 16 Mar 2026 10:58:39 +0300 Subject: [PATCH] Include User-Agent header in OUI data download Added User-Agent header to the request for OUI data. --- nmap_oui_update.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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)