random/surveymonkey-bot/bot.sh
2020-04-06 13:29:25 +02:00

12 wiersze
799 B
Bash
Executable file

#!/bin/sh
# pew pew pew
# per farlo martellare, da root
# while true; do torsocks ./bot.sh; kill -HUP $(pidof tor); sleep 1; done
tempfile=$(mktemp)
cookie_jar=$(mktemp)
user_agent="User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Firefox/68.0"
survey_url="https://it.surveymonkey.com/r/LYCK7TZ"
curl --silent $survey_url -o $tempfile -c $cookie_jar
survey_data=$(cat $tempfile | grep survey_data | sed 's/ /\n/g' | grep value | cut -d '"' -f 2)
curl --silent -L -c $cookie_jar -H "$user_agent" -F "324391492=2147689223" -F "324391492_other=XM24" -F "survey_data=$survey_data" -F "is_previous=false" -F "disable_survey_buttons_on_submit=" 'https://it.surveymonkey.com/r/LYCK7TZ' | grep -E "(thanks-message|error-id)" | cut -d ">" -f 2 | cut -d '<' -f 1
rm $tempfile $cookie_jar