Last active
November 13, 2023 12:23
-
-
Save sneakymonk3y/29782184a4aff63ca37aa7a9a84ab524 to your computer and use it in GitHub Desktop.
IP lookup / greynoise.io / ipinfo.io / shodan.io / otx.alienvault.com
This file contains hidden or 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 | |
| args=("$@") | |
| check_greynoise() | |
| { | |
| echo "GREYNOISE" | |
| curl -s -XPOST -d 'ip='${args[0]} 'http://api.greynoise.io:8888/v1/query/ip' | jq '.' | |
| } | |
| check_ipinfo() | |
| { | |
| echo "IPINFO" | |
| curl -s ipinfo.io/${args[0]} | jq '.' | |
| } | |
| check_shodan() | |
| { | |
| echo "SHODAN" | |
| #curl -s https://api.shodan.io/shodan/host/${args[0]}?key=APIKEYHERE | jq '.' | |
| shodan host ${args[0]} | |
| } | |
| check_alienvault() | |
| { | |
| echo "ALIENVAULT" | |
| curl -s https://otx.alienvault.com:443/api/v1/indicators/IPv4/${args[0]}/url_list -H "X-OTX-API-KEY:APIKEYHERE" | jq | |
| curl -s https://otx.alienvault.com:443/api/v1/indicators/IPv4/${args[0]}/reputation -H "X-OTX-API-KEY:APIKEYHERE" | jq | |
| } | |
| check_greynoise | |
| check_ipinfo | |
| check_shodan | |
| check_alienvault |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
chmod +x and supply IP as an argument to query