I am rather stuck on a Net::Telnet problem, and since I am a bit high on cough syrup I cannot locate the solution.
The problem I am encountering is this script is supposed to change passwords and as the log shows it does not send out any thing at all beyond passwd
> 0x00000: 2f 62 69 6e 2f 70 61 73 73 77 64 0d 0a /bin/pa +sswd.. < 0x00000: 2f / < 0x00000: 62 69 6e 2f 70 61 73 73 77 64 0d 0a 70 61 73 73 bin/pas +swd..pass < 0x00010: 77 64 3a 20 20 43 68 61 6e 67 69 6e 67 20 70 61 wd: Ch +anging pa < 0x00020: 73 73 77 6f 72 64 20 66 6f 72 20 70 72 69 65 68 ssword +for prieh < 0x00030: 65 63 6b 0d 0a eck.. < 0x00000: 45 6e 74 65 72 20 6c 6f 67 69 6e 28 4e 49 53 2b Enter l +ogin(NIS+ < 0x00010: 29 20 70 61 73 73 77 6f 72 64 3a 20 ) passw +ord:
the relivent code snipit is
$telnet->dump_log("log.log"); $telnet->cmd($PASSWD) or report_error("ERROR", "No password prompt + found, contact Information Technologies: "); $telnet->waitfor('/password: ?$/i') or report_error("ERROR", "No p +assword prompt found, contact Information Technologies: "); $telnet->print($password); $telnet->waitfor('/password: ?$/i') or report_error("ERROR", "No p +assword prompt found, contact Information Technologies: "); $telnet->print($new_password); $telnet->waitfor('/password: ?$/i') or report_error("ERROR", "No p +assword prompt found, contact Information Technologies: "); $telnet->print($new_password); $telnet->waitfor('/changed/');
in addition to not sending passwords out it also does not call the  report_error function found after the or and instead uses the default error action (which I have changed to call report_error rather then die) i am assuming this is a timeout which calls this error, however, why is it not calling the or statement?

i cannot determine what is going on in this, might i enlist some aid.
jcpunk

by the way thanks for all the help that was, is, and will be


In reply to telnet, passwords, and other challenges to my cough syrup ridden mind by jcpunk

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.