mirror of https://github.com/dirtbags/moth.git
Modify smash script to trigger the bug
This commit is contained in:
parent
03247983bb
commit
cf79c8ec5a
|
@ -1,26 +1,16 @@
|
||||||
#! /bin/sh
|
#! /bin/sh
|
||||||
|
|
||||||
BASEURL=http://localhost:8080
|
## Run two of these to trigger the race condition from
|
||||||
|
|
||||||
case "$1" in
|
BASEURL=http://localhost:8080
|
||||||
a)
|
|
||||||
URL=$BASEURL/answer
|
URL=$BASEURL/answer
|
||||||
;;
|
|
||||||
b)
|
|
||||||
URL=$BASEURL/puzzles.json
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
echo "Usage: $0 a|b" 1>&2
|
|
||||||
exit 1
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
while true; do
|
while true; do
|
||||||
curl \
|
curl \
|
||||||
-X POST \
|
-X POST \
|
||||||
-F "cat=base" \
|
-F "cat=byobf" \
|
||||||
-F "points=1" \
|
-F "points=10" \
|
||||||
-F "id=test" \
|
-F "id=test" \
|
||||||
-F "answer=moo" \
|
-F "answer=6" \
|
||||||
$URL
|
$URL
|
||||||
done
|
done
|
||||||
|
|
Loading…
Reference in New Issue