Skip to content

Instantly share code, notes, and snippets.

@lanuma
Last active December 25, 2016 18:05
Show Gist options
  • Save lanuma/984e5620a3f2b9b3ccf506fd0798db70 to your computer and use it in GitHub Desktop.
Save lanuma/984e5620a3f2b9b3ccf506fd0798db70 to your computer and use it in GitHub Desktop.
3DS CTF | Results does not matter!!!
#!/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