MCPcopy Create free account
hub / github.com/longld/peda / display

Method display

lib/shellcode.py:345–368  ·  view source on GitHub ↗
(self, shellcodeId)

Source from the content-addressed store, hash-verified

343 return data_dl
344
345 def display(self, shellcodeId):
346 if shellcodeId is None:
347 return None
348
349 try:
350 msg("Connecting to shell-storm.org...")
351 s = six.moves.http_client.HTTPConnection("shell-storm.org")
352 except:
353 error_msg("Cannot connect to shell-storm.org")
354 return None
355
356 try:
357 s.request("GET", "/shellcode/files/shellcode-"+str(shellcodeId)+".php")
358 res = s.getresponse()
359 data = res.read().decode('utf-8').split("<pre>")[1].split("<body>")[0]
360 except:
361 error_msg("Failed to download shellcode from shell-storm.org")
362 return None
363
364 data = data.replace("&quot;", "\"")
365 data = data.replace("&amp;", "&")
366 data = data.replace("&lt;", "<")
367 data = data.replace("&gt;", ">")
368 return data
369 #OWASP ZSC API Z3r0D4y.Com
370 def zsc(self,os,job,encode):
371 try:

Callers 1

shellcodeMethod · 0.80

Calls 1

error_msgFunction · 0.90

Tested by

no test coverage detected