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,

127.0.0.1 127.0.0.1

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 reply to Re^2: Telnet list of IP and get information stored to a file by sanju7
in thread Telnet list of IP and get information stored to a file by sanju7

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.