Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
executable file 16 lines (13 sloc) 310 Bytes
#!/usr/bin/env python2
from pwnlib.tools import *
a = sys.argv
def i(x):
return (int(x,16) if x.startswith('0x') else int(x)) & 0xffffffff
n = i(a[1]) if len(a) > 1 else 0x400
p = Pattern(n)
if len(a) <= 2:
print str(p)
elif len(a[2]) <= 4:
print p.offset(a[2])
else:
print p.offset(i(a[2]))