-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TypeError: cannot use a bytes pattern on a string-like object #7
Comments
Have you tried using a string (not bytes) pattern? |
No system calls are captured if I do that. Also, my co-worker just informed me that the filter works as expected if we remove the |
@sbmthakur #9 should fix the root issue. Also note that ptracer.SysCallPattern(
name='openat',
args=[
None, # fd argument
re.compile(b'/tmp/.*'),
lambda arg: arg.value & os.O_WRONLY
],
result=lambda res: res.value > 0
) Please let me know if this solves your problem. |
The snippet is working as expected. Thanks for the fix. |
Great! I just published version 0.6.1 with this fix. |
The following snippet crashes with the above error when it comes across a system call that passes the filter.
Here's the error stack.
The text was updated successfully, but these errors were encountered: