Fray117

Venus (WebTraffic BOT) Project

Jul 30th, 2018
205
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 3.81 KB | None | 0 0
  1. #!/bin/bash
  2. # Venus  v0.7
  3. # Project by Fray117, Traffic BOT Generator
  4. clear
  5. echo "Running on BASH${BASH_VERSION}"
  6. command -v curl >/dev/null 2>&1 || { echo >&2 "Curl is Required but it's not installed.  Aborting.\n"; exit 1; }
  7. command -v wget >/dev/null 2>&1 || { echo >&2 "Wget is Required but it's not installed.  Aborting.\n"; exit 1; }
  8. command -v nc >/dev/null 2>&1 || { echo >&2 "nc is Required but it's not installed.  Aborting.\n"; exit 1; }
  9. command -v lolcat >/dev/null 2>&1 || { echo >&2 "lolcat is Optional but it's not installed.\n"; lolcat= false; }
  10. echo -e "GET http://alexa.com HTTP/1.0\n\n" | nc alexa.com 80 > /dev/null 2>&1
  11. if [ $? -eq 0 ]; then
  12.     echo "Internet Connected Successfully.\n"
  13. else
  14.     echo "Internet can't be reached\n"; exit;
  15. fi
  16. # check if user-agents list is existed
  17. if [[ -f agents.txt ]]; then
  18.   Agents= true
  19. else
  20.   echo "User Agents List not Existed."
  21.   Agents= false
  22. fi
  23. # check if proxy list is existed
  24. if [[ -f proxies.txt ]]; then
  25.   echo "Loading Proxy List"
  26.   UseProxy= true
  27. else
  28.   echo "Proxies List not Existed"
  29.   UseProxy= false
  30. fi
  31.  
  32. LoadConfig(){
  33.   if [[ $Agents = true ]]; then
  34.     IFS=$'\r\n' GLOBIGNORE='*' command eval  'agents=($(cat user-agents.txt))'
  35.     size=${#agents[@]}
  36.     agent=$(($RANDOM % $size))
  37.   fi
  38.   if [[ $Proxy = true ]]; then
  39.     IFS=$'\r\n' GLOBIGNORE='*' command eval  'proxies=($(cat user-agents.txt))'
  40.     size=${#proxies[@]}
  41.     proxy=$(($RANDOM % $size))
  42.   fi
  43. }
  44.  
  45. sendRequest(){
  46.   LoadConfig
  47.   if [[ $Agents = true ]]; then
  48.     if [[ $Proxy = true ]]; then
  49.       curl --compressed -A ${agents[$agent]} -x ${proxies[$proxy]} $URL -so /dev/null 2>&1
  50.     else
  51.       curl --compressed -A ${agents[$agent]} $URL -so /dev/null 2>&1
  52.     fi
  53.   else
  54.     if [[ $Proxy = true ]]; then
  55.       curl --compressed -x ${proxies[$proxy]} $URL -so /dev/null 2>&1
  56.     else
  57.       curl --compressed $URL -so /dev/null 2>&1
  58.     fi
  59.   fi
  60. }
  61. sleep 1
  62. LOGO(){
  63.   printf "'##::::'##:'########:'##::: ##:'##::::'##::'######::\n"
  64.   printf " ##:::: ##: ##.....:: ###:: ##: ##:::: ##:'##... ##:\n"
  65.   printf " ##:::: ##: ##::::::: ####: ##: ##:::: ##: ##:::..::\n"
  66.   printf " ##:::: ##: ######::: ## ## ##: ##:::: ##:. ######::\n"
  67.   printf ". ##:: ##:: ##...:::: ##. ####: ##:::: ##::..... ##:\n"
  68.   printf ":. ## ##::: ##::::::: ##:. ###: ##:::: ##:'##::: ##:\n"
  69.   printf "::. ###:::: ########: ##::. ##:. #######::. ######::\n"
  70.   printf ":::...:::::........::..::::..:::.......::::......:::\n"
  71. }
  72. MENU() {
  73.   clear
  74.   if [[ lolcat = false ]]; then
  75.     LOGO
  76.   else
  77.     LOGO | lolcat
  78.   fi
  79.   read -p 'URL: ' URL
  80.   if [[ $URL = '' ]]; then
  81.     clear
  82.     LOGO
  83.     read -p 'URL: ' URL
  84.   fi;
  85.   read -p 'View: ' VIEW
  86.   if [[ $VIEW = '' ]]; then
  87.     clear
  88.     LOGO
  89.     echo "URL: $URL"
  90.     read -p 'View: ' VIEW
  91.   fi;
  92.   VIEWER=$VIEW
  93.   read -p 'Delay (seconds): ' DELAY
  94.   if [[ $DELAY = '' ]]; then
  95.     clear
  96.     LOGO
  97.     echo "URL: $URL"
  98.     echo "View: $VIEW"
  99.     read -p 'Delay (seconds): ' DELAY
  100.   fi
  101.   clear
  102. }
  103.  
  104. GENERATE(){
  105.   printf "Page Size: $SIZE\nCompressed Page Size: $CSIZE\nMinimum Bandwidth Used: $BW kb"
  106.   printf "URL: $URL\nVIEW: $VIEW\n"
  107.   sendRequest
  108.   (( VIEW-- ))
  109.   sleep $DELAY
  110.   if [[ $VIEW = 0 ]]; then
  111.     clear
  112.     echo $URL viewed $VIEWER bots
  113.     exit
  114.   fi
  115.   clear
  116.   GENERATE
  117. }
  118.  
  119. MENU
  120. echo "Checking Connection to $URL"
  121. # echo -e "GET $URL HTTP/1.0\n\n" | nc $URL 80 > /dev/null 2>&1
  122. wget -q --spider $URL
  123. if [ $? -eq 0 ]; then
  124.   SIZE=$(curl -so /dev/null $URL -w '%{size_download}')
  125.   CSIZE=$(curl --compressed -so /dev/null $URL -w '%{size_download}')
  126.   RAWBW=$(expr $CSIZE \* $VIEW)
  127.   BW=$(expr $RAWBW / 1024)
  128.   echo "Connected to $URL"
  129.   printf "Page Size: $SIZE\nCompressed Page Size: $CSIZE\nMinimum Bandwidth Used: $BW kb"
  130.   sleep 5
  131. else
  132.     echo "Connection to $URL can't be reached\n"; exit;
  133. fi
  134. sleep 1
  135. GENERATE
Add Comment
Please, Sign In to add comment