about summary refs log tree commit diff
path: root/unicorn_mode
diff options
context:
space:
mode:
Diffstat (limited to 'unicorn_mode')
-rw-r--r--unicorn_mode/UNICORNAFL_VERSION2
-rwxr-xr-xunicorn_mode/build_unicorn_support.sh34
-rw-r--r--unicorn_mode/samples/speedtest/rust/Cargo.toml2
m---------unicorn_mode/unicornafl0
4 files changed, 25 insertions, 13 deletions
diff --git a/unicorn_mode/UNICORNAFL_VERSION b/unicorn_mode/UNICORNAFL_VERSION
index 5e7234c6..1c8e571f 100644
--- a/unicorn_mode/UNICORNAFL_VERSION
+++ b/unicorn_mode/UNICORNAFL_VERSION
@@ -1 +1 @@
-06796154996fef2d92ccd172181ee0cdf3631959
+f2cede37
diff --git a/unicorn_mode/build_unicorn_support.sh b/unicorn_mode/build_unicorn_support.sh
index f24c8ce3..53ec2481 100755
--- a/unicorn_mode/build_unicorn_support.sh
+++ b/unicorn_mode/build_unicorn_support.sh
@@ -14,7 +14,7 @@
 #                                <andreafioraldi@gmail.com>
 #
 # Copyright 2017 Battelle Memorial Institute. All rights reserved.
-# Copyright 2019-2022 AFLplusplus Project. All rights reserved.
+# Copyright 2019-2023 AFLplusplus Project. All rights reserved.
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -117,21 +117,23 @@ done
 
 # some python version should be available now
 PYTHONS="`command -v python3` `command -v python` `command -v python2`"
-SETUPTOOLS_FOUND=0
+PIP_FOUND=0
 for PYTHON in $PYTHONS ; do
 
-  if $PYTHON -c "import setuptools" ; then
+  if $PYTHON -c "import pip" ; then
+    if $PYTHON -c "import wheel" ; then
 
-    SETUPTOOLS_FOUND=1
-    PYTHONBIN=$PYTHON
-    break
+      PIP_FOUND=1
+      PYTHONBIN=$PYTHON
+      break
 
+    fi
   fi
 
 done
-if [ "0" = $SETUPTOOLS_FOUND ]; then
+if [ "0" = $PIP_FOUND ]; then
 
-  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 ..."
+  echo "[-] Error: Python pip or python wheel not found. Run 'sudo apt-get install python3-pip', or run '$PYTHONBIN -m ensurepip', or create a virtualenv, or ... - and 'pip3 install wheel'"
   PREREQ_NOTFOUND=1
 
 fi
@@ -196,15 +198,25 @@ $MAKECMD -j1 || exit 1
 echo "[+] Build process successful!"
 
 echo "[*] Installing Unicorn python bindings..."
+cd unicorn/bindings/python || exit 1
+if [ -z "$VIRTUAL_ENV" ]; then
+  echo "[*] Info: Installing python unicornafl using --user"
+  THREADS=$CORES $PYTHONBIN -m pip install --user --force .|| exit 1
+else
+  echo "[*] Info: Installing python unicornafl to virtualenv: $VIRTUAL_ENV"
+  THREADS=$CORES $PYTHONBIN -m pip install --force .|| exit 1
+fi
+cd ../../../
+echo "[*] Installing Unicornafl python bindings..."
 cd bindings/python || exit 1
 if [ -z "$VIRTUAL_ENV" ]; then
   echo "[*] Info: Installing python unicornafl using --user"
-  $PYTHONBIN setup.py install --user --force --prefix=|| exit 1
+  THREADS=$CORES $PYTHONBIN -m pip install --user --force .|| exit 1
 else
   echo "[*] Info: Installing python unicornafl to virtualenv: $VIRTUAL_ENV"
-  $PYTHONBIN setup.py install --force || exit 1
+  THREADS=$CORES $PYTHONBIN -m pip install --force .|| exit 1
 fi
-echo '[*] If needed, you can (re)install the bindings from `./unicornafl/bindings/python` using `python setup.py install`'
+echo '[*] If needed, you can (re)install the bindings in `./unicornafl/bindings/python` using `pip install --force .`'
 
 cd ../../ || exit 1
 
diff --git a/unicorn_mode/samples/speedtest/rust/Cargo.toml b/unicorn_mode/samples/speedtest/rust/Cargo.toml
index 766b2f27..73e6ba4c 100644
--- a/unicorn_mode/samples/speedtest/rust/Cargo.toml
+++ b/unicorn_mode/samples/speedtest/rust/Cargo.toml
@@ -11,5 +11,5 @@ panic = "abort"
 
 [dependencies]
 unicornafl = { path = "../../../unicornafl/bindings/rust/", version="1.0.0" }
-capstone="0.10.0"
+capstone="0.11.0"
 libc="0.2.66"
diff --git a/unicorn_mode/unicornafl b/unicorn_mode/unicornafl
-Subproject 06796154996fef2d92ccd172181ee0cdf363195
+Subproject f2cede37a75bbd4a9b9438f0277727b5d462057