use strict; use WWW::Mechanize; use LWP::Simple; use MIME::Base64; my $pubIP = get("http://whatismyip.org/"); my $url = "http://$pubIP/resetrouter.html"; my $username = "foo"; my $password = "bar"; my $button = "Save/Reboot"; my @args = ( Authorization => "Basic " . MIME::Base64::encode( $username . ':' . $password ) ); my $mech = WWW::Mechanize->new(autocheck => 1); $mech->credentials( $url, "test", $username, $password ); $mech->get( $url, @args ) or die $mech->die; print $mech->content; $mech->click($button); ####

Click the button below to save and reboot the router.