#Covert to Python.
import json
import os
import struct
from hashlib import sha256
license = {
"header": {"version": 1},
"payload": {
"name": "BlueDeviL//SCT",
"email": "
[email protected]",
"licenses": [
{
"description": "license",
"edition_id": "ida-pro",
"id": "14-0000-FFFF-88",
"license_type": "named",
"product": "IDA",
"seats": 1,
"start_date": "2024-08-10 00:00:00",
"end_date": "2033-12-31 23:59:59",
"issued_on": "2025-07-20 00:00:00",
"owner": "BlueDeviL//SCT",
"product_id": "IDAPRO",
"product_version": "9.3",
"add_ons": [],
"features": [],
}
],
},
}
def addons(license):
addons_list = [
"LUMINA",
"TEAMS",
"HEXX86",
"HEXX64",
"HEXARM",
"HEXARM64",
"HEXMIPS",
"HEXMIPS64",
"HEXPPC",
"HEXPPC64",
"HEXRV",
"HEXRV64",
"HEXARC",
"HEXARC64",
"HEXV850",
]
for i, addon in enumerate(addons_list):
license["payload"]["licenses"][0]["add_ons"].append({
"id": f"48-1337-B00B-{str(i + 1).zfill(2)}",
"code": addon,
"owner": license["payload"]["licenses"][0]["id"],
"start_date": "2025-07-20 00:00:00",
"end_date": "2033-12-31 23:59:59",
})
addons(license)
def sort(obj):
if isinstance(obj, list):
return "[" + ",".join(sort(item) for item in obj) + "]"
elif isinstance(obj, dict) and obj is not None:
keys = sorted(obj.keys())
return "{" + ",".join(f'"{k}":{sort(obj[k])}' for k in keys) + "}"
else:
return json.dumps(obj)
c_modulus = bytes.fromhex("edfd42cbf978546e8911225884436c57140525650bcf6ebfe80edbc5fb1de68f4c66c29cb22eb668788afcb0abbb718044584b810f8970cddf227385f75d5dddd91d4f18937a08aa83b28c49d12dc92e7505bb38809e91bd0fbd2f2e6ab1d2e33c0c55d5bddd478ee8bf845fcef3c82b9d2929ecb71f4d1b3db96e3a8e7aaf93")
private_key = bytes.fromhex("77c86abbb7f3bb134436797b68ff47beb1a5457816608dbfb72641814dd464dd640d711d5732d3017a1c4e63d835822f00a4eab619a2c4791cf33f9f57f9c2ae4d9eed9981e79ac9b8f8a411f68f25b9f0c05d04d11e22a3a0d8d4672b56a61f1532282ff4e4e74759e832b70e98b9d102d07e9fb9ba8d15810b144970029874")
def encrypt(message):
modulus_buf = int.from_bytes(c_modulus[::-1], "big")
key_buf = int.from_bytes(private_key[::-1], "big")
reversed_message = message[::-1]
msg_buf = int.from_bytes(reversed_message, "big")
base = msg_buf % modulus_buf
exponent = key_buf
modulus = modulus_buf
encrypted_big_int = 1
while exponent > 0:
if exponent % 2 == 1:
encrypted_big_int = (encrypted_big_int * base) % modulus
exponent //= 2
base = (base * base) % modulus
bytes_result = []
while encrypted_big_int > 0:
bytes_result.append(encrypted_big_int & 0xff)
encrypted_big_int >>= 8
return bytes(bytes_result)
def patch(file_path, search, replace):
try:
with open(file_path, "r+b") as f:
buf = f.read()
idx = buf.find(search)
if idx != -1:
buf = buf[:idx] + replace + buf[idx + len(replace):]
f.seek(0)
f.write(buf)
print(f"Patched {file_path}")
return
else:
print(f"Pattern not found in {file_path}")
return
except Exception as err:
print(f"Error reading or writing file: {file_path}")
print("Elevated permissions given?")
return
def sign(payload):
data = {"payload": payload}
data_str = sort(data)
buffer = bytearray(128)
buffer[:33] = bytes([0x42] * 33)
hash_result = sha256(data_str.encode()).digest()
buffer[33:33 + len(hash_result)] = hash_result
encrypted = encrypt(buffer)
return encrypted.hex().upper()
license["signature"] = sign(license["payload"])
with open("idapro.hexlic", "w") as f:
f.write(sort(license))
print("License written to idapro.hexlic")
search = bytes.fromhex("EDFD425CF978")
replace = bytes.fromhex("EDFD42CBF978")
files_to_patch = [
"ida.dll",
"ida32.dll",
"libida.so",
"libida32.so",
"libida.dylib",
"libida32.dylib",
]
for file in files_to_patch:
if os.path.exists(file):
print(f"Patching {file}...")
patch(file, search, replace)