is a command-line tool written in Go that fetches IP addresses from Shodan based on various inputs such as IP ranges, domains, and custom query strings. The tool allows users to pipe input from text files and retrieve relevant IP addresses from Shodan's search results.
- Fetch IP addresses from IP ranges
- Fetch IP addresses associated with domains
- Fetch IP addresses based on custom query strings
- Fetch IP addresses from favicon hashes with HTTP status codes.
go install -v github.com/Vulnpire/sXtract@latest
The tool supports three main flags to specify the type of input:
-ir : Fetch IP addresses from IP ranges.
-ip : Fetch IP addresses associated with domains.
-hs : Fetch IP addresses based on favicon hashes.
-q : Fetch IP addresses based on custom query strings (can be used with -hs and -ir).
Provide a text file with IP ranges, one per line, and use the -ir flag:
cat ipranges.txt | sXtract -ir -q "port:(21 OR 1337 OR 10001)
Provide a text file with domain names, one per line, and use the -ip flag:
cat domains.txt | sXtract -ip
Provide a text file with favicon hashes, one per line, and use the -hs flag. You can also specify an HTTP status code using the -q flag:
cat hashes.txt | sXtract -hs -q "200 OK"
Provide a text file with custom query strings, one per line, and use the -q flag:
cat queries.txt | sXtract -ip -q <input>
cat << EOF > wildcards.txt
> spotify.com
> EOF
cat wildcards.txt | sXtract -ip | anew ips.txt && for i in $(cat ips.txt);do shodan host $i;done