diff options
author | Dominik Maier <domenukk@gmail.com> | 2020-04-17 17:49:22 +0200 |
---|---|---|
committer | Dominik Maier <domenukk@gmail.com> | 2020-04-21 13:14:34 +0200 |
commit | cfb11177cd40f481fdc3d29ed969f9e67b4f5541 (patch) | |
tree | 505a4cbdbd8673a4426dd5f2bd288b5d2f055e31 | |
parent | 0a1979fd2074c4e85d0a8945e18501b970731e0e (diff) | |
download | afl++-cfb11177cd40f481fdc3d29ed969f9e67b4f5541.tar.gz |
submodule
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | .gitmodules | 3 | ||||
-rwxr-xr-x | unicorn_mode/build_unicorn_support.sh | 33 | ||||
m--------- | unicorn_mode/unicornafl | 0 |
4 files changed, 25 insertions, 12 deletions
diff --git a/.gitignore b/.gitignore index c8a92b7d..5a7f9408 100644 --- a/.gitignore +++ b/.gitignore @@ -42,7 +42,6 @@ qemu_mode/libcompcov/compcovtest as ld qemu_mode/qemu-* -unicorn_mode/unicornafl/ unicorn_mode/samples/*/\.test-* unicorn_mode/samples/*/output/ core\.* diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 00000000..2292a6df --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "unicorn_mode/unicornafl"] + path = unicorn_mode/unicornafl + url = git@github.com:AFLplusplus/unicornafl.git diff --git a/unicorn_mode/build_unicorn_support.sh b/unicorn_mode/build_unicorn_support.sh index 8297e13f..0c84c07b 100755 --- a/unicorn_mode/build_unicorn_support.sh +++ b/unicorn_mode/build_unicorn_support.sh @@ -33,7 +33,7 @@ # You must make sure that Unicorn Engine is not already installed before # running this script. If it is, please uninstall it first. -UNICORNAFL_VERSION='afl++2.64c' +UNICORNAFL_VERSION="$(cat ./UNICORNAFL_VERSION)" echo "=================================================" echo "UnicornAFL build script" @@ -146,21 +146,32 @@ fi echo "[+] All checks passed!" echo "[*] Making sure unicornafl is checked out" -rm -rf unicornafl # workaround for travis ... sadly ... -#test -d unicorn && { cd unicorn && { git stash ; git pull ; cd .. ; } } -test -d unicornafl || { - CNT=1 - while [ '!' -d unicornafl -a "$CNT" -lt 4 ]; do - echo "Trying to clone unicornafl (attempt $CNT/3)" - git clone https://github.com/AFLplusplus/unicornafl - CNT=`expr "$CNT" + 1` - done -} + +git status 1>/dev/null 2>/dev/null +if [ $? -eq 0 ]; then + echo "[*] initializing unicornafl submodule" + git submodule init || exit 1 + git submodule update 2>/dev/null # ignore errors +else + echo "[*] cloning unicornafl" + rm -rf unicornafl # workaround for travis ... sadly ... + #test -d unicorn && { cd unicorn && { git stash ; git pull ; cd .. ; } } + test -d unicornafl || { + CNT=1 + while [ '!' -d unicornafl -a "$CNT" -lt 4 ]; do + echo "Trying to clone unicornafl (attempt $CNT/3)" + git clone https://github.com/AFLplusplus/unicornafl + CNT=`expr "$CNT" + 1` + done + } +fi + test -d unicornafl || { echo "[-] not checked out, please install git or check your internet connection." ; exit 1 ; } echo "[+] Got unicornafl." cd "unicornafl" || exit 1 echo "[*] Checking out $UNICORNAFL_VERSION" +sh -c 'git stash && git stash drop' 1>/dev/null 2>/dev/null git checkout "$UNICORNAFL_VERSION" || exit 1 echo "[*] making sure config.h matches" diff --git a/unicorn_mode/unicornafl b/unicorn_mode/unicornafl new file mode 160000 +Subproject 89fd1f66912c8e0918ba0658b16bda204607e44 |