in reply to Cisco PIX show command via telnet - unable to retrieve correct value

I have two simple suggestions.

  1. Why not put a debugging statement inside the while loop which sets @strings[$i]? If you add a simple print $line; in there it will give you a much better idea of what your script is receiving back from the router. This may or may not be different from what wireshark is telling you that the router is sending back.
  2. Your script has no use strict; and does not have warnings enabled. As a consequence you may be accidentally setting or not using some of the global variables.

Hopefully use of these two modifications will shine a light on what's actually happening.

Replies are listed 'Best First'.
Re^2: Cisco PIX show command via telnet - unable to retrieve correct value
by kylet (Initiate) on Mar 07, 2013 at 11:32 UTC
    Thanks for the reponse Hippo. I added in the 'print $line' statement and now the script returns:
     ¹♥ ¹☺ ¹♥ ¹☺ User Access Verification Password: Password: Password: 0
    I really am completely new to Perl so I think I need to go away and do my homework. Any other advise would be great though. Regards, Kyle