Tools for working with directories of fuzzed stuff.

This commit is contained in:
Nick Mathewson 2016-12-16 10:24:36 -05:00
parent 301eff0e90
commit 83e9918107
2 changed files with 33 additions and 0 deletions

View File

@ -0,0 +1,19 @@
#!/bin/sh
set -e
if [ ! -d "$1" ] ; then
echo "I need a directory"
exit 1
fi
for fn in "$1"/* ; do
prev=`basename "$fn"`
post=`sha256sum "$fn" | sed -e 's/ .*//;'`
if [ "$prev" == "$post" ] ; then
echo "OK $prev"
else
echo "mv $prev $post"
mv "$fn" "$1/$post"
fi
done

14
src/test/fuzz/minimize.sh Executable file
View File

@ -0,0 +1,14 @@
#!/bin/sh
set -e
if [ ! -d "$1" ] ; then
echo "I need a directory"
exit 1
fi
which=`basename "$1"`
mkdir "$1.out"
afl-cmin -i "$1" -o "$1.out" -m none "./src/test/fuzz/fuzz-${which}"