AFLplusplus: afl-cov error on AFL++ output directory
Hi .
Sorry to open-up the issue here, it was not possible to open the issue at the afl-cov github (vanhauser-thc version)
I am using https://github.com/vanhauser-thc/afl-cov
to measure the line coverage on an app that is fuzzed with afl++ .
I’m basically using the afl-cov.sh
to facilitate the process, using afl-cov.sh
or afl-cov
will actually results in a error .
I’m using the command :
~/afl-cov/afl-cov.sh /home/samstack/fuzzing-targets/tiff-4.0.4-cov/output1/default "/home/samstack/fuzzing-targets/tiff-4.0.4-cov/tools/tiffinfo @@"
and error :
Traceback (most recent call last):
File "/home/samstack/afl-cov/afl-cov", line 1227, in <module>
sys.exit(main())
File "/home/samstack/afl-cov/afl-cov", line 80, in main
if not validate_cargs(cargs):
File "/home/samstack/afl-cov/afl-cov", line 949, in validate_cargs
if not is_gcov_enabled(cargs):
File "/home/samstack/afl-cov/afl-cov", line 922, in is_gcov_enabled
if not cargs.disable_gcov_check and is_bin_gcov_enabled(part, cargs):
File "/home/samstack/afl-cov/afl-cov", line 846, in is_bin_gcov_enabled
False, cargs, WANT_OUTPUT, False, "")[1]:
File "/home/samstack/afl-cov/afl-cov", line 727, in run_cmd
with open(fh.name, 'r', 'rb') as f:
TypeError: an integer is required (got type str)
Help wanted!
It seems that is a problem with python scripts.
I am looking for a solution to this.
tnx
samstack
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 33 (32 by maintainers)
Commits related to this issue
- Add retries in gce operation call. (#757) This should fix the SSL BrokenPipeErrors. — committed to mattweingarten/AFLplusplus by inferno-chromium 4 years ago
as @domenukk pointed out to me @MegaManSec fix is not good, so I went back and tried to fix it correctly. please test. this showed to me again that python is pretty much crap … but thats life.
no it was my fault as me as a python n00b tried to do a better fix than @MegaManSec but failed 😃 This just happened 10h ago 😃 I now switched to his fix - can you please check if it works for you guys?
line 727, change this: with open(fh.name, ‘r’, ‘rb’) as f: to this: with open(fh.name, ‘r’) as f:
this is my fault sorry 😄 it will be fixed soon