mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-11 13:43:47 +01:00
Tools for working with directories of fuzzed stuff.
This commit is contained in:
parent
301eff0e90
commit
83e9918107
19
src/test/fuzz/fixup_filenames.sh
Executable file
19
src/test/fuzz/fixup_filenames.sh
Executable 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
14
src/test/fuzz/minimize.sh
Executable 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}"
|
||||
|
Loading…
Reference in New Issue
Block a user