Greeting according to different location (IP)

Imagine when you carry your own notebook to do assessment in different client sites. You would like to run several scripts and have to put different configuration files for different sites. I found its quite useful when you can notify to yourself what IP you current have and change your working directory to certain folder. Here is the script to put in the ~/.profile when you are using a Mac

#Check if I am at office
networksetup -getinfo Wi-Fi| grep -x "Router:" > /dev/null && cd /Users/anony/Documents/work && \
toilet -f mono12 -F metal Office

You can obtain the “toilet” program by “sudo port install toilet” in Mac. Here is the result when I am in Office with IP

Scott Tse's Picture

About Scott Tse

Discover and Exploit.

Hong Kong, China