Search the web
Sign In
New User? Sign Up
Rebol_New · For beginning Rebol programmers
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Message search is now enhanced, find messages faster. Take it for a spin.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
accessing a protected web page   Message List  
Reply | Forward Message #291 of 315 |
Re: accessing a protected web page


Hi Pete,

If you're on a Windows machine, a quick and dirty way to do that sort
of thing is to use autoit to click through the password screen, save
the web page, and then call a rebol script to parse the page for the
IP. Autoit is a great automation tool: http://autoitscript.com

If you're just trying to get the IP addresses, why not just use this
Rebol code:

Rebol []
parse read http://whatismyip.com [
thru <title> copy my-ip to </title>]
parse my-ip [
thru "-" copy stripped-ip to end]
alert to-string rejoin [
"External: " trim/all stripped-ip " "
"Internal: " read join dns:// read dns://]

I actually have a script that I run on my own webserver that returns
the IP, but whatismyip.com seems reliable. Hope that helps :)


--- In Rebol_New@yahoogroups.com, Pete Wason <codevark@...> wrote:
>
> Hi,
>
> I'm trying to write a little script to access the admin pages
embedded in my
> router and parse out my current WAN IP.. but I can't figure out how
to get past
> the password dialog.. has anyone (here) done or seen this done
anywhere?
>
> As a test, I tried something like:
>
> statushtm: read/custom http://192.168.1.1/Status.htm [post
> "username=username&password=password"]
>
> but the problem is I don't really know 1. what the actual variables
are called,
> and 2. whether this would even work if I did know. (It didn't work.)
>
> TIA!
>
> --------------------------------------------------------------------
----
> Pete Wason Hy Noom Publications codevark@... 508.865.5414
>








Mon Mar 20, 2006 3:55 pm

notchent
Offline Offline
Send Email Send Email

Forward
Message #291 of 315 |
Expand Messages Author Sort by Date

Hi, I'm trying to write a little script to access the admin pages embedded in my router and parse out my current WAN IP.. but I can't figure out how to get...
Pete Wason
mrzoon
Offline Send Email
Mar 18, 2006
3:04 am

Hi Pete, If you're on a Windows machine, a quick and dirty way to do that sort of thing is to use autoit to click through the password screen, save the web...
Nick
notchent
Offline Send Email
Mar 20, 2006
3:55 pm
Advanced

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help