Guest User

Untitled

a guest
Mar 1st, 2025
37
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.56 KB | None | 0 0
  1. import sys
  2.  
  3. def decode_audio_file(input_path, output_path):
  4. with open(input_path, "rb") as f:
  5. data = bytearray(f.read())
  6.  
  7. # XOR the first four bytes
  8. key = [0x06, 0x23, 0x54, 0x0f]
  9. for i in range(4):
  10. data[i] ^= key[i]
  11.  
  12. with open(output_path, "wb") as f:
  13. f.write(data)
  14.  
  15. print(f"Decoded file saved as: {output_path}")
  16.  
  17. if __name__ == "__main__":
  18. if len(sys.argv) != 3:
  19. print("Usage: python decode_audio.py input_file output_file")
  20. sys.exit(1)
  21.  
  22. decode_audio_file(sys.argv[1], sys.argv[2])
Advertisement
Add Comment
Please, Sign In to add comment