scapy.data module

Global variables and functions for handling external data sets.

class scapy.data.KnowledgeBase(filename)

Bases: object

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

Bases: scapy.dadict.DADict

fixname(val)
lookup(mac)

Find OUI name matching to a MAC

reverse_lookup(name, case_sensitive=False)

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)

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

scapy.data.load_manuf(filename)

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)

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

scapy.data.load_services(filename)
scapy.data.select_path(directories, filename)

Find filename among several directories