Skip to content

Fixed scapy imports, added scapy oui lookup and replaced depricated iwconfig with iw#1

Open
GnussonNet wants to merge 1 commit into
Ymsniper:mainfrom
GnussonNet:fixed_oui_iw_scapy
Open

Fixed scapy imports, added scapy oui lookup and replaced depricated iwconfig with iw#1
GnussonNet wants to merge 1 commit into
Ymsniper:mainfrom
GnussonNet:fixed_oui_iw_scapy

Conversation

@GnussonNet

Copy link
Copy Markdown

Hey, nice project, I made a few small improvements like fixing the scapy imports, switching to MANUFDB for OUI lookup, and replacing iwconfig with iw. Was there a reason you used a hardcoded vendor lookup or is it ok to rely on Scapy’s database?

Changes

  • Scapy imports
    • Import RadioTap, Dot11, and Dot11Deauth from scapy.layers.dot11.
    • Import MANUFDB from scapy.all.
  • OUI vendor lookup
    • Removed hardcoded _OUI dictionary.
    • Implemented vendor lookup using MANUFDB.lookup(mac) for dynamic and up-to-date OUI.
  • Channel setting
    • Replaced deprecated iwconfig with iw for setting interface channel (the new standard).

@Ymsniper

Ymsniper commented Jun 9, 2026

Copy link
Copy Markdown
Owner

Hey before i merge you need to sync your branch with main first, it's pretty behind and merging as is would overwrite a lot of new stuff

also oui_vendor still needs fixing manufdb.lookup(mac)[1] returns the MAC itself on some scapy versions when vendor isn't found, and there's no handling for randomized MACs (2A:, 72: etc) which will never be in any database

def oui_vendor(mac: str) -> str:
    try:
        if int(mac.replace(":", "")[:2], 16) & 0x02:
            return ""
    except Exception:
        return ""
    try:
        result = _manufdb.lookup(mac)
        if result is None:
            return ""
        name = result[0] or ""
        return "" if name.upper() == mac.upper() else name
    except Exception:
        return ""

sync + fix that and i'll merge

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants