Example Usage
package main
import (
"context"
"github.com/shadowscatcher/shodan"
"github.com/shadowscatcher/shodan/search"
"github.com/shadowscatcher/shodan/search/ssl_versions"
"log"
"net/http"
"os"
)
func main() {
nginxSearch := search.Params{
Page:1,
Query: search.Query{
Product: "nginx",
ASN: "AS14618",
SSLOpts: search.SSLOpts{
Cert: search.CertOptions{
Expired: true,
},
Version: ssl_versions.TLSv1_2,
},
},
}
client, _ := shodan.GetClient(os.Getenv("SHODAN_API_KEY"), http.DefaultClient, true)
ctx := context.Background()
result, err := client.Search(ctx, nginxSearch)
if err != nil {
log.Fatal(err)
}
for _, match := range result.Matches {
// a lot of returned data can be used in another searches
// it's easy because you will get response with almost all possible fields, just don't forget to check them
if match.HTTP != nil && match.HTTP.Favicon != nil {
//newQuery := search.Query{HTTP: search.HTTP{Favicon: search.Favicon{Hash: match.HTTP.Favicon.Hash}}}
}
}
// later on you can change every part of search query or parameters:
nginxSearch.Page++ // for example, increase page
nginxSearch.Query.Port = 443 // or add new searc
See also
username-anarchy
Open Source
Kali
Username tools for penetration testing…
onion-lookup
Open Source
Software back-end and services for checking the existence of Tor hidden services and retrieving thei…
Kerbrute
Open Source
Kali
Kerberos brute-forcing tool for performing user enumeration and password spraying against Active Dir…
cheatsheets
Free
High quality and text versions of cheat sheets from Cyber Detective Twitter…
Amass
Open Source
Kali
OWASP tool for in-depth DNS enumeration, network mapping, and attack surface discovery. Uses both pa…
ad-privileged-audit
Free
Provides various Windows Server Active Directory (AD) security-focused reports.…