Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much

Re^6: Broken Net::Telnet::Netscreen module?

by spivey49 (Monk)
on Aug 13, 2008 at 21:07 UTC ( #704222=note: print w/replies, xml ) Need Help??

in reply to Re^5: Broken Net::Telnet::Netscreen module?
in thread Broken Net::Telnet::Netscreen module?

Well, we did fix another problem. Errors would have been returned incorrectly by the module with out revising the regex.

=~/\^-/ works too.

Data::Dumper returns what I expected, the command sent to the firewall. I tried commenting out the error check as well with the same results. The script exits silently, no warnings, no errors.

Replies are listed 'Best First'.
Re^7: Broken Net::Telnet::Netscreen module?
by jethro (Monsignor) on Aug 13, 2008 at 21:47 UTC

    The trace you showed before seems to show that the method error() from was called and the program died in line 535 of (there is a die statement there). If I'm right you have to find out why error() is called.

    You can do this for example with the debugger. Set a breakpoint at the foreach line in unsetValue() and single step from there. Where exactly does the program stop? If you never reach the breakpoint, move the breakpoint to a previous line on the next run. If the error shows up only on the second run through unsetValue() 'c'ontinue at the first breakpoint and single step at the next stop

    You can also do this testing if you put print statements (like print "1\n"; <statements>; print "2\n";) between crucial statements and watch what number you see last. But the debugger is ultimately faster

    UPDATE: Just to make sure, /\^-/ searches for a literal '^-' somewhere in the string, not for '-' at the start of the string. That is what you want, right? And hopefully you didn't post the real password of your netscreen firewall, especially if it is accessible from the internet

      Thanks, I missed the die in the trace. Very odd all the checks I've been doing didn't pick that up either. I'll need to figure out why error() is being called. More specifically it's setting $mode to die I believe. That shouldn't be happening.

      I do want the literal '^-', it's the first two characters in the error messages. It's the real password, but it's also the default and it's in a lab, unaccessible from the internet.

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (4)
As of 2019-12-06 01:18 GMT
Find Nodes?
    Voting Booth?
    Strict and warnings: which comes first?

    Results (154 votes). Check out past polls.