Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/perl
- use warnings;
- use strict;
- use IO::Socket::INET;
- use IO::Socket::SSL;
- use Net::Ping;
- use constant TRUE => 1;
- use constant FALSE => 0;
- my $attacker;
- my $listener;
- my $IP;
- my @time;
- my $AM;
- my @prot = ('tcp','udp');
- my $IP_P;
- my @working;
- my $wc = 0;
- my $login = (getpwuid $>);
- my $icmp_flood;
- die "[-] Please run this application as root" if $login ne 'root';
- if (undef(@ARGV))
- {
- print "[+] It is recomended to run this script in the background by inserting & after name";
- }
- print "[+] Intialising loading modules procedures... \n";
- print "[+] Picking a random host on which program will listen \n";
- my $LP = int(rand (65500)) || die "[-] Hmm there is something odd, better check your perl version \n";
- print "[+] Deploying listener on $LP \n";
- if (
- $listener = IO::Socket::INET->new(
- Port => $LP,
- Listen => 1,
- Proto => 'tcp',
- Reuse => 1)
- )
- {
- $working[$wc++] = TRUE;
- }
- elsif (undef($working[1]))
- {
- print "[-] Script failed at creating listener \n";
- $working[$wc++] = FALSE;
- return FALSE;
- }
- print "[+] Sketching SYN flood packet \n";
- # This part might be faulty :?
- $attacker = IO::Socket::INET->new(
- PeerPort => $IP_P,
- PeerAddr => $IP,
- Proto => $prot[0]);
- die "[-] Failed at sketching packets: $! \n" if undef($attacker);
- print "[+] Crafting ping packet against hosts \n";
- $icmp_flood = Net::Ping->new("icmp");
- #$ping->ping($IP)
- print "[+] Everything initialized listening for packets now.... \n";
Advertisement
Add Comment
Please, Sign In to add comment