Add range check and message to nmap
This commit is contained in:
parent
2825e469fe
commit
ae62c9e403
@ -110,6 +110,12 @@ sub dodiscover {
|
||||
my @servernodes;
|
||||
my @iprange = split /,/, $ipranges;
|
||||
foreach my $range (@iprange) {
|
||||
send_message($args{reqcallback}, 0, "Processing range $range...");
|
||||
if ($range =~/\/(\d+)/){
|
||||
if ($1 > 16) {
|
||||
send_message($args{reqcallback}, 0, "The rarge is too large and may be time consuming. Broadcast is recommended.");
|
||||
}
|
||||
}
|
||||
`/usr/bin/nmap $range -sn -PE -n --send-ip -T5 `;
|
||||
my $nmapres = `/usr/bin/nmap $range -PE -p 427 -n --send-ip -T5 `;
|
||||
foreach my $line (split(/\n\n/,$nmapres)) {
|
||||
|
Loading…
Reference in New Issue
Block a user