scapy.autorun

Run commands when the Scapy interpreter starts.

class scapy.autorun.ScapyAutorunInterpreter(*args, **kargs)[source]

Bases: code.InteractiveInterpreter

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

Bases: scapy.error.Scapy_Exception

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

Bases: object

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

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

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_interactive_session(cmds, **kargs)[source]

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)[source]
scapy.autorun.autorun_get_live_interactive_session(cmds, **kargs)[source]
scapy.autorun.autorun_get_text_interactive_session(cmds, **kargs)[source]