Skip to content
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

Replace string format char #1125

Merged
merged 2 commits into from
Mar 19, 2018
Merged

Conversation

tlamb96
Copy link
Contributor

@tlamb96 tlamb96 commented Mar 16, 2018

Fixes the following error when dump is called on a ROP object:

Traceback (most recent call last):
  File "myrop.py", line 17, in <module>
    print rop.dump()
  File "/usr/local/lib/python2.7/dist-packages/pwnlib/rop/rop.py", line 831, in dump
    return self.build().dump()
  File "/usr/local/lib/python2.7/dist-packages/pwnlib/rop/rop.py", line 705, in build
    stack.describe(self.describe(slot))
  File "/usr/local/lib/python2.7/dist-packages/pwnlib/rop/rop.py", line 632, in describe
    return str(object)
  File "/usr/local/lib/python2.7/dist-packages/pwnlib/rop/call.py", line 238, in __str__
    name = self.name or fmt & self.target
TypeError: unsupported operand type(s) for &: 'str' and 'int'

@zachriggle
Copy link
Member

Can you also put parens around the (foo % bar) expression?

@tlamb96
Copy link
Contributor Author

tlamb96 commented Mar 16, 2018

@zachriggle updated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants