working
This commit is contained in:
Binary file not shown.
13
cscg25/rev/intro3/genPassword.py
Normal file
13
cscg25/rev/intro3/genPassword.py
Normal file
@@ -0,0 +1,13 @@
|
||||
password = b"b9yPw:MwqcoHuFz^r-o*{>I\020Y"
|
||||
|
||||
def reverse_transformation(input_bytes):
|
||||
input_bytes = bytearray(input_bytes) # Convert to mutable bytearray
|
||||
for i in range(len(input_bytes)):
|
||||
input_bytes[i] = (input_bytes[i] + 2) % 256 # Step 1: Add 2
|
||||
input_bytes[i] ^= (i + 0xa) # Step 2: XOR with (i + 0xa)
|
||||
return bytes(input_bytes) # Convert back to bytes
|
||||
|
||||
real_password = reverse_transformation(password)
|
||||
|
||||
with open("password.bin", "wb") as f:
|
||||
f.write(real_password)
|
||||
1
cscg25/rev/intro3/password.bin
Normal file
1
cscg25/rev/intro3/password.bin
Normal file
@@ -0,0 +1 @@
|
||||
n0w_w3_have_a_dyn4m1c_k3y
|
||||
Reference in New Issue
Block a user