scapy.ansmachine

Answering machines.

class scapy.ansmachine.AnsweringMachine(**kargs)[source]

Bases: object

filter = None
function_name = ''
is_request(req)[source]
make_reply(req)[source]
parse_all_options(mode, kargs)[source]
parse_options()[source]
print_reply(req, reply)[source]
reply(pkt)[source]
run(*args, **kargs)[source]
static send_function(x, iface=None, *args, **kargs)

Send packets at layer 3

Parameters
  • x – the packets

  • inter – time (in s) between two packets (default 0)

  • loop – send packet indefinetly (default 0)

  • count – number of packets to send (default None=1)

  • verbose – verbose mode (default None=conf.verbose)

  • realtime – check that a packet was sent before sending the next one

  • return_packets – return the sent packets

  • socket – the socket to use (default is conf.L3socket(kargs))

  • iface – the interface to send the packets on

  • monitor – (not on linux) send in monitor mode

Returns

None

send_options = {'verbose': 0}
send_options_list = ['iface', 'inter', 'loop', 'verbose', 'socket']
send_reply(reply)[source]
sniff()[source]
sniff_options = {'store': 0}
sniff_options_list = ['store', 'iface', 'count', 'promisc', 'filter', 'type', 'prn', 'stop_filter', 'opened_socket']
class scapy.ansmachine.ReferenceAM(name, bases, dct)[source]

Bases: type