scapy.error

记录子系统和基本异常类.

class scapy.error.ScapyColoredFormatter(fmt=None, datefmt=None, style='%')

Bases: logging.Formatter

logging.Formatter的一个子类,用于处理颜色.

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

Bases: logging.Filter

filter(record)
exception scapy.error.ScapyInvalidPlatformException

Bases: scapy.error.Scapy_Exception

exception scapy.error.ScapyNoDstMacException

Bases: scapy.error.Scapy_Exception

exception scapy.error.Scapy_Exception

Bases: Exception

scapy.error.warning(x, *args, **kargs)

在运行时打印警告.