scapy.autorun

Run commands when the Scapy interpreter starts.

class scapy.autorun.ScapyAutorunInterpreter(*args, **kargs)

Bases: code.InteractiveInterpreter

showsyntaxerror(*args, **kargs)
showtraceback(*args, **kargs)
exception scapy.autorun.StopAutorun

Bases: scapy.error.Scapy_Exception

code_run = ''
class scapy.autorun.StringWriter(debug=None)

Bases: object

Util to mock sys.stdout and sys.stderr, and store their output in a ‘s’ var.

flush()
write(x)
scapy.autorun.autorun_commands(cmds, my_globals=None, ignore_globals=None, verb=None)
scapy.autorun.autorun_get_ansi_interactive_session(cmds, **kargs)
scapy.autorun.autorun_get_html_interactive_session(cmds, **kargs)
scapy.autorun.autorun_get_interactive_session(cmds, **kargs)

Create an interactive session and execute the commands passed as “cmds” and return all output

Parameters

cmds – a list of commands to run

Returns

(output, returned) contains both sys.stdout and sys.stderr logs

scapy.autorun.autorun_get_latex_interactive_session(cmds, **kargs)
scapy.autorun.autorun_get_text_interactive_session(cmds, **kargs)