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
# The IPs inside input.txt file. | |
75.72.7.215 | |
216.189.129.6 | |
38.88.189.58 | |
# Using the `xargs` command to perform lookup for each of the IP. | |
cat input.txt | xargs -I% curl http://ipinfo.io/%/country | |
# Output. | |
US |
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
ipinfo.io/domains/COMPANY_DOMAIN_NAME?token=YOUR_ACCESS_TOKEN |
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
ipinfo.io/ranges/COMPANY_DOMAIN_NAME?token=YOUR_ACCESS_TOKEN |
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
ipinfo.io/ASN_NUMBER/json?token=YOUR_ACCESS_TOKEN |
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
pip install ipinfo |
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
# Import the package. | |
import ipinfo | |
# Set the access token. | |
accessToken = 'abc12345678' | |
# Authenticate and get API handler object. | |
handler = ipinfo.getHandler(accessToken) | |
# IP Adress to look for. | |
ipAddress = '216.239.36.21' | |
# Grab the data from API. |
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
{ | |
"ip": "66.87.125.72", | |
"hostname": "66-87-125-72.pools.spcsdns.net", | |
"city": "Southbridge", | |
"region": "Massachusetts", | |
"country": "US", | |
"loc": "42.0707,-72.0440", | |
"postal": "01550", | |
"asn": { | |
"asn": "AS10507", |
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
{ | |
"ip": "66.87.125.72", | |
"hostname": "66-87-125-72.pools.spcsdns.net", | |
"city": "Southbridge", | |
"region": "Massachusetts", | |
"country": "US", | |
"loc": "42.0707,-72.0440", | |
"postal": "01550", | |
"asn": { | |
"asn": "AS10507", |
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
function mkcdr { | |
if [[ $# = 0 ]] | |
then | |
echo "🧟♂️ invalid argument" | |
else | |
dirName="$1" | |
mkdir "$dirName" && cd "$dirName" | |
fi | |
} |
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
https://api.ipstack.com/check?access_key=YOUR_ACCESS_KEY |