Skip to content

Instantly share code, notes, and snippets.

View muhammad23012009's full-sized avatar

Muhammad muhammad23012009

View GitHub Profile
@muhammad23012009
muhammad23012009 / sony-fota-xml-decryptor.py
Created February 21, 2026 20:46
Quick little Python script to decrypt Sony FOTA XMLs for headphones/earphones (tested with WH-1000XM5 and XM6)
from Crypto.Cipher import AES
from Crypto.Util.Padding import pad, unpad
key = [79, 162, 121, 153, 255, 208, 139, 31, 228, 210, 96, 213, 123, 109, 60, 23]
key = bytearray(key)
cipher = AES.new(key, AES.MODE_ECB)
file = open("firmware.xml", "rb")
# A header (I completely forgot what the header even does)
file.seek(0x4B, 0)