Categories: General

Adding MSN Search and Technorati Quicksearches To Firefox

top-ten-programming-languages1.1top-ten-programming-languages1.1

I was having some issues involving losing connectivity to a system of mine
due to a dynamic IP. Normally one would just use a dynamic DNS service to
solve the problem, but in this case there were complications that kept that
from being a solution.

So that’s where
Python
comes in. I threw this “solution” (It’s in quotes for a reason) together,
which goes to
my own rudimentary IP-finding site, pulls my address, and returns it to me. Here’s the code:

 

import urllibimport resite =
urllib.urlopen(“https://danielmiessler.com/ip”).read()grab =
re.findall(‘d{2,3}.d{2,3}.d{2,3}.d{2,3}’,site)address = grab[0]print address

 

So then in cron.hourly (Gentoo) I can do:

/usr/bin/address | mailx -s “New IP” me@mysecondaddress &>
/etc/cron_output

It’s nasty, but it works. 🙂

[ Jul 15, 2005 ]

Gerald Businge

Leave a Comment
Share
Published by
Gerald Businge

Recent Posts

35 Low-Back One-Pieces That Bring the Drama

A low-back one-piece swimsuit is one of those classic silhouettes that cues confidence. It’s unfussy…

2 hours ago

The Final New Moon Of Spring Is Here — & It’ll Rock Your World

The last New Moon of spring is going to rock our worlds amazingly. For the…

2 hours ago

A Week In Jersey City, NJ On A $270,000 Household Income

Welcome to Money Diaries where we are tackling the ever-present taboo that is money. We’re…

2 hours ago

Summer’s 9 Hottest Pedicure Colors Are Surprisingly Versatile

Year in and year out, the most popular summer nail colors have one thing in…

2 hours ago

Merit’s Tinted Sunscreen Is So Good, It’s Replacing Our Usual Makeup

Finding the perfect skin tint takes a lot of trial and error. A good one…

2 hours ago

What Our Editors Are Shopping For Memorial Day Weekend 2025

Any seasoned online shopper will have Memorial Day weekend bookmarked on their calendar. The long…

2 hours ago