mirror of
https://github.com/zardus/ctf-tools
synced 2024-12-04 18:29:26 +00:00
parent
5a22a7107d
commit
80f422f593
7 changed files with 10 additions and 63 deletions
|
@ -1,27 +1,5 @@
|
||||||
#!/bin/bash -ex
|
#!/bin/bash -ex
|
||||||
set -e -o pipefail
|
|
||||||
|
|
||||||
git clone --depth 1 https://github.com/keystone-engine/keystone.git
|
ctf-tools-pip install -U keystone
|
||||||
|
# seems to be broken?
|
||||||
source ctf-tools-venv-activate
|
#ctf-tools-pip3 install -U keystone
|
||||||
|
|
||||||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
|
||||||
|
|
||||||
mkdir -p keystone/build/
|
|
||||||
pushd keystone/build/
|
|
||||||
cmake -DCMAKE_INSTALL_PREFIX="$DIR" \
|
|
||||||
-DCMAKE_BUILD_TYPE=Release \
|
|
||||||
-DBUILD_SHARED_LIBS=ON \
|
|
||||||
-DLLVM_TARGETS_TO_BUILD="all" \
|
|
||||||
-G "Unix Makefiles" ..
|
|
||||||
make -j$(getconf _NPROCESSORS_ONLN) install
|
|
||||||
popd
|
|
||||||
|
|
||||||
pushd keystone/bindings/python
|
|
||||||
pip install -U -e .
|
|
||||||
# create a symlink that the python bindings can find the keystone lib
|
|
||||||
ln -s $(readlink -f ../../../lib/libkeystone.so.0) keystone/libkeystone.so
|
|
||||||
popd
|
|
||||||
|
|
||||||
# kstool doesn't find the lib. so let's rm it
|
|
||||||
rm -r bin/
|
|
||||||
|
|
|
@ -1,4 +0,0 @@
|
||||||
#!/bin/bash -ex
|
|
||||||
set -eu -o pipefail
|
|
||||||
|
|
||||||
pacman -Syu --needed --noconfirm cmake
|
|
|
@ -1,4 +0,0 @@
|
||||||
#!/bin/bash -ex
|
|
||||||
set -eu -o pipefail
|
|
||||||
|
|
||||||
apt-get -y install build-essential cmake
|
|
|
@ -4,10 +4,7 @@ set -e -o pipefail
|
||||||
source ctf-tools-venv-activate
|
source ctf-tools-venv-activate
|
||||||
|
|
||||||
pip uninstall -y keystone-engine || true
|
pip uninstall -y keystone-engine || true
|
||||||
|
#!/bin/bash -ex
|
||||||
|
|
||||||
if [[ -d keystone && -d keystone/build ]]; then
|
ctf-tools-pip uninstall -y keystone || true
|
||||||
export PREFIX="$PWD"
|
ctf-tools-pip3 uninstall -y keystone || true
|
||||||
pushd keystone/build
|
|
||||||
make uninstall
|
|
||||||
popd
|
|
||||||
fi
|
|
||||||
|
|
|
@ -1,18 +1,4 @@
|
||||||
#!/bin/bash -ex
|
#!/bin/bash -ex
|
||||||
set -e -o pipefail
|
|
||||||
|
|
||||||
git clone --depth 1 https://github.com/unicorn-engine/unicorn.git
|
ctf-tools-pip install -U unicorn
|
||||||
|
ctf-tools-pip3 install -U unicorn
|
||||||
source ctf-tools-venv-activate
|
|
||||||
|
|
||||||
pushd unicorn
|
|
||||||
echo "compiling unicorn"
|
|
||||||
UNICORN_QEMU_FLAGS="--python=$(which python)" PREFIX="$VIRTUAL_ENV" ./make.sh
|
|
||||||
echo "installing unicorn to $VIRTUAL_ENV"
|
|
||||||
UNICORN_QEMU_FLAGS="--python=$(which python)" PREFIX="$VIRTUAL_ENV" ./make.sh install
|
|
||||||
|
|
||||||
pushd bindings/python
|
|
||||||
#pip install -U .
|
|
||||||
make DEST_DIR="$VIRTUAL_ENV" install
|
|
||||||
popd
|
|
||||||
popd
|
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
#!/bin/bash -ex
|
#!/bin/bash -ex
|
||||||
set -eu -o pipefail
|
|
||||||
|
|
||||||
apt-get -y install libglib2.0-dev
|
apt-get -y install libglib2.0-dev
|
||||||
|
|
|
@ -1,9 +1,4 @@
|
||||||
#!/bin/bash -ex
|
#!/bin/bash -ex
|
||||||
|
|
||||||
ctf-tools-venv-activate
|
ctf-tools-pip uninstall -y unicorn || true
|
||||||
|
ctf-tools-pip3 uninstall -y unicorn || true
|
||||||
pip uninstall -y unicorn
|
|
||||||
|
|
||||||
pushd unicorn
|
|
||||||
PREFIX="$VIRTUAL_ENV" ./make.sh uninstall
|
|
||||||
popd
|
|
||||||
|
|
Loading…
Reference in a new issue