我需要幫助修改此代碼來掃描多重範圍。它在perl中,但是我相信你可以幫助我弄清楚如何讓它開始並結束並掃描這兩點之間的所有IP。這裏是代碼:需要幫助來設置參數
#!C:\Program Files\perl\bin\Perl.exe -w
# ------------------------------------------------------------ #
use Net::Ping;
use LWP::UserAgent;
# ------------------------------------------------------------ #
# my $basenet = "192.168.240"; #
# my $start_host = 1; #
# my $end_host = 25; #
# ------------------------------------------------------------ #
$num_args = $#ARGV + 1;
if ($num_args != 3) {
print "Usage: perl.pl [network-base] [start_ip] [end_ip]\n\n";
print "Example: perl.pl 192.168.1 20 44\n";
print "This will run the check on these IP's: 192.168.1.20-44.\n";
exit -1;
}
my $basenet=$ARGV[0];
my $start_host=$ARGV[1];
my $end_host=$ARGV[2];
我猜測它需要第四個參數。像
my $ extranet = $ ARGV [3];
請幫忙。
請[編輯]你的問題,用正確的標記代碼。請參閱[markdown help](http://stackoverflow.com/help/formatting)瞭解有關這些工作原理的詳細信息。請適當標記代碼塊和內聯代碼。現在很難閱讀你的問題。 – simbabque
我試圖更好地設置自己的問題的格式,但我無法確定你在幾個地方的含義。請修復它。 – Borodin
你能定義**多重範圍**的含義嗎?我不知道意思。 – Arijit