I just made an amazing discovery last night. I had written a rather elaborate Perl script to lookup my current IP, then update DNS hosted on ZoneEdit. The script worked rather well, except for the fact it was a little larger than I wanted. With out getting into a lot of detail, the script was accidentally deleted and I didn’t have a backup. Yeah…smooth operator..not

Hmm, ‘scuse me a minute while I burn my hand in a waffle iron for that comment.

Alright, all done. Now where was I. Ah yes, I started to recreate the script when I realized that I could probably rewrite it much smaller than before. Actually after looking at a really cool offering ZoneEdit does for its members (free signup with 5 free zones(domains)) I could actually rewrite the entire thing in one line. Yeah, heh, I are is like to code. So here is the final script, its actually more of just a command at this point.

lynx -source -auth=username:password '' >> myLogFile

I wrapped this in a shell script, here.

Then I cron that out so it runs every minute in my attempt to get banned for life from ZoneEdit. Yeah, that was sarcasm, it runs every hour since Verizon likes to play spin the bottle fairly often with my IP address.

We pass the -source flag so lynx just dumps the source code of the page (which is null) and exits, we just want to hit that URL, but we need to authenticate to do so. The page is actually a script that updates your zone with the IP address of the request that successfully authenticates. Then, just to be all l33t, I redirect the output of the command to a log file so I can see what happened. Its usually just a success or failure code.

Comments are closed.