aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorvan Hauser <vh@thc.org>2020-12-08 12:36:19 +0100
committervan Hauser <vh@thc.org>2020-12-08 12:36:19 +0100
commit6d2ac3e3140faf8796fa569c36a715d4743c3988 (patch)
tree05f0f2b3ea25645d7057006ccab0923dbb68b2c2
parent8999023432b515e62b5074e5cba1ad2c5d866753 (diff)
downloadafl++-6d2ac3e3140faf8796fa569c36a715d4743c3988.tar.gz
fix grammar download script
-rwxr-xr-xcustom_mutators/grammar_mutator/build_grammar_mutator.sh21
1 files changed, 10 insertions, 11 deletions
diff --git a/custom_mutators/grammar_mutator/build_grammar_mutator.sh b/custom_mutators/grammar_mutator/build_grammar_mutator.sh
index 9251ff24..ef145dfe 100755
--- a/custom_mutators/grammar_mutator/build_grammar_mutator.sh
+++ b/custom_mutators/grammar_mutator/build_grammar_mutator.sh
@@ -106,36 +106,35 @@ git status 1>/dev/null 2>/dev/null
if [ $? -eq 0 ]; then
echo "[*] initializing grammar mutator submodule"
git submodule init || exit 1
- git submodule update ./grammar_mutator 2>/dev/null # ignore errors
+ git submodule update ./grammar-mutator 2>/dev/null # ignore errors
else
echo "[*] cloning grammar mutator"
- test -d grammar_mutator || {
+ test -d grammar-mutator || {
CNT=1
- while [ '!' -d grammar_mutator -a "$CNT" -lt 4 ]; do
- echo "Trying to clone grammar_mutator (attempt $CNT/3)"
+ while [ '!' -d grammar-mutator -a "$CNT" -lt 4 ]; do
+ echo "Trying to clone grammar-mutator (attempt $CNT/3)"
git clone "$GRAMMAR_REPO"
CNT=`expr "$CNT" + 1`
done
}
fi
-test -d grammar_mutator || { echo "[-] not checked out, please install git or check your internet connection." ; exit 1 ; }
+test -d grammar-mutator || { echo "[-] not checked out, please install git or check your internet connection." ; exit 1 ; }
echo "[+] Got grammar mutator."
-cd "grammar_mutator" || exit 1
+cd "grammar-mutator" || exit 1
echo "[*] Checking out $GRAMMAR_VERSION"
sh -c 'git stash && git stash drop' 1>/dev/null 2>/dev/null
git checkout "$GRAMMAR_VERSION" || exit 1
-cd ..
-
echo "[*] Downloading antlr..."
wget -c https://www.antlr.org/download/antlr-4.8-complete.jar
+cd ..
echo
echo
echo "[+] All successfully prepared!"
echo "[!] To build for your grammar just do:"
-echo " `cd grammar_mutator`"
-echo " `make GRAMMAR_FILE=/path/to/your/grammar`"
-echo "[+] You will find a JSON and RUBY grammar in grammar_mutator/grammars to play with."
+echo " cd grammar-mutator"
+echo " make GRAMMAR_FILE=/path/to/your/grammar"
+echo "[+] You will find a JSON and RUBY grammar in grammar-mutator/grammars to play with."
echo