Another approach: 94d24be .  Does this work for you?  It's only going to work on computers where `ifconfig` returns lines like `inet addr:67.207.141.173  ...`