Last active
January 21, 2018 17:28
-
-
Save itsecurityco/d11938d9835c2ab14f225baf29c13602 to your computer and use it in GitHub Desktop.
This script takes a string generated by msfvenom on bt5r3 via PIPE and will clean the raw shellcode
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# Author: @itsecurityco | |
# This script takes a string generated | |
# by msfvenom on bt5r3 via PIPE | |
# and will clean the raw shellcode | |
import sys | |
import re | |
if sys.stdin.isatty(): | |
print " usage: msfvenom [options] <var=val> | python %s" % sys.argv[0] | |
exit(0) | |
shellcode = "" | |
for line in sys.stdin: | |
shellcode += line | |
match = re.findall("x([a-z0-9]{2})", shellcode) | |
if match: | |
print "".join(match) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment