Skip to content

Instantly share code, notes, and snippets.

@rejuvyesh
Last active August 29, 2015 14:00
Show Gist options
  • Save rejuvyesh/11249217 to your computer and use it in GitHub Desktop.
Save rejuvyesh/11249217 to your computer and use it in GitHub Desktop.
netcat-cpi-kernel-module to ogg
#!/usr/bin/python
# Convert `netcat-cpi-kernel-module` to actual oggs
import binascii
import re
import sys
try:
s = re.sub('0x', '', re.sub('[,\n]', '', open(sys.argv[1], 'r').read()))
open(sys.argv[1]+'.ogg', 'w').write(binascii.unhexlify(s))
except:
print("Usage: " + sys.argv[0]+" trkNdata.h")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment