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)
- static select(sockets, remain=None)
- 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(family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=0)
Bases:
object
- auxdata_available = False
- close()
- closed = 0
- desc = None
- fileno()
- nonblocking_socket = False
- recv(x=65535)
- recv_raw(x=65535)
Returns a tuple containing (cls, pkt_data, time)
- static select(sockets, remain=0.05)
This function is called during sendrecv() routine to select the available sockets.
- Parameters
sockets – an array of sockets that need to be selected
- Returns
an array of sockets that were selected and the function to be called next to get the packets (i.g. recv)
- send(x)
- sniff(*args, **kargs)
- sr(*args, **kargs)
- sr1(*args, **kargs)
- tshark(*args, **kargs)