scapy.supersocket
SuperSocket.
- class scapy.supersocket.IterSocket(obj: List[Packet] | Packet | SetGen[Packet] | _PacketList[Packet])[源代码]
基类:
SuperSocket
- desc = 'wrapper around an iterable'
- nonblocking_socket: bool = True
- static select(sockets: List[SuperSocket], remain: Any = None) List[SuperSocket] [源代码]
- class scapy.supersocket.L2ListenTcpdump(iface: NetworkInterface | str | None = None, promisc: bool | None = None, filter: str | None = None, nofilter: bool = False, prog: str | None = None, *arg: Any, **karg: Any)[源代码]
基类:
SuperSocket
- desc = 'read packets at layer 2 using tcpdump'
- static select(sockets: List[SuperSocket], remain: float | None = None) List[SuperSocket] [源代码]
- class scapy.supersocket.L3RawSocket(type: int = 2048, filter: str | None = None, iface: NetworkInterface | str | None = None, promisc: bool | None = None, nofilter: int = 0)[源代码]
基类:
SuperSocket
- desc = 'Layer 3 using Raw sockets (PF_INET/SOCK_RAW)'
- class scapy.supersocket.SSLStreamSocket(sock: socket, basecls: Type[Packet] | None = None)[源代码]
基类:
StreamSocket
- desc = 'similar usage than StreamSocket but specialized for handling SSL-wrapped sockets'
- class scapy.supersocket.SimpleSocket(sock: socket)[源代码]
基类:
SuperSocket
- desc = 'wrapper around a classic socket'
- class scapy.supersocket.StreamSocket(sock: socket, basecls: Type[Packet] | None = None)[源代码]
基类:
SimpleSocket
- desc = 'transforms a stream socket into a layer 2'
- nonblocking_socket: bool = True
- class scapy.supersocket.SuperSocket(family: int = AddressFamily.AF_INET, type: int = SocketKind.SOCK_STREAM, proto: int = 0, iface: NetworkInterface | str | None = None, **kwargs: Any)[源代码]
基类:
object
- am(cls: Type[Any], *args: Any, **kwargs: Any) Any [源代码]
Creates an AnsweringMachine associated with this socket.
- 参数:
cls -- A subclass of AnsweringMachine to instantiate
- auxdata_available: bool = False
- closed: bool = False
- nonblocking_socket: bool = False
- recv_raw(x: int = 65535) Tuple[Type[Packet] | None, bytes | None, float | None] [源代码]
Returns a tuple containing (cls, pkt_data, time)
- static select(sockets: List[SuperSocket], remain: float | None = 0.05) List[SuperSocket] [源代码]
This function is called during sendrecv() routine to select the available sockets.
- 参数:
sockets -- an array of sockets that need to be selected
- 返回:
an array of sockets that were selected and the function to be called next to get the packets (i.g. recv)
- sniff(*args: Any, **kargs: Any) PacketList [源代码]
- sr(*args: Any, **kargs: Any) Tuple[SndRcvList, PacketList] [源代码]