Skip to content

Instantly share code, notes, and snippets.

@teixeira0xfffff
Created February 19, 2024 15:17
Show Gist options
  • Save teixeira0xfffff/89875a45ccc46b038a0ce2f7d5a10472 to your computer and use it in GitHub Desktop.
Save teixeira0xfffff/89875a45ccc46b038a0ce2f7d5a10472 to your computer and use it in GitHub Desktop.
Decrypter for DexCrypto
class DexCrypto:
KEY = "qtfreet"
hexString = "0123456789ABCDEF"
@staticmethod
def FxIjsF(p0):
i = 2
i1 = 1
i2 = 0
ointArray = [0] * 27
i3 = p0[i2]
ointArray[0] = i3
ointArray1 = [p0[i1], p0[i], p0[3]]
for i2 in range(26):
i4 = i2 % 3
i1 = i2 % 3
i1 = ointArray1[i1] >> 8
i = i2 % 3
i = ointArray1[i] << 24
i1 = i1 | i
i1 = i1 + i3
i1 = i1 ^ i2
ointArray1[i4] = i1
i4 = i3 << 3
i3 = i3 >> 29
i3 = i3 | i4
i4 = i2 % 3
i3 = i3 ^ ointArray1[i4]
i4 = i2 + 1
ointArray[i4] = i3
return ointArray
@staticmethod
def ab(p0):
uByteArrayOu = bytearray()
for i2 in range(0, len(p0), 2):
i3 = DexCrypto.hexString.index(p0[i2]) << 4
i6 = i2 + 1
i3 = i3 | DexCrypto.hexString.index(p0[i6])
uByteArrayOu.append(i3)
uobyteArray = bytes(uByteArrayOu)
decrypted_bytes = bytearray(uobyteArray)
i1 = len(uobyteArray)
i3 = len(DexCrypto.KEY)
for i in range(i1):
i4 = i % i3
i5 = uobyteArray[i] ^ ord(DexCrypto.KEY[i4])
decrypted_bytes[i] = i5
return decrypted_bytes.decode('utf-8')
strings_to_decrypt = [
"15111E02170A5A3004161E0C0615051D091C",
"0319465F17",
"041A0D1C0A121A",
"05111506480E110807",
"0715141B0407181407",
"0715141B0407181422071E100007",
"0715141B040718143F0F1C0116",
]
for string in strings_to_decrypt:
decrypted_string = DexCrypto.ab(string)
print(decrypted_string)
@teixeira0xfffff
Copy link
Author

image

SHA256: bcca5693abacf0fdd5d2c4bf21c2a0e6172db4a18ed714ed5827f43fdf1ad7f4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment