Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion nmap_oui_update.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Comment on lines +100 to +101
Comment on lines +100 to +101

if res.status_code == 200 and "(base 16)" in res.text:
with open(dst, 'wt', encoding='utf-8') as fil:
fil.write(res.text)
Expand Down
Loading