Skip to content

Instantly share code, notes, and snippets.

@autonome
Created November 26, 2023 09:20
Show Gist options
  • Save autonome/2a3f5f030bf02780c0b7800cdfe2cbcb to your computer and use it in GitHub Desktop.
Save autonome/2a3f5f030bf02780c0b7800cdfe2cbcb to your computer and use it in GitHub Desktop.
Firefox profile lz4 de-magicker from mossop
#!/usr/bin/env python
import io
import sys
import lz4.block
MAGIC = b'mozLz40\0'
for path in sys.argv[1:]:
with io.open(path, 'rb') as f:
magic = f.read(len(MAGIC))
if magic != MAGIC:
raise Exception('Bad magic number')
print(lz4.block.decompress(f.read()).decode("utf-8"))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment