MCPcopy Create free account
hub / github.com/HexHive/NASS / search_shellcode

Method search_shellcode

tools/gef.py:6764–6790  ·  view source on GitHub ↗
(self, search_options: List)

Source from the content-addressed store, hash-verified

6762 return
6763
6764 def search_shellcode(self, search_options: List) -> None:
6765 # API : http://shell-storm.org/shellcode/
6766 args = "*".join(search_options)
6767
6768 res = http_get(self.search_url + args)
6769 if res is None:
6770 err("Could not query search page")
6771 return
6772
6773 ret = gef_pystring(res)
6774
6775 # format: [author, OS/arch, cmd, id, link]
6776 lines = ret.split("\\n")
6777 refs = [line.split("::::") for line in lines]
6778
6779 if refs:
6780 info("Showing matching shellcodes")
6781 info("\t".join(["Id", "Platform", "Description"]))
6782 for ref in refs:
6783 try:
6784 _, arch, cmd, sid, _ = ref
6785 gef_print("\t".join([sid, arch, cmd]))
6786 except ValueError:
6787 continue
6788
6789 info("Use `shellcode get <id>` to fetch shellcode")
6790 return
6791
6792
6793@register

Callers 1

do_invokeMethod · 0.95

Calls 6

http_getFunction · 0.85
errFunction · 0.85
gef_pystringFunction · 0.85
infoFunction · 0.85
gef_printFunction · 0.85
joinMethod · 0.80

Tested by

no test coverage detected