scapy.data

Global variables and functions for handling external data sets.

class scapy.data.EtherDA(_name='DADict', **kargs)[source]

Bases: scapy.dadict.DADict

class scapy.data.KnowledgeBase(filename)[source]

Bases: object

get_base()[source]
lazy_init()[source]
reload(filename=None)[source]
class scapy.data.ManufDA(_name='DADict', **kargs)[source]

Bases: scapy.dadict.DADict

ident(v)[source]
lookup(mac)[source]

Find OUI name matching to a MAC

reverse_lookup(name, case_sensitive=False)[source]

Find all MACs registered to a OUI

Parameters
  • name – the OUI name

  • case_sensitive – default to False

Returns

a dict of mac:tuples (Name, Extended Name)

scapy.data.load_ethertypes(filename)[source]

“Parse /etc/ethertypes and return values as a dictionary. If unavailable, use the copy bundled with Scapy.

scapy.data.load_manuf(filename)[source]

Loads manuf file from Wireshark.

Parameters

filename – the file to load the manuf file from

Returns

a ManufDA filled object

scapy.data.load_protocols(filename, _fallback=None, _integer_base=10, _cls=scapy.dadict.DADict[int, str])[source]

“Parse /etc/protocols and return values as a dictionary.

scapy.data.load_services(filename)[source]
scapy.data.select_path(directories, filename)[source]

Find filename among several directories