From 3d6855c00d233803c370ba7b0cb7c0b18b378d16 Mon Sep 17 00:00:00 2001 From: hacrot3000 Date: Tue, 26 Apr 2022 17:09:14 +0700 Subject: [PATCH 1/2] Correct deps.sh for new unicorn version New unicorn removed make.sh file. --- deps.sh | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/deps.sh b/deps.sh index 02e7f43..1710bd6 100755 --- a/deps.sh +++ b/deps.sh @@ -6,7 +6,7 @@ echo " https://github.com/unicorn-engine/unicorn/blob/master/docs/COMPILE-NIX.md echo echo "If you're on Ubuntu, you want to do this first:" echo " sudo apt-get update" -echo " sudo apt-get install python-pip build-essential git cmake python-dev libglib2.0-dev" +echo " sudo apt-get install python3-pip python-is-python3 build-essential git cmake python-dev libglib2.0-dev" echo echo "If you're on a Mac, do this first:" echo " brew install pkg-config glib cmake" @@ -39,7 +39,10 @@ echo echo "[*] Building Unicorn" cd "$build" git clone https://github.com/unicorn-engine/unicorn.git -cd unicorn && ./make.sh +cd unicorn && \ +mkdir build; cd build && \ +cmake .. -DCMAKE_BUILD_TYPE=Release && \ +make echo echo "[*] Installing projects and Python bindings (using sudo)" @@ -49,7 +52,7 @@ cd "$build/keystone/bindings/python" && sudo make install cd "$build/capstone" && sudo make install cd "$build/capstone/bindings/python" && sudo make install -cd "$build/unicorn" && sudo ./make.sh install +cd "$build/unicorn/build" && sudo make install cd "$build/unicorn/bindings/python" && sudo make install which ldconfig &>/dev/null && sudo ldconfig From 7b74ccae19a091647c50a666e934bfaafe877ebc Mon Sep 17 00:00:00 2001 From: hacrot3000 Date: Tue, 26 Apr 2022 17:52:53 +0700 Subject: [PATCH 2/2] Correct testing Python import SyntaxError Testing Python import: File "", line 1 import capstone, unicorn, keystone; capstone.CS_ARCH_X86, unicorn.UC_ARCH_X86, keystone.KS_ARCH_X86; print 'works.' ^ SyntaxError: invalid syntax --- deps.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deps.sh b/deps.sh index 1710bd6..7776e55 100755 --- a/deps.sh +++ b/deps.sh @@ -61,4 +61,4 @@ echo echo "All done!" echo echo -n "Testing Python import: " -python -c "import capstone, keystone, unicorn; capstone.CS_ARCH_X86, unicorn.UC_ARCH_X86, keystone.KS_ARCH_X86; print 'works.'" +python -c "import capstone, keystone, unicorn; capstone.CS_ARCH_X86, unicorn.UC_ARCH_X86, keystone.KS_ARCH_X86; print('works.')"