Skip to content

Instantly share code, notes, and snippets.

@agentzex
Created April 14, 2021 18:36
Show Gist options
  • Save agentzex/c2359889ad0c2d96ae883e78d76c8a0d to your computer and use it in GitHub Desktop.
Save agentzex/c2359889ad0c2d96ae883e78d76c8a0d to your computer and use it in GitHub Desktop.
# Enter raw string, \x delimted shellcode
shellcode_string = r"\x31\xc0\x66\xb8\x72\x74\x50\x68\x6d"
shellcode = []
shellcode_string = shellcode_string.split('\\x')
for b in shellcode_string:
if b:
shellcode.append("0x" + b.upper())
shellcode = ", ".join(shellcode)
print("[" + shellcode + "]")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment