Skip to content

Instantly share code, notes, and snippets.

@hbastidas
Last active April 15, 2024 14:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hbastidas/38944d04561de5a4042a678f4082226b to your computer and use it in GitHub Desktop.
Save hbastidas/38944d04561de5a4042a678f4082226b to your computer and use it in GitHub Desktop.
requiere parallel command https://www.gnu.org/software/parallel/
#!/bin/bash
generate_and_send_request() {
cod=$(( RANDOM % 9999 + 1 ))
pass=$(( RANDOM % 9999 + 1 ))
tel=$(( RANDOM % 9999 + 1 ))
curl -s -X POST "https://inr.rrocharia.za.com/" \
-H "User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:123.0) Gecko/20100101 Firefox/123.0" \
-H "Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8" \
-H "Accept-Language: en" \
-H "Content-Type: application/x-www-form-urlencoded" \
-H "Upgrade-Insecure-Requests: 1" \
-H "Sec-Fetch-Dest: document" \
-H "Sec-Fetch-Mode: navigate" \
-H "Sec-Fetch-Site: same-origin" \
-H "Sec-Fetch-User: ?1" \
--data-urlencode "cod=$cod" \
--data-urlencode "pass=$pass" \
--data-urlencode "tel=$tel" >/dev/null 2>&1
}
export -f generate_and_send_request
# Número de solicitudes concurrentes que deseas enviar
num_requests=59
# Ejecutar las solicitudes en paralelo de forma indefinida
while true; do
seq $num_requests | parallel -j $num_requests generate_and_send_request
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment