Plankton has asked for the wisdom of the Perl Monks concerning the following question:
Friends
I have an simple "Asante Cable/DSL Router" which gets its IP address from my ISP. I wanted to write a short script that uses WWW::Mechanize to login and scrape out what my IP address is. So here's the scripts I wrote (Removing my actual password of course) ...
... when I run this I get ...#!/usr/bin/perl -w use strict; use WWW::Mechanize; use Data::Dumper; my $mech = WWW::Mechanize->new(); my $url = "http://192.168.123.254/begin.htm"; print "Getting $url ...\n"; $mech->get( $url ); print "Got!\n"; my $fields = { 'URL' => 'XXXXXXXX' }; #print Dumper ( $mech ); print "Submitting form ... \n"; my $r = $mech->submit_form( form_name => 'LOGIN', fields => $fields ); if ( $r->is_success ) { print "logged on!\n"; } else { print "Couldn't submit form:$!\n"; }
Anyone out there know why I might be getting this error and want I can do about it?Couldn't submit form:Connection reset by peer
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Get IP address from my Asante Cable/DSL router
by blue_cowdawg (Monsignor) on Mar 12, 2006 at 23:09 UTC | |
|
Re: Get IP address from my Asante Cable/DSL router
by rafl (Friar) on Mar 12, 2006 at 23:24 UTC | |
|
Re: Get IP address from my Asante Cable/DSL router
by NetWallah (Canon) on Mar 13, 2006 at 06:47 UTC |