Skip to content

Instantly share code, notes, and snippets.

View S0Ulle33's full-sized avatar
👨‍💻

S0Ulle33

👨‍💻
View GitHub Profile
@S0Ulle33
S0Ulle33 / find_rarjpeg.py
Last active November 9, 2018 15:16
Finds rarjpegs by checking zip/rar signatures in file, and then checks if archive is valid.
import os
import re
import zipfile
import rarfile
SIGNATURES = {'ZIP_NORMAL': b'PK\x03\x04', 'ZIP_EMPTY': b'PK\x05\x06', 'ZIP_SPANNED': b'PK\x07\x08',
'RAR_1.50': b'Rar!\x1a\x07\x00', 'RAR_5.0': b'Rar!\x1a\x07\x01\x00'}
def _is_valid(byte_str, offset):

Keybase proof

I hereby claim:

  • I am s0ulle33 on github.
  • I am woolf (https://keybase.io/woolf) on keybase.
  • I have a public key ASD2uV4cbM1xB2X83fOIMkYEiH3P-2kmM1dmAXnGPtODZQo

To claim this, I am signing this object: