shineyang has asked for the wisdom of the Perl Monks concerning the following question:

This node falls below the community's threshold of quality. You may see it by logging in.

Replies are listed 'Best First'.
Re: The problem about the module-"Net::telnet"
by tirwhan (Abbot) on Jul 13, 2007 at 09:17 UTC

    Oh dear...first of all, don't use telnet, it's insecure and exposes your password and data to anyone listening on the network. Any admin still allowing their users the use of telnet today oughta be fired on the spot IMO (except in the case of certain legacy OSes, of which HP-UX is not one, which don't support safe alternatives). Use ssh instead, it works on a myriad of platforms and is safe. Second, DON'T POST YOUR FREAKING USERNAME AND PASSWORD WITH IP-ADDRESS INCLUDED TO THE INTERNET FOR DOGSSAKE! I realise the IP is in RFC1918-space and thus not publicly addressable, but that doesn't mean the machine can't be reached by someone wanting to hack into it (especially when that someone is on or has access to the same network as you!).


    All dogma is stupid.

      I agree but ...some old version of HP-UX will be definitely be legacy. I recall it is not so easy to find an sshd tarball even for 10.20 and compiling it is a nightmare even for HP-UX gurus; it is easier to take an 11.0 tarball and copy in /usr/lib (of the 10.20) all the required libs, not for the faint of the heart;)

      cheers --stephan

        Pushing 11.00 libs to 10.20 is screaming for problems. Most likely will not work.

        For OpenSSL/OpenSSH depots for 10.20 and 11.00 did you have a look at my site?


        Enjoy, Have FUN! H.Merijn
Re: The problem about the module-"Net::telnet"
by rpanman (Scribe) on Jul 13, 2007 at 11:40 UTC
    Isn't the prompt regex wrong?
    $t->prompt('/TERM\s/=\s/(hp/)\s/');
    Shouldn't it be:
    $t->prompt('/TERM\s=\s\(hp\)\s/');
    Tested with:
    use strict; use warnings; my $actualPrompt = 'TERM = (hp) '; while (<DATA>){ chomp; $actualPrompt =~ /$_/ ? print "$_\tMatches\n" : print "$_\tDoes not +match\n"; }; __DATA__ TERM\s/=\s/(hp/)\s TERM\s=\s\(hp\)\s
    Output:
    TERM\s/=\s/(hp/)\s Does not match TERM\s=\s\(hp\)\s Matches
Re: The problem about the module-"Net::telnet"
by Zen (Deacon) on Jul 13, 2007 at 13:51 UTC
    I seem to recall someone getting fired for copy/pasting sensitive company code on perlmonks recently. Certainly posting a user/pass/ip qualifies.

    I see this was edited to blank out the personal info..did anyone blank out the constants that define it near the top, or is that his username/password/ip? Editors please check.
Re: The problem about the module-"Net::telnet"
by shineyang (Initiate) on Jul 13, 2007 at 15:36 UTC
    Dear all:
    Thanks a lot for your kindess. Thanks a lot for Corion's modification.
    I never do this mistake again.
    I ever used Rpanman's right regexp to test again. However, the problem still is existing!
    As for cub's recommendation, I have surfed your website, but I do not know where it is useful for me.
    Could you give more hints?

      cbu, not cub, but that aside. My site serves you with prebuilt recent perl binary depots for HP-UX 11.00, the system you are on. Both HP-UX 10.20 and HP-UX 11.00 are not supported anymore by HP, so you won't be able to get recent perl builds from them.


      Enjoy, Have FUN! H.Merijn