scapy.autorun
Run commands when the Scapy interpreter starts.
- class scapy.autorun.ScapyAutorunInterpreter(*args: Any, **kargs: Any)[源代码]
基类:
InteractiveInterpreter
- exception scapy.autorun.StopAutorunTimeout[源代码]
基类:
StopAutorun
- class scapy.autorun.StringWriter(debug: TextIO | None = None)[源代码]
基类:
StringIO
Util to mock sys.stdout and sys.stderr, and store their output in a 's' var.
- scapy.autorun.autorun_commands(_cmds: str, my_globals: Dict[str, Any] | None = None, verb: int | None = None) Any [源代码]
- scapy.autorun.autorun_commands_timeout(cmds: str, timeout: int | None = None, **kwargs: Any) Any [源代码]
Wraps autorun_commands with a timeout that raises StopAutorunTimeout on expiration.
- scapy.autorun.autorun_get_interactive_live_session(cmds: str, **kargs: Any) Tuple[str, Any] [源代码]
Create an interactive session and execute the commands passed as "cmds" and return all output
- 参数:
cmds -- a list of commands to run
timeout -- timeout in seconds
- 返回:
(output, returned) contains both sys.stdout and sys.stderr logs
- scapy.autorun.autorun_get_interactive_session(cmds: str, **kargs: Any) Tuple[str, Any] [源代码]
Create an interactive session and execute the commands passed as "cmds" and return all output
- 参数:
cmds -- a list of commands to run
timeout -- timeout in seconds
- 返回:
(output, returned) contains both sys.stdout and sys.stderr logs