Skip to content

Instantly share code, notes, and snippets.

@numanturle

numanturle/solve

Created Feb 10, 2020
Embed
What would you like to do?
import base64, json, os, random, re, subprocess, time, xml.sax
from io import StringIO
def setup(seed):
global state
state = 0
for i in range(16):
cur = seed & 3
seed >>= 2
state = (state << 4) | ((state & 3) ^ cur)
state |= cur << 2
def next(bits):
global state
ret = 0
for i in range(bits):
ret <<= 1
ret |= state & 1
state = (state << 1) ^ (state >> 61)
state &= 0xFFFFFFFFFFFFFFFF
state ^= 0xFFFFFFFFFFFFFFFF
for j in range(0, 64, 4):
cur = (state >> j) & 0xF
cur = (cur >> 3) | ((cur >> 2) & 2) | ((cur << 3) & 8) | ((cur << 2) & 4)
state ^= cur << j
return ret
i = 1
ilk_uret = 54733963
ikinci_uret = 61211058
state = 1
while i:
uret = next(26)
if(uret == ilk_uret):
print("ILK DEGERI URETTIM! I = "+str(i))
break
else:
print(str(i)+ "URET = "+str(uret)+ "PASS\n")
i = i + 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.