Verify you’re hidden with conky

Shane Dowling
Jul 26, 2015 · 2 min read
Image for post
Image for post

I run a few scripts to ensure my identity stays hidden day to day on my
laptop. Here’s a few conky scripts to verify things are as they should
be.

VPN

Because I don’t always know my ip or what my VPN’s ip is, I wanted conky
to display the location I currently appear at from my VPN. If the
location was the same as where I physically am, something’s gone wrong.
To implement this, I wrote a python script and using ipinfo.io grab my
location and print it to conky.

Here’s the script I use to pull my location.

import requests
def main():
headers = {
‘User-Agent’: ‘curl/7.9.8 (i686-pc-linux-gnu) libcurl 7.9.8 (OpenSSL 0.9.6b) (ipv6 enabled)’
}
r = requests.get(‘http://ipinfo.io', headers=headers)
ipdata = r.json()
print(ipdata[‘city’] + ‘, ‘ + ipdata[‘region’] + ‘, ‘ + ipdata[‘country’])

And here’s the conky configuration I use to call it.

${goto 40}Location: ${execpi 600 python ~/scripts/conky/location.py}

http://dnsleaktest.com for an example of how it can be circumvented.

Mac Address

For my mac address I wanted to be able to see my wifi adaptors physical
address and what it should be spoofed to. If the two are the same,
something’s else has gone wrong.

${if_existing /proc/net/route wlan0}
${goto 40}${execpi 600 ethtool -P wlan0}
${endif}

Hostname

I also like to randomise my hostname on startup using this script.

${goto 40}Hostname: ${execpi 1000 hostname}

Tech Blog

Random smattering of technical posts

Medium is an open platform where 170 million readers come to find insightful and dynamic thinking. Here, expert and undiscovered voices alike dive into the heart of any topic and bring new ideas to the surface. Learn more

Follow the writers, publications, and topics that matter to you, and you’ll see them on your homepage and in your inbox. Explore

If you have a story to tell, knowledge to share, or a perspective to offer — welcome home. It’s easy and free to post your thinking on any topic. Write on Medium

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store