Last active
December 25, 2016 18:05
-
-
Save lanuma/984e5620a3f2b9b3ccf506fd0798db70 to your computer and use it in GitHub Desktop.
3DS CTF | Results does not matter!!!
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
#!/usr/bin/python | |
import sys | |
import hashlib | |
a = 334453 | |
b = 335624 # 1010001111100001000 | |
hitung_c = a ^ b # a XOR b | |
c = hitung_c | |
d = 0x200 | |
e = 318 | |
for i in range(1000, 10000): | |
j = (( ( d | i ) ^ e ) & c) # rumusnya | |
if (j == 1337): | |
print "Found: " + str(i) | |
flag = hashlib.sha256(str(i)).hexdigest() | |
print "Flag is: 3DS{" + flag + "}" | |
sys.exit(0) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment