MCPcopy Create free account
hub / github.com/secdev/scapy / autorun_get_html_interactive_session

Function autorun_get_html_interactive_session

scapy/autorun.py:238–255  ·  view source on GitHub ↗
(cmds, **kargs)

Source from the content-addressed store, hash-verified

236
237
238def autorun_get_html_interactive_session(cmds, **kargs):
239 # type: (str, **Any) -> Tuple[str, Any]
240 ct = conf.color_theme
241
242 def to_html(s):
243 # type: (str) -> str
244 return s.replace("<", "&lt;").replace(">", "&gt;").replace("#[#", "<").replace("#]#", ">") # noqa: E501
245 try:
246 try:
247 conf.color_theme = HTMLTheme2()
248 s, res = autorun_get_interactive_session(cmds, **kargs)
249 except StopAutorun as e:
250 e.code_run = to_html(e.code_run)
251 raise
252 finally:
253 conf.color_theme = ct
254
255 return to_html(s), res
256
257
258def autorun_get_latex_interactive_session(cmds, **kargs):

Callers

nothing calls this directly

Calls 3

HTMLTheme2Class · 0.90
to_htmlFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…