[extras] added ramdisk-create-osx.sh for Mac OS X systems

This commit is contained in:
Michael Rash
2015-06-30 21:24:00 -04:00
parent 814d9e1050
commit 788bf543c8
+27
View File
@@ -0,0 +1,27 @@
#!/bin/sh -x
#
# This script creates a ramdisk and clones the fwknop git repository
# into it. This is meant for AFL fuzzing cycles.
#
### 1GB
RSIZE=2097152
LABEL="ramdisk-for-fwknop"
RAMDISK=/Volumes/$LABEL
if [ -d $RAMDISK ]
then
echo "[*] $RAMDISK mount point already exists"
exit 1
fi
if [ -f extras/ramdisk/ramdisk-create-osx.sh ]
then
diskutil erasevolume HFS+ "$LABEL" `hdiutil attach -nomount ram://$RSIZE`
git clone . $RAMDISK/fwknop.git
else
echo "[*] Run this script from the top level fwknop sources directory"
exit 1
fi
exit $?