Used strict - apprently this is best practices
This commit is contained in:
parent
f95c07c0a4
commit
c3b614b2a9
@ -1,5 +1,7 @@
|
|||||||
#!/usr/bin/perl
|
#!/usr/bin/perl
|
||||||
|
|
||||||
|
use strict;
|
||||||
|
|
||||||
use Term::ANSIColor;
|
use Term::ANSIColor;
|
||||||
|
|
||||||
if ($ARGV[0] !~ /[a-z0-9\.]+/) {
|
if ($ARGV[0] !~ /[a-z0-9\.]+/) {
|
||||||
@ -7,7 +9,11 @@ if ($ARGV[0] !~ /[a-z0-9\.]+/) {
|
|||||||
exit 1;
|
exit 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
$dns=$ARGV[0];
|
my $dns=$ARGV[0];
|
||||||
|
my $regex;
|
||||||
|
my $dedjex;
|
||||||
|
my $pingcmd;
|
||||||
|
|
||||||
|
|
||||||
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/;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user