-
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
odd paddings are inserted when rop.raw() is called with a string #891
Comments
I found that def generatePadding(self, offset, count):
"""
Generates padding to be inserted into the ROP stack.
"""
if count:
return cyclic.cyclic(offset + count)[-count:]
return '' |
Thanks, that's definitely a bug, it's fixed on the dev branch now. @idolf: since it is so simple, we might want to add it to the beta branch as well? |
Yep, I will do a backport and a new beta release. |
Actually, could you add a test for this before I backport it? |
@kristoff3r Can you use Pull Requests for bug fixes like this? Thanks :) |
Yeah my bad, I just thought "well, an obvious 2 line fix that doesn't touch anything else, easy", without thinking about changelogs, tests or backports. I'll just stick to PR's. |
@kristoff3r No problem ^_^. Feel free to push to dev with impunity with non-backported-bugfixes. |
@kristoff3r Please create a new pull request against stable, with a branch based on stable, with those commits. |
@zachriggle I promised to backport them for him this time, since they both merge cleanly, but he said he would do it the right way next time. |
I ended up backporting only the fix and not the test, since the test used features not yet present on stable. |
pwntools 3.4.0 / python 2.7.6 / ubuntu 14.04 x64
I wanted to put some (str) paddings into the rop chain but odd paddings are also inserted.
What I expected was:
Did I miss something?
The text was updated successfully, but these errors were encountered: