cscg ist super
This commit is contained in:
20
2026/cscg/rev/intro2/decode_password.py
Normal file
20
2026/cscg/rev/intro2/decode_password.py
Normal file
@@ -0,0 +1,20 @@
|
||||
import ida_bytes
|
||||
|
||||
def calc_flag(start_ea, length):
|
||||
raw_data = ida_bytes.get_bytes(start_ea, length)
|
||||
|
||||
if not raw_data:
|
||||
return None
|
||||
|
||||
data = bytearray(raw_data)
|
||||
|
||||
for i in range(len(data)):
|
||||
data[i] = (data[i] + 119) & 0xFF
|
||||
|
||||
return data
|
||||
|
||||
result = calc_flag(0x2020, 25)
|
||||
if result:
|
||||
print(f"Result (hex): {result.hex()}")
|
||||
print(f"Result (string): {''.join(chr(b) for b in result if 32 <= b <= 126)}")
|
||||
|
||||
Reference in New Issue
Block a user