Created
November 13, 2016 11:41
-
-
Save lionaneesh/c777ed8e7d9257f4f997961b2bfbb8fb to your computer and use it in GitHub Desktop.
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/env python | |
from z3 import * | |
s = Solver() | |
ret = BitVecVal(0, 32) | |
seed = BitVec('seed', 32) | |
ret = 25214903917 * seed + 11 | |
ret = ret & 0xFFFFFFFFFFFF | |
s.add(ret == 1364650861) # 1364650861, 1208101748 | |
if s.check() == sat: | |
model = s.model() | |
print model[seed] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment