|
|
@ -11,13 +11,13 @@ $dns=$ARGV[0];
|
|
|
|
|
|
|
|
|
|
|
|
if ($^O == "linux") {
|
|
|
|
if ($^O == "linux") {
|
|
|
|
$regex=qr/(?<bytes>[0-9]+ bytes) from (?<rhost>[a-z\.-]+) \((?<rip>[0-9\.]+)\).*seq=(?<rseq>[0-9]+).*time=(?<rms>[0-9\.]+) ms/;
|
|
|
|
$regex=qr/(?<bytes>[0-9]+ bytes) from (?<rhost>[a-z\.-]+) \((?<rip>[0-9\.]+)\).*seq=(?<rseq>[0-9]+).*time=(?<rms>[0-9\.]+) ms/;
|
|
|
|
$dedjex=qr/no answer yet for icmp_seq=(?<rseq>[0-9]+)/
|
|
|
|
$dedjex=qr/no answer yet for icmp_seq=(?<rseq>[0-9]+)/;
|
|
|
|
$pingcmd="ping -O"
|
|
|
|
$pingcmd="ping -O";
|
|
|
|
} elsif ($^O == "MSWin32") {
|
|
|
|
} elsif ($^O == "MSWin32") {
|
|
|
|
# untested lol
|
|
|
|
# untested lol
|
|
|
|
$regex=qr/Reply from (?<rip>[0-9\.]+).*bytes time=(?<rms>[0-9\.]+)ms.*/;
|
|
|
|
$regex=qr/Reply from (?<rip>[0-9\.]+).*bytes time=(?<rms>[0-9\.]+)ms.*/;
|
|
|
|
$dedjex=qr/Request timed out|Destination host unreachable/
|
|
|
|
$dedjex=qr/Request timed out|Destination host unreachable/;
|
|
|
|
$pingcmd="ping -t"
|
|
|
|
$pingcmd="ping -t";
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
print "IDK WHAT OS YOU ARE :(";
|
|
|
|
print "IDK WHAT OS YOU ARE :(";
|
|
|
|
exit 1;
|
|
|
|
exit 1;
|
|
|
|