aboutsummaryrefslogtreecommitdiff
path: root/unicorn_mode
diff options
context:
space:
mode:
authorvan Hauser <vh@thc.org>2020-05-15 08:36:51 +0200
committerGitHub <noreply@github.com>2020-05-15 08:36:51 +0200
commit87a693d1a956fd0fcb0ebbdecff24053b69e8560 (patch)
tree34578ae146ad79b7748363f23fe022a8e6c1a76d /unicorn_mode
parent1317433a51a7f7336c82c80a592835ddda9ef60f (diff)
parent49bd24144a881f4f55ef1a3db9a7f129a6670488 (diff)
downloadafl++-87a693d1a956fd0fcb0ebbdecff24053b69e8560.tar.gz
Merge pull request #360 from AFLplusplus/dev2.65c
new code formatting + applied
Diffstat (limited to 'unicorn_mode')
-rw-r--r--unicorn_mode/UNICORNAFL_VERSION2
-rwxr-xr-xunicorn_mode/build_unicorn_support.sh35
m---------unicorn_mode/unicornafl0
-rwxr-xr-xunicorn_mode/update_uc_ref.sh1
4 files changed, 16 insertions, 22 deletions
diff --git a/unicorn_mode/UNICORNAFL_VERSION b/unicorn_mode/UNICORNAFL_VERSION
index 336c171b..bb3959ea 100644
--- a/unicorn_mode/UNICORNAFL_VERSION
+++ b/unicorn_mode/UNICORNAFL_VERSION
@@ -1 +1 @@
-a5b7900
+5833117
diff --git a/unicorn_mode/build_unicorn_support.sh b/unicorn_mode/build_unicorn_support.sh
index aeb26945..79a5a4a9 100755
--- a/unicorn_mode/build_unicorn_support.sh
+++ b/unicorn_mode/build_unicorn_support.sh
@@ -65,9 +65,8 @@ if [ ! -f "../afl-showmap" ]; then
fi
-PYTHONBIN=python
+PYTHONBIN=`command -v python3 || command -v python || command -v python2 || echo python3`
MAKECMD=make
-EASY_INSTALL='easy_install'
TARCMD=tar
if [ "$PLT" = "Linux" ]; then
@@ -77,14 +76,12 @@ fi
if [ "$PLT" = "Darwin" ]; then
CORES=`sysctl -n hw.ncpu`
TARCMD=tar
- PYTHONBIN=python3
fi
if [ "$PLT" = "FreeBSD" ]; then
MAKECMD=gmake
CORES=`sysctl -n hw.ncpu`
TARCMD=gtar
- PYTHONBIN=python3
fi
if [ "$PLT" = "NetBSD" ] || [ "$PLT" = "OpenBSD" ]; then
@@ -107,28 +104,24 @@ for i in $PYTHONBIN automake autoconf git $MAKECMD $TARCMD; do
done
-if ! command -v $EASY_INSTALL >/dev/null; then
+# some python version should be available now
+PYTHONS="`command -v python3` `command -v python` `command -v python2`"
+EASY_INSTALL_FOUND=0
+for PYTHON in $PYTHONS ; do
- # work around for installs with executable easy_install
- EASY_INSTALL_FOUND=0
- MYPYTHONPATH=`python -v </dev/null 2>&1 >/dev/null | sed -n -e '/^# \/.*\/os.py/{ s/.*matches //; s/os.py$//; p}'`
- for PATHCANDIDATE in \
- "dist-packages/" \
- "site-packages/"
- do
- if [ -e "${MYPYTHONPATH}/${PATHCANDIDATE}/easy_install.py" ] ; then
+ if $PYTHON -c "import setuptools" ; then
- EASY_INSTALL_FOUND=1
- break
+ EASY_INSTALL_FOUND=1
+ PYTHONBIN=$PYTHON
+ break
- fi
- done
- if [ "0" = $EASY_INSTALL_FOUND ]; then
+ fi
- echo "[-] Error: Python setup-tools not found. Run 'sudo apt-get install python-setuptools'."
- PREREQ_NOTFOUND=1
+done
+if [ "0" = $EASY_INSTALL_FOUND ]; then
- fi
+ echo "[-] Error: Python setup-tools not found. Run 'sudo apt-get install python-setuptools', or install python3-setuptools, or run '$PYTHONBIN -m ensurepip', or create a virtualenv, or ..."
+ PREREQ_NOTFOUND=1
fi
diff --git a/unicorn_mode/unicornafl b/unicorn_mode/unicornafl
-Subproject a5b79002ca18219c83f9aec4e71007917c6be2e
+Subproject 5833117abf55d54c4191ead81312764df03a48b
diff --git a/unicorn_mode/update_uc_ref.sh b/unicorn_mode/update_uc_ref.sh
index 486f37d6..21450e69 100755
--- a/unicorn_mode/update_uc_ref.sh
+++ b/unicorn_mode/update_uc_ref.sh
@@ -24,6 +24,7 @@ cd ./unicornafl || exit 1
git fetch origin master 1>/dev/null || exit 1
git stash 1>/dev/null 2>/dev/null
git stash drop 1>/dev/null 2>/dev/null
+git checkout master
if [ -z "$NEW_VERSION" ]; then
# No version provided, take HEAD.