MCPcopy Create free account
hub / github.com/chasingboy/Xtools / run

Method run

xtools.py:432–453  ·  view source on GitHub ↗
(self, edit, tool, mode)

Source from the content-addressed store, hash-verified

430# Format tools result
431class FormatToolsResultCommand(sublime_plugin.TextCommand):
432 def run(self, edit, tool, mode):
433 text = get_buffer_text(self.view)
434
435 if tool == 'fscan':
436 results = classify_fscan_result(text)
437 for key in results.keys():
438 syntax = SYNTAX_FILE if key in ['web-info.txt','weak-password.txt'] else ''
439 new_view(self.view, edit, results.get(key), syntax=syntax, filename=key)
440
441 return None
442
443 if tool == 'nmap':
444 try:
445 text = format_nmap_open_port(text, mode)
446 except:
447 text = select_nmap_ports_from_xml(text, mode)
448
449 new_view(self.view, edit, text)
450
451 if tool == 'dirsx':
452 text = format_dirsx_result(text)
453 new_view(self.view, edit, text, SYNTAX_FILE)
454
455
456# highlight httpx nulcie result

Callers

nothing calls this directly

Calls 6

get_buffer_textFunction · 0.85
classify_fscan_resultFunction · 0.85
new_viewFunction · 0.85
format_nmap_open_portFunction · 0.85
format_dirsx_resultFunction · 0.85

Tested by

no test coverage detected