Just patch these asm
0008100A jne simplegame.81036 -- jmp 0x00081049
00081080 mov dword ptr ds:[833A8],14 -- mov dword ptr ds:[833A8],01 |
==> |
def sum_hex_string(string):
# Initialize sum
total_sum = 0
# Iterate over each character in the string
for char in string:
# Convert the character to its hexadecimal representation
hex_value = hex(ord(char))[2:]
# Convert the hexadecimal representation to an integer and add it to the sum
total_sum += int(hex_value, 16)
return hex(total_sum)
# Get user input and store it in a variable
user_input = input("Username :")
if len(user_input) 8:
user_pass = int(sum_hex_string(user_input) , 16) + 10
print(f"Your password is : '{user_pass}'")
else:
print("The length of the string is not greater than 8.") |
==> |