Skip to content

Commit

Permalink
Fix shell-storm new API (#902)
Browse files Browse the repository at this point in the history
* Fix shell-storm new API

* Update gef.py

Co-authored-by: Grazfather <grazfather@gmail.com>
  • Loading branch information
JonathanSalwan and Grazfather committed Nov 8, 2022
1 parent c05d62a commit ea8273b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions gef.py
Expand Up @@ -6773,7 +6773,7 @@ class ShellcodeGetCommand(GenericCommand):
_aliases_ = ["sc-get",]

api_base = "http://shell-storm.org"
get_url = f"{api_base}/shellcode/files/shellcode-{{:d}}.php"
get_url = f"{api_base}/shellcode/files/shellcode-{{:d}}.html"

def do_invoke(self, argv: List[str]) -> None:
if len(argv) != 1:
Expand All @@ -6799,7 +6799,7 @@ def get_shellcode(self, sid: int) -> None:
ok("Downloaded, written to disk...")
tempdir = gef.config["gef.tempdir"]
fd, fname = tempfile.mkstemp(suffix=".txt", prefix="sc-", text=True, dir=tempdir)
shellcode = res.splitlines()[7:-11]
shellcode = res.split("<pre>")[1].split("</pre>")[0]
shellcode = b"\n".join(shellcode).replace(b"&quot;", b'"')
os.write(fd, shellcode)
os.close(fd)
Expand Down

0 comments on commit ea8273b

Please sign in to comment.