Last active
May 25, 2018 06:27
-
-
Save k3170makan/7f55d25869f3f812f8c3706089c0a74c to your computer and use it in GitHub Desktop.
Simple tool script for building memory corruption payloads for exploit development
This file contains 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
import struct | |
import sys | |
def encode(byte="41_41_41_41"): | |
return struct.pack("<I",int(byte.replace("_",""),16)) | |
if __name__=="__main__": | |
payload = "" | |
for idx,arg in enumerate(sys.argv[1:]): | |
payload += encode(arg.split("-")[0])*int(arg.split("-")[1]) | |
print payload | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment