scapy.supersocket

SuperSocket.

class scapy.supersocket.L2ListenTcpdump(iface=None, promisc=None, filter=None, nofilter=False, prog=None, *arg, **karg)

Bases: scapy.supersocket.SuperSocket

close()
desc = 'read packets at layer 2 using tcpdump'
recv(x=65535)
class scapy.supersocket.L3RawSocket(type=2048, filter=None, iface=None, promisc=None, nofilter=0)

Bases: scapy.supersocket.SuperSocket

desc = 'Layer 3 using Raw sockets (PF_INET/SOCK_RAW)'
recv(x=65535)
send(x)
class scapy.supersocket.SSLStreamSocket(sock, basecls=None)

Bases: scapy.supersocket.StreamSocket

desc = 'similar usage than StreamSocket but specialized for handling SSL-wrapped sockets'
recv(x=65535)
class scapy.supersocket.SimpleSocket(sock)

Bases: scapy.supersocket.SuperSocket

desc = 'wrapper around a classic socket'
class scapy.supersocket.StreamSocket(sock, basecls=None)

Bases: scapy.supersocket.SimpleSocket

desc = 'transforms a stream socket into a layer 2'
nonblocking_socket = True
recv(x=65535)
class scapy.supersocket.SuperSocket

Bases: object

close()
closed = 0
desc = None
fileno()
nonblocking_socket = False
read_allowed_exceptions = ()
recv(x=65535)
recv_raw(x=65535)

返回一个包含(cls,pkt_data,时间)的元组

static select(sockets, remain=0.05)

在sendrecv()例程期间调用此函数以选择可用的套接字.

Parameters

套接字 –需要选择的一组套接字

Returns

一组选定的套接字以及接下来要获取数据包的函数(ig recv)

send(x)
sniff(*args, **kargs)
sr(*args, **kargs)
sr1(*args, **kargs)
tshark(*args, **kargs)
class scapy.supersocket.TunTapInterface(iface=None, mode_tun=None, *arg, **karg)

Bases: scapy.supersocket.SuperSocket

充当tun / tap接口的主机对等方的套接字.

desc = "Act as the host's peer of a tun / tap interface"
open()

打开TUN或TAP设备.

recv(x=65535)
send(x)
class scapy.supersocket.tpacket_auxdata

Bases: _ctypes.Structure

tp_len

结构/工会成员

tp_mac

结构/工会成员

tp_net

结构/工会成员

tp_padding

结构/工会成员

tp_snaplen

结构/工会成员

tp_status

结构/工会成员

tp_vlan_tci

结构/工会成员