xct / ropstar

Automatic exploit generation for simple linux pwn challenges.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

trigger_fmt string pattern for byte array

S3cur3Th1sSh1t opened this issue · comments

Hi,

just did some debugging for a ctf binary which resulted in the following:

There is an error in the trigger_fmt function stating:

Traceback (most recent call last): File "ropstar.py", line 481, in <module> app.main() File "ropstar.py", line 319, in main autofmt = FmtStr(self.trigger_fmt) File "/usr/local/lib/python3.8/dist-packages/pwnlib/fmtstr.py", line 854, in __init__ self.offset, self.padlen = self.find_offset() File "/usr/local/lib/python3.8/dist-packages/pwnlib/fmtstr.py", line 872, in find_offset leak = self.leak_stack(off, marker) File "/usr/local/lib/python3.8/dist-packages/pwnlib/fmtstr.py", line 861, in leak_stack leak = self.execute_fmt(prefix + b"START%%%d$pEND" % offset) File "ropstar.py", line 183, in trigger_fmt m = re.search(pattern, result) File "/usr/lib/python3.8/re.py", line 201, in search return _compile(pattern, flags).search(string) TypeError: cannot use a string pattern on a bytes-like object
recvall returns a byte array but the regex search is done via string.

你好,我是遇到了leak.py中的类型错误问题,不知道你有遇到吗
image