Set-ddns.pl router settings list
From FreeBSDwiki
(Difference between revisions)
(→Westech WireSpeed DualConnect Home DSL Gateway) |
|||
Line 11: | Line 11: | ||
== Westech WireSpeed DualConnect Home DSL Gateway == | == Westech WireSpeed DualConnect Home DSL Gateway == | ||
− | + | # BellSouth el cheapo residential gateway: there is no configurable username and password to set! | |
− | $ | + | $router_url_string = 'http://192.168.1.254/homeBS.htm'; |
− | + | ||
+ | $ua = LWP::UserAgent->new; | ||
+ | $req = HTTP::Request->new('GET',$router_url_string); | ||
+ | $resp = $ua->request($req)->as_string(); | ||
+ | |||
+ | @body = split (/\n/, $resp); | ||
+ | $IP1 = ''; | ||
+ | foreach $string (@body) { | ||
+ | if ($IP eq '') { | ||
+ | if ($string =~ /^var IpAddress \= \"(\d{0,3}\.\d{0,3}\.\d{0,3}\.\d{0,3})\"\;/) { | ||
+ | print "Found: $string \n"; | ||
+ | $IP1 = $1; | ||
+ | } | ||
+ | } | ||
+ | } | ||
$WAN1 = $ip1; | $WAN1 = $ip1; |
Revision as of 02:50, 21 May 2006
Xincom Twin Wan Router XC-DPG502
$ROUTER_URL = '192.168.0.1/netstat.htm'; $_ = $resp; ($ip1, $ip2, $ip3) = /\d{0,3}\.\d{0,3}\.\d{0,3}\.\d{0,3}/gs; $WAN1 = $ip2; $WAN2 = $ip3;
Westech WireSpeed DualConnect Home DSL Gateway
# BellSouth el cheapo residential gateway: there is no configurable username and password to set! $router_url_string = 'http://192.168.1.254/homeBS.htm'; $ua = LWP::UserAgent->new; $req = HTTP::Request->new('GET',$router_url_string); $resp = $ua->request($req)->as_string(); @body = split (/\n/, $resp); $IP1 = ; foreach $string (@body) { if ($IP eq ) { if ($string =~ /^var IpAddress \= \"(\d{0,3}\.\d{0,3}\.\d{0,3}\.\d{0,3})\"\;/) { print "Found: $string \n"; $IP1 = $1; } } } $WAN1 = $ip1;