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: 'module' object has no attribute 'UNICORN_HANDLE_TRANSMIT_SYSCALL' #28

Closed
ash09 opened this issue Mar 24, 2017 · 4 comments

Comments

@ash09
Copy link

ash09 commented Mar 24, 2017

Hi,
I get the following error when I run Driller, I'm not able to figure out what is the problem.

import driller
d = driller.Driller("./test","a"*1024,"\xff" * 65535)
n = d.drill()
Traceback (most recent call last):
  File "test-driller.py", line 4, in <module>
    n = d.drill()
  File "/usr/lib/python2.7/site-packages/driller/driller.py", line 110, in drill
    list(self._drill_input())
  File "/usr/lib/python2.7/site-packages/driller/driller.py", line 136, in _drill_input
    t = tracer.Tracer(self.binary, self.input, hooks=self._hooks)
  File "/usr/lib/python2.7/site-packages/tracer/tracer.py", line 216, in __init__
    self.path_group = self._prepare_paths()
  File "/usr/lib/python2.7/site-packages/tracer/tracer.py", line 921, in _prepare_paths
    return self._linux_prepare_paths()
  File "/usr/lib/python2.7/site-packages/tracer/tracer.py", line 1081, in _linux_prepare_paths
    options.add(so.UNICORN_HANDLE_TRANSMIT_SYSCALL)
AttributeError: 'module' object has no attribute 'UNICORN_HANDLE_TRANSMIT_SYSCALL'

Thank you for your help.

@salls
Copy link
Member

salls commented Mar 24, 2017

It looks like you need to update simuvex/unicorn. I suggest using the version on github which is the most up to date.

@ash09
Copy link
Author

ash09 commented Mar 25, 2017

Indeed, simuvex, pyvex and cle were not up to date. Thanks!

@ash09 ash09 closed this as completed Mar 25, 2017
@dkasak
Copy link

dkasak commented Mar 25, 2017

@ash09 Did you install simuvex from https://github.com/angr/simuvex? The build fails for me with:

  Found existing installation: simuvex 6.7.1.31
    Uninstalling simuvex-6.7.1.31:
      Successfully uninstalled simuvex-6.7.1.31
  Running setup.py install for simuvex ... error
    Complete output from command /home/dkasak/code/projects/shellphish/venv/bin/python2 -u -c "import setuptools, tokenize;__file__='/tmp/pip-CO6_qP-build/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-LjkLo0-record/install-record.txt --single-version-externally-managed --compile --install-headers /home/dkasak/code/projects/shellphish/venv/include/site/python2.7/simuvex:
    running install
    running build
    Building sim_unicorn
    gcc -fPIC -c -O3 -o log.o log.c
    g++ -I /home/dkasak/code/projects/shellphish/venv/lib/python2.7/site-packages/unicorn/include -I /home/dkasak/code/projects/shellphish/venv/lib/python2.7/site-packages/pyvex/include -L /home/dkasak/code/projects/shellphish/venv/lib/python2.7/site-packages/unicorn/lib -L /home/dkasak/code/projects/shellphish/venv/lib/python2.7/site-packages/pyvex/lib `pkg-config --cflags glib-2.0` -O3 -fPIC -std=c++11 -shared -o sim_unicorn.so log.o sim_unicorn.cpp `pkg-config --libs glib-2.0` -lunicorn -lpyvex
    sim_unicorn.cpp: In member function ‘bool State::check_expr(RegisterSet*, RegisterSet*, IRExpr*)’:
    sim_unicorn.cpp:574:9: error: ‘Iex_GSPTR’ was not declared in this scope
        case Iex_GSPTR:
             ^~~~~~~~~
    sim_unicorn.cpp: In member function ‘bool State::check_block(uint64_t, int32_t)’:
    sim_unicorn.cpp:765:114: error: ‘vex_lift’ was not declared in this scope
        IRSB *the_block = vex_lift(this->vex_guest, this->vex_archinfo, instructions.get(), address, 99, size, 1, 0, 0);
                                                                                                                      ^
    make: *** [Makefile:24: sim_unicorn.so] Error 1
    error: Unable to build sim_unicorn
    
    ----------------------------------------
  Rolling back uninstall of simuvex
Command "/home/dkasak/code/projects/shellphish/venv/bin/python2 -u -c "import setuptools, tokenize;__file__='/tmp/pip-CO6_qP-build/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-LjkLo0-record/install-record.txt --single-version-externally-managed --compile --install-headers /home/dkasak/code/projects/shellphish/venv/include/site/python2.7/simuvex" failed with error code 1 in /tmp/pip-CO6_qP-build/

@zardus
Copy link
Member

zardus commented Mar 25, 2017 via email

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

4 participants