this script will test the server name of each system

this script will test the server name of each system

#!/usr/bin/perl

use Net::Telnet ;

open ( IN,"/tmp/IDC_IPs") or die "cannot open file " ;

while ( $ip=<IN>) {

$t = new Net::Telnet ( Timeout=>3, Errmode=>'return', port =>'25' );

$t->open("$ip");

$output1 = $t->getline ;

$t->print("ehlo data");

($output2) = $t->getline ;

chomp($output2);

chomp($ip);

print "$ip $output2\n" ;

}

close IN ;

No comments:

Other Articles

Enter your email address: