-
-
Save windows98SE/10971224 to your computer and use it in GitHub Desktop.
ip
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
tor_network=`curl --silent --socks5-hostname 127.0.0.1:9015 http://reip.stephack.com | awk '{print $1}'` | |
if [[ $tor_network =~ ^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$ ]] | |
then | |
echo "TOR >> $tor_network" | |
else | |
echo "NO TOR CONNECTION" | |
fi | |
external=`curl --silent http://reip.stephack.com | awk '{print $1}'` | |
if [[ $external =~ ^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$ ]] | |
then | |
echo "External >> $external" | |
else | |
echo "NO INTERNET CONNECTION" | |
fi | |
wifi_network=`/System/Library/PrivateFrameworks/Apple80211.framework/Versions/A/Resources/airport -I | awk -F: '/ SSID: / {print $2}' | sed -e 's/SSID: //' | sed -e 's/ //'` | |
en0=`ifconfig en0 | grep "broadcast" | awk '{print $2}'` | |
if [[ $en0 =~ ^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$ ]] | |
then | |
echo "Wireless >> $en0 (ssid:$wifi_network)" | |
else | |
echo "NO Wireless CONNECTION" | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment