Perl: the Markov chain saw | |
PerlMonks |
Re^2: Telnet list of IP and get information stored to a fileby sanju7 (Acolyte) |
on Jul 26, 2010 at 15:04 UTC ( [id://851382]=note: print w/replies, xml ) | Need Help?? |
The list has some 300 IP address or network. It means so many thousands of IP address, I don't know how nmap would be useful here. The best logis i figured, (a) read the list (b) pick the ip address and process it (c) if ip address has asterisk(x.x.x.*) expand it to its all possible ip addresses (x.x.x.1/2/3..254) . (d) process it by script. (e) if telnet successful the app would throw its name etc .. record it on a file. (f) if fails go to next ip address. So the expansion is still a big deal here because 85% of the list is ip addresses like 3.3.3.* (yy.xxx.zz.*) format. I am thinking of Regex here.About error: Since my code woould fail to expand ip addresses which has last quadrant I tested the it with a IP list consisting of localhosts like below,
If you know any easier way to expand the list of IP which has asterisk at last quadrant to the whole network i can test that portion. And yes this code is the one that has generated the error, i haven't altered things except IP list etc.
In Section
Seekers of Perl Wisdom
|
|