

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 ]
Related Posts

Technical Analysis: 4 Stocks with signs of death crossovers to keep an eye on

HDFC Bank & 3 other fundamentally strong stocks trading above 200 DMAÂ to keep an eye on

Falling Channel Breakout: Multibagger NBFC Stock Shows Bullish Momentum on Daily Chart

4 Fundamentally strong stocks to buy for an upside potential of up to 36%; Do you hold any?

0 responses on "Adding MSN Search and Technorati Quicksearches To Firefox"