Battelle / afl-unicorn

afl-unicorn lets you fuzz any piece of binary that can be emulated by Unicorn Engine.

Home Page:https://medium.com/@njvoss299/afl-unicorn-fuzzing-arbitrary-binary-code-563ca28936bf

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Python Setuptools not recognized

pittzgal opened this issue · comments

Hi,

After I run "sudo ./build_unicorn_support.sh" under unicorn_mode directory, I got this error:

[*] Performing basic sanity checks...
[-] Error: Python setup-tools not found. Run 'sudo apt-get install python-setuptools'.

I get this error even after I installed the setuptools and rerun the script. I use an Ubuntu 18.04. Has anyone encountered similar problems?

same problem!

I comment the check condition, now I can compile the project, but the parmeter -U is useless.
I think it may be because the python upgrading stuff.

This error message is coming from this check failing:

if ! which easy_install > /dev/null; then
  echo "[-] Error: Python setup-tools not found. Run 'sudo apt-get install python-setuptools'."
  exit 1
fi

Basically, for some reason the command easy_install is not available in the context in which you are running the build_unicorn_support.sh script. Normally you can install that via the sudo apt-get install python-setuptools command. I'm not sure why that command isn't found in your case, but I'm guessing that the answer is contained somewhere in this discussion: https://askubuntu.com/questions/1040392/easy-install-command-not-found

Let me know if that solves it. Thanks!

Thanks Nathan, I solve it according to the link you mentioned. https://askubuntu.com/questions/1040392/easy-install-command-not-found.

Use this command
python /usr/lib/python2.7/dist-packages/easy_install.py pip

And add the easy_install cmd to the sudoers, otherwise the build script can't find the easy_install under the sudo privilege yet.

However, when I compile the afl-fuzz with no modification to the build script, the afl-fuzz still cannot identify the -U parmeter!

My OS is ubuntu 18

At first, I ran into the same error, because easy_install is deprecated on modern versions of setuptools. I submitted the PR to use a more modern check for setuptools.