Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import sys
- def decode_audio_file(input_path, output_path):
- with open(input_path, "rb") as f:
- data = bytearray(f.read())
- # XOR the first four bytes
- key = [0x06, 0x23, 0x54, 0x0f]
- for i in range(4):
- data[i] ^= key[i]
- with open(output_path, "wb") as f:
- f.write(data)
- print(f"Decoded file saved as: {output_path}")
- if __name__ == "__main__":
- if len(sys.argv) != 3:
- print("Usage: python decode_audio.py input_file output_file")
- sys.exit(1)
- decode_audio_file(sys.argv[1], sys.argv[2])
Advertisement
Add Comment
Please, Sign In to add comment