-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Fix cyclic cli for 64 bit integers #1616
Conversation
Shouldn't this just use cyclic_find() function? It should handle stuff automatically already |
pwnlib/commandline/cyclic.py
Outdated
@@ -70,7 +70,7 @@ def main(args): | |||
pat = int(pat, 0) | |||
except ValueError: | |||
pass | |||
pat = flat(pat) | |||
pat = flat(pat, word_size=8 * args.length) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should set context.cyclic_size
. instead of doing this here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That doesn't actually work:
AttributeError: cyclic pattern size cannot be larger than word size
but I can set context.bytes
to args.length
and it seems to work.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we at least do bytes=
to avoid the unnecessary multiplication? Also this should be rebased since v4.2.0 was released and now this targets v4.4.0dev0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
Mind rebasing this on |
Rebased. |
@heapcrash or @Arusekk can you merge this? |
Before this change,
pwn cyclic -n 8 -l 0x6161616161616178
outputs: