z3 training
This commit is contained in:
@@ -19,13 +19,11 @@ def ROR(X, N):
|
||||
return ((((X) >> (N)) | ((X) << (64 - (N)))) % (2 ** 64))
|
||||
|
||||
def custom_random(state):
|
||||
NEW_STATE = ROL(state,30) ^ ROR(state,12) ^ ROL(state,42) ^ ROL(state,4) ^ ROR(state,5);
|
||||
return NEW_STATE % 256, NEW_STATE;
|
||||
|
||||
NEW_STATE = ROL(state,30) ^ ROR(state,12) ^ ROL(state,42) ^ ROL(state,4) ^ ROR(state,5)
|
||||
return NEW_STATE % 256, NEW_STATE
|
||||
|
||||
pwn.context.arch = 'x86_64'
|
||||
|
||||
|
||||
shc = pwn.asm("""
|
||||
cdq;
|
||||
push rdi;
|
||||
@@ -35,8 +33,6 @@ shc = pwn.asm("""
|
||||
syscall
|
||||
""")
|
||||
|
||||
|
||||
|
||||
def get_seed_for_sequence(bytesequence):
|
||||
s = z3.Solver()
|
||||
base_state = z3.BitVec("base_state", 64)
|
||||
|
||||
Reference in New Issue
Block a user