From owner-freebsd-questions Mon Jul 5 21:16:50 1999 Delivered-To: freebsd-questions@freebsd.org Received: from elmls02.ce.mediaone.net (elmls02.ce.mediaone.net [24.131.128.27]) by hub.freebsd.org (Postfix) with ESMTP id 758D6153A3 for ; Mon, 5 Jul 1999 21:16:36 -0700 (PDT) (envelope-from burke@mcs.net) Received: from fatman2 (el01-24-131-147-32.ce.mediaone.net [24.131.147.32]) by elmls02.ce.mediaone.net (8.8.7/8.8.7) with SMTP id XAA17285; Mon, 5 Jul 1999 23:16:34 -0500 (CDT) Message-Id: <4.1.19990705231209.00a7dd90@pop.ce.mediaone.net> X-Sender: johnburke@pop.ce.mediaone.net X-Mailer: QUALCOMM Windows Eudora Pro Version 4.1 Date: Mon, 05 Jul 1999 23:16:34 -0500 To: dan.langille@dvl-software.com From: Burke Gallagher Subject: Re: running frequent cron perl scripts Cc: freebsd-questions@FreeBSD.ORG In-Reply-To: <378180ee.8f8.0@actrix.gen.nz> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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">ErrorD> 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