Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Get outside IPv4 address and echo a line for adding to some poor mans database for later analyzation.
UTCNOW=$(date -u +%s)
CURRENTIP=$(wget -q -O - | sed -e 's/^.*<body>\(.*\)<\/body>.*$/\1/' | cut -f2 -d: | tr -d [:space:])
exit 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment