Skip to content

Instantly share code, notes, and snippets.

Created September 30, 2013 11:38
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?
Lineage 2 Music ogg decrypter
import mmap
import sys
import os
import glob
if len(sys.argv) != 2:
sys.exit('Usage: %s directory' % sys.argv[0])
if not os.path.exists(sys.argv[1]):
sys.exit('ERROR: directory %s was not found!' % sys.argv[1])
files = glob.glob(sys.argv[1] + '/*.ogg')
for file in files:
f = open(file, 'a+')
m = mmap.mmap(f.fileno(), 0)
print m[0:4]
if m[0:4] == 'L2SD':
m[0:4] = 'OggS'
Copy link

Thank you! Funny to see that they have changed OggS to L2SD.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment