nyx references
ADD
nyx_mode/LIBNYX_VERSION
+ecbcb2d

ADD
nyx_mode/PACKER_VERSION
+f91742c

ADD
nyx_mode/QEMU_NXY_VERSION
+acc90e462b

MODIFY
nyx_mode/build_nyx_support.sh
nyx_mode/build_nyx_support.sh
@@ -39,27 +39,27 @@ test -d libnyx || { echo "[-] Not checked out, please install git or check your
echo "[*] checking packer init.cpio.gz ..."
if [ ! -f "packer/linux_initramfs/init.cpio.gz" ]; then
cd packer/linux_initramfs/
- sh pack.sh
+ sh pack.sh || exit 1
cd ../../
fi
echo "[*] Checking libnyx ..."
if [ ! -f "libnyx/libnyx/target/release/liblibnyx.a" ]; then
cd libnyx/libnyx
- cargo build --release
+ cargo build --release || exit 1
cd ../../
fi
echo "[*] Checking QEMU-Nyx ..."
if [ ! -f "QEMU-Nyx/x86_64-softmmu/qemu-system-x86_64" ]; then
cd QEMU-Nyx/
- ./compile_qemu_nyx.sh
+ ./compile_qemu_nyx.sh || exit 1
cd ..
fi
echo "[*] Checking libnyx.so ..."
if [ -f "libnyx/libnyx/target/release/liblibnyx.so" ]; then
- cp -v libnyx/libnyx/target/release/liblibnyx.so ../libnyx.so
+ cp -v libnyx/libnyx/target/release/liblibnyx.so ../libnyx.so || exit 1
else
echo "[ ] libnyx.so not found..."
exit 1

MODIFY
nyx_mode/packer
nyx_mode/packer
-Subproject commit 87837335d6a9834516aacf4121cbe0e2b9692125
+Subproject commit f91742ce6c51eee133b5675edd68f39202785db1

ADD
nyx_mode/update_ref.sh
+#/bin/sh
+
+##################################################
+# AFL++ internal tool to update nyx references.
+# Usage: ./update_ref.sh
+# It will take HEAD of all the repos!
+##################################################
+
+if [ "$NEW_VERSION" = "-h" ]; then
+ echo "Internal script to update bound qemuafl version."
+ echo
+ echo "Usage: ./update_ref.sh"
+ echo "t will take HEAD of all the repos!"
+ echo "-h to show this help screen."
+ exit 1
+fi
+
+git submodule init && git submodule update || exit 1
+
+UC_VERSION_FILE='./LIBNYX_VERSION'
+NEW_VERSION=""
+
+cd ./libnyx || exit 1
+git fetch origin main 1>/dev/null || exit 1
+git stash 1>/dev/null 2>/dev/null
+git stash drop 1>/dev/null 2>/dev/null
+git checkout main
+git pull origin main 1>/dev/null || exit 1
+
+NEW_VERSION=$(git rev-parse --short HEAD)
+
+if [ -z "$NEW_VERSION" ]; then
+ echo "Error getting version."
+ exit 1
+fi
+
+git checkout "$NEW_VERSION" || exit 1
+
+cd ..
+
+rm "$UC_VERSION_FILE"
+echo "$NEW_VERSION" > "$UC_VERSION_FILE"
+
+echo "Done. New XXX version is $NEW_VERSION."
+
+
+UC_VERSION_FILE='./PACKER_VERSION'
+NEW_VERSION=""
+
+cd ./packer || exit 1
+git fetch origin main 1>/dev/null || exit 1
+git stash 1>/dev/null 2>/dev/null
+git stash drop 1>/dev/null 2>/dev/null
+git checkout main
+git pull origin main 1>/dev/null || exit 1
+
+NEW_VERSION=$(git rev-parse --short HEAD)
+
+if [ -z "$NEW_VERSION" ]; then
+ echo "Error getting version."
+ exit 1
+fi
+
+git checkout "$NEW_VERSION" || exit 1
+
+cd ..
+
+rm "$UC_VERSION_FILE"
+echo "$NEW_VERSION" > "$UC_VERSION_FILE"
+
+echo "Done. New XXX version is $NEW_VERSION."
+
+
+UC_VERSION_FILE='./QEMU_NXY_VERSION'
+NEW_VERSION=""
+
+cd ./QEMU-Nyx || exit 1
+git fetch origin qemu-nyx-4.2.0 1>/dev/null || exit 1
+git stash 1>/dev/null 2>/dev/null
+git stash drop 1>/dev/null 2>/dev/null
+git checkout qemu-nyx-4.2.0
+git pull origin qemu-nyx-4.2.0 1>/dev/null || exit 1
+
+NEW_VERSION=$(git rev-parse --short HEAD)
+
+if [ -z "$NEW_VERSION" ]; then
+ echo "Error getting version."
+ exit 1
+fi
+
+git checkout "$NEW_VERSION" || exit 1
+
+cd ..
+
+rm "$UC_VERSION_FILE"
+echo "$NEW_VERSION" > "$UC_VERSION_FILE"
+
+echo "Done. New XXX version is $NEW_VERSION."
+

nyx references