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

AttributeError: 'unicode' object has no attribute '__slots__' #26

Closed
leessang10 opened this issue Aug 7, 2018 · 5 comments
Closed

AttributeError: 'unicode' object has no attribute '__slots__' #26

leessang10 opened this issue Aug 7, 2018 · 5 comments

Comments

@leessang10
Copy link

Version

system OS: Ubuntu 14.04.5 LTS 64bit
angr: 7.8.8.1
angrop:7.8.8.1
angr's requirements(archinfo, cle, claripy, pyvex...): 7.8.8.1

Problem

I recently installed a new version of angr(7.8.8.1) by pip. However, problems occur when using angrop
Please help me find a solution...

Typed Commands in iPython

In [1]: import angr
WARNING | 2018-08-07 15:50:14,757 | angr.analyses.disassembly_utils | Your version of capstone does not support MIPS instruction groups.

In [2]: import angrop

In [3]: p = angr.Project("/bin/ls")

In [4]: rop = p.analyses.ROP()

In [5]: rop.find_gadgets()

Error Message

Exception in thread Thread-3:
Traceback (most recent call last):
  File "/usr/lib/python2.7/threading.py", line 810, in __bootstrap_inner
    self.run()
  File "/usr/lib/python2.7/threading.py", line 763, in run
    self.__target(*self.__args, **self.__kwargs)
  File "/usr/lib/python2.7/multiprocessing/pool.py", line 338, in _handle_tasks
    for i, task in enumerate(taskseq):
  File "/usr/lib/python2.7/multiprocessing/pool.py", line 285, in <genexpr>
    self._taskqueue.put((((result._job, i, mapstar, (x,), {})
  File "/usr/lib/python2.7/multiprocessing/pool.py", line 436, in _get_tasks
    x = tuple(itertools.islice(it, size))
  File "/home/lsm/angr-dev/angr/lib/python2.7/site-packages/angrop/rop.py", line 303, in _addresses_to_check_with_caching
    not self._block_has_ip_relative(a, bl):
  File "/home/lsm/angr-dev/angr/lib/python2.7/site-packages/angrop/rop.py", line 264, in _block_has_ip_relative
    diff_constants = differing_constants(bl, bl2)
  File "/home/lsm/angr-dev/angr/lib/python2.7/site-packages/angr/analyses/bindiff.py", line 186, in differing_constants
    differences = compare_statement_dict(statement, statement_2)
  File "/home/lsm/angr-dev/angr/lib/python2.7/site-packages/angr/analyses/bindiff.py", line 237, in compare_statement_dict
    new_diffs = compare_statement_dict(getattr(statement_1, attr), getattr(statement_2, attr))
  File "/home/lsm/angr-dev/angr/lib/python2.7/site-packages/angr/analyses/bindiff.py", line 237, in compare_statement_dict
    new_diffs = compare_statement_dict(getattr(statement_1, attr), getattr(statement_2, attr))
  File "/home/lsm/angr-dev/angr/lib/python2.7/site-packages/angr/analyses/bindiff.py", line 237, in compare_statement_dict
    new_diffs = compare_statement_dict(getattr(statement_1, attr), getattr(statement_2, attr))
  File "/home/lsm/angr-dev/angr/lib/python2.7/site-packages/angr/analyses/bindiff.py", line 228, in compare_statement_dict
    for attr in statement_1.__slots__:
AttributeError: 'unicode' object has no attribute '__slots__'

@rhelmot
Copy link
Member

rhelmot commented Aug 7, 2018 via email

@leessang10
Copy link
Author

Thank you for your prompt reply!!
You mean I should reinstall angr && angrop?
I'm also using your MechPhish(Driller, Rex, etc), so which version would you recommand?

@rhelmot
Copy link
Member

rhelmot commented Aug 7, 2018 via email

@leessang10
Copy link
Author

Thank you!! I solved the problem by reinstalling angr.

The following code is written for anyone with the same problem as me.
It will help them fix the problem.

pip uninstall angr
pip install git+https://github.com/angr/angr.git

@rhelmot
Copy link
Member

rhelmot commented Aug 7, 2018

For anyone else who encounters this problem in the future: do not do that, you will be mixing versions of the angr libraries from pip and github, which is a recipe for disaster. Do this:

pip uninstall angr cle claripy pyvex archinfo
git clone https://github.com/angr/angr-dev
cd angr-dev
./setup.sh

@rhelmot rhelmot closed this as completed Aug 7, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants