scapy.error

Logging subsystem and basic exception class.

class scapy.error.ScapyColoredFormatter(fmt=None, datefmt=None, style='%', validate=True)[source]

Bases: logging.Formatter

A subclass of logging.Formatter that handles colors.

format(record: logging.LogRecord) str[source]
levels_colored = {'CRITICAL': 'bold+white+bg_red', 'DEBUG': 'reset', 'ERROR': 'bold+red', 'INFO': 'reset', 'WARNING': 'bold+yellow'}
class scapy.error.ScapyFreqFilter[source]

Bases: logging.Filter

filter(record: logging.LogRecord) bool[source]
exception scapy.error.ScapyInvalidPlatformException[source]

Bases: scapy.error.Scapy_Exception

exception scapy.error.ScapyNoDstMacException[source]

Bases: scapy.error.Scapy_Exception

exception scapy.error.Scapy_Exception[source]

Bases: Exception

scapy.error.warning(x: str, *args: Any, **kargs: Any) None[source]

Prints a warning during runtime.