Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 6 Jul 1999 16:07:10 nzst
From:      "Dan Langille" <dan.langille@dvl-software.com>
To:        Burke Gallagher <burke@mcs.net>
Cc:        freebsd-questions@FreeBSD.ORG
Subject:   Re: running frequent cron perl scripts
Message-ID:  <378180ee.8f8.0@actrix.gen.nz>

next in thread | raw e-mail | index | archive | help
>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

</HTML>/P>"CENTER">Error</H1>D>
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?378180ee.8f8.0>