From owner-freebsd-questions Mon Jul 5 21: 7:23 1999 Delivered-To: freebsd-questions@freebsd.org Received: from mail.actrix.gen.nz (mail2.actrix.gen.nz [203.96.16.37]) by hub.freebsd.org (Postfix) with ESMTP id 6D8F1153A4 for ; Mon, 5 Jul 1999 21:07:17 -0700 (PDT) (envelope-from dan.langille@dvl-software.com) Received: from actrix.gen.nz (www@lemuria.actrix.gen.nz [203.96.16.20]) by mail.actrix.gen.nz (8.9.1/8.9.1) with SMTP id QAA22078; Tue, 6 Jul 1999 16:07:10 +1200 (NZST) From: "Dan Langille" Reply-To: dan.langille@dvl-software.com To: Burke Gallagher Cc: freebsd-questions@FreeBSD.ORG Date: Tue, 6 Jul 1999 16:07:10 nzst Subject: Re: running frequent cron perl scripts X-Mailer: DMailWeb Web to Mail Gateway 2.1t, http://netwinsite.com/top_mail.htm Message-id: <378180ee.8f8.0@actrix.gen.nz> X-User-Info: 202.37.52.5 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG >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">ErrorD> 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