Skip to content

Instantly share code, notes, and snippets.

@crashish
Created September 30, 2013 21:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save crashish/6770773 to your computer and use it in GitHub Desktop.
Save crashish/6770773 to your computer and use it in GitHub Desktop.
import textwrap, re, urllib
parse_sig = re.compile(
'\[(.*?)\]\s+?signature\s*=\s*(.*?)(\s+\?\?)*\s*ep_only\s*=\s*(\w+)(?:\s*section_start_only\s*=\s*(\w+)|)', re.S)
sig_f = urllib.urlopen('userdb.txt')
sig_data = sig_f.read()
sig_f.close()
sigs = parse_sig.findall(sig_data)
for packer_name, signature, superfluous_wildcards, ep_only, section_start_only in sigs:
print packer_name
print len(signature.replace(' ',''))/2
print textwrap.fill(signature,48)
print ''
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment