Skip to content

Instantly share code, notes, and snippets.

@chr15m
Created March 28, 2022 03:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chr15m/ee5b7f011c6219753fb25513d1f27e55 to your computer and use it in GitHub Desktop.
Save chr15m/ee5b7f011c6219753fb25513d1f27e55 to your computer and use it in GitHub Desktop.
Extract channel names from xm or it files saved with modplug tracker
from sys import argv
f = open(argv[1], "rb").read()
i = f.index(bytearray("CNAM", "utf8"))
for n in range(3):
x = f[i+n*20+8:i+n*20+28].decode("utf8")
print(n, x)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment