This commit is contained in:
Michael Rash
2015-05-20 18:25:33 -07:00
+21 -3
View File
@@ -1,8 +1,26 @@
#!/bin/sh -x
#
# This script creates a ramdisk and clones the fwknop git repository
# into it. This is meant for AFL fuzzing cycles.
#
RSIZE=768M
RAMDISK=/tmp/afl-ramdisk
mkdir $RAMDISK && chmod 777 $RAMDISK
mount -t tmpfs -o size=768M tmpfs $RAMDISK
cd ../.. && git clone . $RAMDISK/fwknop.git
if [ -d $RAMDISK ]
then
echo "[*] $RAMDISK directory already exists"
exit 1
fi
if [ -f extras/ramdisk/ramdisk-create.sh ]
then
mkdir $RAMDISK && chmod 777 $RAMDISK
mount -t tmpfs -o size=$RSIZE tmpfs $RAMDISK
git clone . $RAMDISK/fwknop.git
else
echo "[*] Run this script from the top level fwknop sources directory"
exit 1
fi
exit $?