Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 05 Jul 1999 23:16:34 -0500
From:      Burke Gallagher <burke@mcs.net>
To:        dan.langille@dvl-software.com
Cc:        freebsd-questions@FreeBSD.ORG
Subject:   Re: running frequent cron perl scripts
Message-ID:  <4.1.19990705231209.00a7dd90@pop.ce.mediaone.net>
In-Reply-To: <378180ee.8f8.0@actrix.gen.nz>

next in thread | previous in thread | raw e-mail | index | archive | help
OK I think I have it now.  should have seen it from your last post.  There
is an error in the first line of the httpRequest
it should read "GET /shell/show/+ip+interfaces HTTP 1.0"  the HTTP is
missing and your router only supports 1.0 anyway.

burke

At 04:07 PM 7/6/99 +0000, Dan Langille wrote:
>>I think we still have a problem or two left.  It did not print the
>>currentIP because it did not find it in the httpResponse message.
>>
>>add a line to print the response message right before the DYNDNS 9th line
>>print "$httpResponse\n";
>>print "DYNDNS 9th\n";
>>
>>I think it will show an error probably authentication related.
>>if that is true comment out the line $encoded = "$username:$password";
>>    $encoded = encode_base64( "$username:$password" ); 
>>    #$encoded = "$username:$password";
>>
>>the username password is Base64 encoded in http basic authentication.
>>
>>hopefully this will get everything working.
>
>OK.  Done.  
>
>$ perl get_ip.sh
>DYNDNS
>DYNDNS start
>DYNDNS 2nd
>DYNDNS 3rd GET /shell/show+ip+interfaces 1.1
>Accept: text/*, text/html
>Authorization: Basic TWFkZUhhcmRCeTpUZWxlY29t
>
>
>
>DYNDNS 4th
>DYNDNS 5th
>DYNDNS 6th
>DYNDNS 7th
>DYNDNS 8th
>DYNDNS loop
>DYNDNS loop
>DYNDNS loop
>DYNDNS loop
>DYNDNS loop
>DYNDNS 8.5
>HTTP/1.0 200 OK
>Content-length: 134
>Content-Type: text/html
>
> 
/P>"CENTER">Error</H1>D>

Problem can be spotted here =====^,  the M10 is returning us an error
message not the expected report.

>DYNDNS 9th
>DYNDNS 10th
>currentIP = ,  lastIP = 
>
>Here is what the page looks like from within lynx:
>
>Overview Memory DHCP Client DHCP Server Home
>                                           DSL   PPP   Ethernet   ATM
>                                                 Log IP Bridge
>                               Show Reset Interfaces Routes Arp Interfaces 
>Table
>
>
>show ip interfaces
>
>IP Interfaces:
>ENET (lan): ( up broadcast default rip-send v1 rip-receive v1 )
>  inet 192.168.1.254 netmask ffffff00 broadcast 192.168.1.255
>  physical address 00.40.43.02.0a.c7 mtu 1500
>IP-Direct (vcc2): ( up broadcast default address-mapping )
>  inet 172.30.254.1 netmask ffff0000 broadcast 172.30.255.255
>  physical address 00.00.00.00.00.00 mtu 1500
>PPP (vcc1): ( up point-to-point address-mapping )
>  inet 210.55.152.24 netmask 0 peer address 210.55.152.254
>  physical address 00.00.00.00.00.00 mtu 1500
>
>
>The IP address needed is 210.55.152.24
>-
>Dan Langille



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4.1.19990705231209.00a7dd90>