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 'Tracer' #36

Closed
skybluehold opened this issue Apr 6, 2017 · 13 comments
Closed

AttributeError: 'module' object has no attribute 'Tracer' #36

skybluehold opened this issue Apr 6, 2017 · 13 comments

Comments

@skybluehold
Copy link

Hello,
I want this err fix..

I tried these command

  • [ sudo pip install tracer]
  • [ git clone https://github.com/angr/tracer && pip install tracer]
  • [python test_driller]

How can i fix this err

Traceback (most recent call last):
  File "test_driller.py", line 34, in <module>
    run_all()
  File "test_driller.py", line 31, in run_all
    all_functions[f]()
  File "test_driller.py", line 19, in test_drilling_cgc
    new_inputs = d.drill()
  File "/root/.environments/angr/local/lib/python2.7/site-packages/driller/driller.py", line 113, in drill
    list(self._drill_input())
  File "/root/.environments/angr/local/lib/python2.7/site-packages/driller/driller.py", line 139, in _drill_input
    t = tracer.Tracer(self.binary, self.input, hooks=self._hooks, argv=self.argv)
**AttributeError: 'module' object has no attribute 'Tracer'**

attributeerr

please help me

@rhelmot
Copy link
Member

rhelmot commented Apr 6, 2017

test_driller.py is not meant to be executed directly. It has no #!/usr/bin/env python line (called the "shebang line") at the top of the file, so when you execute it like that, it is interpreted as a bash script. You can tell this from the complaints that "import" is an invalid command.

You are supposed to run it as either python test_driller.py or nosetests -v --nologcapture test_driller.py

@skybluehold
Copy link
Author

skybluehold commented Apr 6, 2017

Thanks you!
my python test code is
image

baby-re is executable bin.

and than i tried
image

and i tried.
image

how can i fix it?

@salls
Copy link
Member

salls commented Apr 6, 2017

running pip install tracer does not install the tracer you cloned from github. try pip install -e ./tracer

@skybluehold
Copy link
Author

Thanks you!

@carterMgj
Copy link

I meet the same problem when I use rex. Have you ever solved your problem?

@rhelmot rhelmot closed this as completed Jan 5, 2018
@Techno-Fox
Copy link

I am having the same issue

@Techno-Fox
Copy link

are you supposed to run this in a virtual environment

@twizmwazin
Copy link
Collaborator

You need to install https://github.com/angr/tracer in your virtualenv. Always use a virtualenv for angr, or really anything python.

@Techno-Fox
Copy link

Thank you this is useful information. Thank you again for responding so quickly, and thank you for working on this project. New to the whole "fuzzing" thing. Used to doing it old school, but times are changing. I will try this solution.

I've installed the needed modules, and fix some SyntaxError: 'return' with argument inside generator
in the tracer module. This was the outcome.

IOError: [Errno 2] No such file or directory: '/dev/shm/work/bof/sync/fuzzer-master/fuzz_bitmap'
('', None)

@Techno-Fox
Copy link

This is in a virtualenv

@Techno-Fox
Copy link

No getting an Error in driller

Traceback (most recent call last):
File "/opt/fuzzer/fuzzer_venv/lib/python2.7/site-packages/driller/local_callback.py", line 122, in
for new_input in d.drill_generator():
File "/opt/fuzzer/fuzzer_venv/local/lib/python2.7/site-packages/driller/driller_main.py", line 101, in drill_generator
for i in self._drill_input():
File "/opt/fuzzer/fuzzer_venv/local/lib/python2.7/site-packages/driller/driller_main.py", line 111, in _drill_input
r = tracer.qemu_runner.QEMURunner(self.binary, self.input, argv=self.argv)
File "/opt/fuzzer/fuzzer_venv/src/tracer/tracer/qemu_runner.py", line 168, in init
self._run()
File "/opt/fuzzer/fuzzer_venv/src/tracer/tracer/qemu_runner.py", line 405, in _run
self._load_core_values(core_target)
File "/usr/lib/python2.7/contextlib.py", line 35, in exit
self.gen.throw(type, value, traceback)
File "/opt/fuzzer/fuzzer_venv/src/tracer/tracer/qemu_runner.py", line 252, in _tmpfile
with contextlib.suppress(FileNotFoundError):
AttributeError: 'module' object has no attribute 'suppress'
('', None)

@Techno-Fox
Copy link

Just to be clear we are supposed to use python2 or python3

@twizmwazin
Copy link
Collaborator

Python2 is dead, all of our work is either python3 or abandoned.

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

6 participants