Last active
August 17, 2019 12:47
-
-
Save unique1984/0f987a06ce76b27402cd631c7441b369 to your computer and use it in GitHub Desktop.
What is my IP tool and much more
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 | |
# chmod +x ip.sh | |
# ./ip.sh will give your ip and much more | |
PAGE=$(wget -qO- https://ysnteknoloji.com/geoip/location.php) | |
tarih=$(echo $PAGE | grep -oP "Tarih\s*:\K([0-9\.\s:]*)") | |
ip=$(echo $PAGE | grep -oP "IP\s*:\K([0-9\.]*)") | |
echo -e "Tarih\t\t" $(echo $PAGE | grep -oP "Tarih\s*:\K([0-9\.\s:]*)") | |
echo -e "IP\t\t" $(echo $PAGE | grep -oP "IP\s*:\K([0-9\.]*)") | |
echo -e "Enlem\t\t" $(echo $PAGE | grep -oP "Enlem\s*:\K([0-9\.]*)") | |
echo -e "Boylam\t\t" $(echo $PAGE | grep -oP "Boylam\s*:\K([0-9\.]*)") | |
echo -e "Ülke Kodu\t" $(echo $PAGE | grep -ioP "Ülke Kodu\s*:\K([a-z]*)") | |
echo -e "Eyalet\t\t" $(echo $PAGE | grep -ioP "Eyalet\s*:\K([0-9\sa-z]*)") | |
echo -e "Şehir\t\t" $(echo $PAGE | grep -ioP "Şehir\s*:\K([0-9\sa-z]*)") | |
unset PAGE | |
echo -e "$tarih\t$ip" >> ~/.ip_history.log |
Author
unique1984
commented
Aug 17, 2019
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment