ipsend.util package¶
ipsend.util.data_io module¶
- class DataInput(mode=None)¶
Bases:
object
- INPUT_BASE64 = 'BASE64'¶
- INPUT_BINARY = 'BINARY'¶
- INPUT_HEX = 'HEX'¶
- INPUT_RAW = 'NONE'¶
- INPUT_TEXT = 'TEXT'¶
- decode_base64(base64_data)¶
- decode_hex(hex_data)¶
- get_data(input_data)¶
- initialize(mode)¶
ipsend.util.raw_socket_entity module¶
- class Header¶
Bases:
abc.ABC
- class ICMPHeader¶
Bases:
ipsend.util.raw_socket_entity.Header
,ipsend.util.raw_socket_entity.ProtocolHeader
- DEFAULT_HEADER_LEN = 4¶
- class IPHeader¶
Bases:
ipsend.util.raw_socket_entity.Header
- DIRECTION_RECEIVE = 2¶
- DIRECTION_SEND = 1¶
- PROTOCOL_ICMP = 1¶
- PROTOCOL_TCP = 6¶
- PROTOCOL_UDP = 17¶
- class TCPHeader¶
Bases:
ipsend.util.raw_socket_entity.Header
,ipsend.util.raw_socket_entity.ProtocolHeader
- DEFAULT_HEADER_LEN = 20¶
- FLAG_ACK = 16¶
- FLAG_CWR = 128¶
- FLAG_ECE = 64¶
- FLAG_FIN = 1¶
- FLAG_PSH = 8¶
- FLAG_RST = 4¶
- FLAG_SYN = 2¶
- FLAG_URG = 32¶
- classmethod get_flags(codes)¶
- class UDPHeader¶
Bases:
ipsend.util.raw_socket_entity.Header
,ipsend.util.raw_socket_entity.ProtocolHeader
- DEFAULT_HEADER_LEN = 8¶
ipsend.util.raw_socket_generator module¶
- class HeaderGenerator¶
Bases:
abc.ABC
- calculate_checksum(data)¶
- create_pseudo_header(src_ip, dest_ip, protocol, total_length)¶
- generate(protocol_header, src_ip=None, dest_ip=None)¶
- class ICMPHeaderGenerator¶
Bases:
ipsend.util.raw_socket_generator.HeaderGenerator
- generate(icmp_header, src_ip=None, dest_ip=None)¶
- class TCPHeaderGenerator¶
Bases:
ipsend.util.raw_socket_generator.HeaderGenerator
- generate(tcp_header, src_ip=None, dest_ip=None)¶
- class UDPHeaderGenerator¶
Bases:
ipsend.util.raw_socket_generator.HeaderGenerator
- create_udp_header()¶
- generate(udp_header, src_ip=None, dest_ip=None)¶