z3 training
This commit is contained in:
@@ -1,9 +1,8 @@
|
||||
import os
|
||||
import struct
|
||||
|
||||
BITS = 56
|
||||
|
||||
FLAG = os.getenv("FLAG", "CSCG{TESTFLAG}")
|
||||
FLAG = os.getenv("FLAG", "CSCG{sH4r1nG_1nt3rn4l_sT4te_1s_d3adLy}")
|
||||
|
||||
A = int.from_bytes(os.urandom(BITS//8), "little")
|
||||
B = int.from_bytes(os.urandom(BITS//8), "little")
|
||||
@@ -22,7 +21,8 @@ def main():
|
||||
print("Here are some random numbers, now guess the flag")
|
||||
rng = gen_random(SEED, BITS, 0xFF)
|
||||
for i in range(len(FLAG)):
|
||||
print(next(rng) ^ ord(FLAG[i]))
|
||||
num = next(rng)
|
||||
print(num ^ ord(FLAG[i]))
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
|
||||
Reference in New Issue
Block a user