Skip to content

Instantly share code, notes, and snippets.

View t0mab's full-sized avatar

t0mab t0mab

View GitHub Profile
@t0mab
t0mab / check_ip.py
Created June 29, 2012 11:33 — forked from Morrolan/check_ip.py
RaspberryPi IP address emailer
#!/usr/bin/python
# The idea behind this script is if plugging a RaspberryPi into a foreign network whilst running it headless
# (i.e. without a monitor/TV), you need to know what the IP address is to SSH into it.
#
# This script emails you the IP address if it detects an ethernet address other than it's usual address
# that it normally has, i.e. on your home network.
import subprocess
import smtplib