rndm_luser /.conky/scripts/netinfo.sh

#!/bin/bash
function ip() {
    local pub_ip tor_ip int_ip
    pub_ip=$(curl -s http://checkip.dyndns.org | awk '{print $6}' | awk 'BEGIN { FS = "<" } { print $1 }')
    tor_ip=$(torify lynx -dump http://checkip.dyndns.org | sed -e 's/.*://g;s/ //g;/^$/d')
    int_ip=$(ifconfig | grep 'inet addr:' | grep -v '127.0.0.1' | cut -d: -f2 | awk '{ print $1 }')

	echo -e "Pub IP addr:\t${pub_ip}\t($(resolveip ${pub_ip} | awk '{ print $6 }'))"
    
    if [ $(pgrep tor 2>/dev/null) ]; then
      echo -e "Tor IP addr:\t${tor_ip}\t($(resolveip ${tor_ip} | awk '{ print $6 }')) ($(ip2cc ${tor_ip} | sed -e '/^$/d' | tail -n 1))"
    fi
	
    echo -e "Int IP addr:\t${int_ip}\t($(ipcalc -n $int_ip | sed -e '/^$/d;s/  //g' | tail -n 1))"
} 2>/dev/null

function mac() {
    local iface curr_mac real_mac vendor
	iface=eth0
    curr_mac=$(/sbin/ifconfig | grep $iface | awk '{print $5}')
    real_mac=$(/sbin/arp -a | awk '{ print $4 }')
    
    if [ -x /usr/bin/macchanger ] || [ -x /sbin/macchanger ]; then
      echo -e "$(macchanger -s $iface)"
      echo -e "Real MAC Addr:\t${real_mac} ($(macchanger -l | grep -i "$(echo $real_mac |  cut -b -8)" | tail -n 1 | cut -b 19-))"
    else
      echo -e "Curr MAC Addr:\t${curr_mac}"
      echo -e "Real MAC Addr:\t${real_mac}"
    fi
  }
ip
echo
mac
echo