Last active
February 22, 2017 22:20
-
-
Save Grazfather/d1b0b679989f1e8c7fdd236f388ba4f3 to your computer and use it in GitHub Desktop.
BSsidesSF CTF 2017 "delphi-status" crypto 250
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
# From BsidesSF CTF 2017 | |
import itertools | |
import requests | |
import sys | |
from binascii import hexlify, unhexlify | |
uh = unhexlify | |
h = hexlify | |
ct = uh("928afe4ffecdea9ed22847dcd2d47d674921a12fbdc42d3150d30e13b65d36b46677f7735d09b572b4df1ce68100bf8893fb4c919f6cddda087691132873b93de0d2cac3ff374d7f8db3524dbf91655b0111b05883c16f5e23a898e923174dd05f7ef949dc3bdd145c698c907c4a411d") | |
host = "http://delphi-status-e606c556.ctf.bsidessf.net" | |
r = requests.get("{}/execute/{}".format(host, h(ct).decode())) | |
print(r.content) | |
print(h(r.content)) | |
def xorstring(s1, s2): | |
return bytes([(a ^ b) for a, b in zip(s1, s2)]) | |
ct = uh("fe9b534deb6fba8c33d22ebe0cdfa53ebc108fd1b6f649d93ee5b1ba0ee80c39") | |
iv = ct[:5] | |
iv = xorstring(b"netst", iv) | |
iv = xorstring(b"pg *;", iv) | |
ct = iv + ct[5:] | |
print(len(ct)) | |
r = requests.get("{}/execute/{}".format(host, h(ct).decode())) | |
print(r.content) | |
print(h(r.content)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment