title: Ruby Telnet Lib - Weird Response
body: <p>I am trying to execute cmds on a remote CPU through telnet.  While some commands sent (through Ruby's stdlib for telnet) are successful, others are giving me a weird response:</p>
  
  <blockquote>
    <p>*===============================================================<br>
    Welcome to Microsoft Telnet Server.<br>
    *===============================================================<br>
    C:\Documents and Settings\UserJW>ls<br>
    Desktop<br>
    Favorites<br>
    My Documents<br>
    Start Menu<br>
    Sti_Trace.log  </p>
    
    <p>C:\Documents and Settings\UserJW>cd\<br>
    More?  </p>
  </blockquote>
  
  <p>Why is telnet giving me this "More?" response, as if expecting something?</p>
  
  <p>In the code, I am simply connecting to remote CPU, logging in, and sending commands:</p>
  
  <pre><code>@connection = Net::Telnet.new(...)  
  @connection.login( user, pwd )  
  @connection.cmd(...)  
  </code></pre>
  
  <p>Any help would be appreciated.  </p>
  
  <p>Thanks,
  J</p>
  
  <p>**EDIT:</p>
  
  <p><code>@connection = Net::Telnet.new(<br>
  "Host" =&gt; machine,<br>
  "Prompt" =&gt; /[A-Za-z]:\\.*&gt;\z/n,<br>
  "Timeout" =&gt; 3,<br>
  "Output_log" =&gt; output )<br>
  @connection.login( user, pwd )<br>
  @connection.cmd( 'ls' )<br>
  @connection.cmd( 'ls' )
  </code></p>
  
  <p>output...  </p>
  
  <blockquote>
    <p>C:\Documents and Settings\UserJW><br>
    ls<br>
    Desktop<br>
    Favorites<br>
    My Documents<br>
    Start Menu<br>
    Sti_Trace.log<br>
    C:\Documents and Settings\UserJW><br>
    ls<br>
    More?  </p>
  </blockquote>
  
  <p>I can't even send more than one command, apparently. Is my Prompt regex wrong? I'm trying to allow..  </p>
  
  <p>C:[anything...]></p>