Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re^2: Unable to get infor from telnet conection

by iug (Initiate)
on Nov 29, 2019 at 07:30 UTC ( [id://11109416]=note: print w/replies, xml ) Need Help??


in reply to Re: Unable to get infor from telnet conection
in thread Unable to get infor from telnet conection

Thanks #roboticus for your quick answer.

#!/usr/bin/env perl use Net::Telnet; print "reporting end of web server log files:\n"; my($input_log, $output_log, $dump_log); $input_log="./input_log.log"; $output_log="./output_log.log"; $dump_log="./dump_log.log"; $hostname = "127.0.0.1"; $telobj = new Net::Telnet (-host => $hostname ,-port => 23 ,-dump_log => $dump_log ,-input_log => $input_log ,-output_log => $output_log ,-telnetmode => '' ,-prompt => '/^]/' ); $rad = $telobj -> cmd ("get sn"); pop @rad; chomp @rad; print "\n"; $telobj -> close;

the command gives back a 6 digit string like 123456. de content of the dump_log is > 0x00000: 67 65 74 20 63 6f 6d 6d 73 0d 0a get comms.. < 0x00000: ff fd 03 ff fe 01 ff fb 01 ÿý.ÿþ.ÿû. Any idea?

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11109416]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (7)
As of 2024-03-28 19:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found