Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Net::Telnet output_log 1

Status
Not open for further replies.

labnotes

Technical User
Sep 1, 2003
33
0
0
CA
Hello

I am running perl and making telnet calls using the Net::Telnet module, overall Net::Telnet works great! One issue I am having is capturing what is coming back from some sites, when I do not know what to expect.

Here is my telnet session set up:

sub Telnet
{ #This function will make or at least try to make the telnet connetion

$telnet = new Net::Telnet(Timeout=>30,
Port=>$_[1],
Input_log=>$Debug_Fi,
Output_log=>$Debug_Fil,
Errmode=>sub{Telnet_Error(@_,@Telnet_err)}
);

$telnet->open($_[0]);
}#End of Telnet

When I connect to a site, and use the "match" statement and find a match the Input_log has text in it, but if I do not match anything the Input_log is empty. Is there a way to capture everything that is sent when you have no idea what to match?
 
you could use windump or tcpdump to capture all traffic on the telnet port, 23 as standard.

Paul
------------------------------------
Spend an hour a week on CPAN, helps cure all known programming ailments ;-)
 
Thank you .. I have not used tcpdump before, it looks like it will give me what I am after. Again thank you
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top