diff --git a/README.md b/README.md index 57f7c39d..4a084516 100644 --- a/README.md +++ b/README.md @@ -203,7 +203,7 @@ INTERACTSH: UNCOVER: -uc, -uncover enable uncover engine -uq, -uncover-query string[] uncover search query - -ue, -uncover-engine string[] uncover search engine (shodan,shodan-idb,fofa,censys,quake,hunter,zoomeye,netlas) (default shodan) + -ue, -uncover-engine string[] uncover search engine (shodan,shodan-idb,fofa,censys,quake,hunter,zoomeye,netlas,criminalip) (default shodan) -uf, -uncover-field string uncover fields to return (ip,port,host) (default "ip:port") -ul, -uncover-limit int uncover results to return (default 100) -ucd, -uncover-delay int delay between uncover query requests in seconds (0 to disable) (default 1) diff --git a/v2/pkg/protocols/common/uncover/uncover.go b/v2/pkg/protocols/common/uncover/uncover.go index b4a60049..812b3298 100644 --- a/v2/pkg/protocols/common/uncover/uncover.go +++ b/v2/pkg/protocols/common/uncover/uncover.go @@ -15,6 +15,7 @@ import ( ucRunner "github.com/projectdiscovery/uncover/runner" "github.com/projectdiscovery/uncover/uncover" "github.com/projectdiscovery/uncover/uncover/agent/censys" + "github.com/projectdiscovery/uncover/uncover/agent/criminalip" "github.com/projectdiscovery/uncover/uncover/agent/fofa" "github.com/projectdiscovery/uncover/uncover/agent/hunter" "github.com/projectdiscovery/uncover/uncover/agent/netlas" @@ -29,7 +30,7 @@ import ( const maxConcurrentAgents = 50 func GetUncoverSupportedAgents() string { - uncoverSupportedAgents := []string{"shodan", "shodan-idb", "fofa", "censys", "quake", "hunter", "zoomeye", "netlas"} + uncoverSupportedAgents := []string{"shodan", "shodan-idb", "fofa", "censys", "quake", "hunter", "zoomeye", "netlas", "criminalip"} return strings.Join(uncoverSupportedAgents, ",") } @@ -72,6 +73,8 @@ func GetUncoverTargetsFromMetadata(templates []*templates.Template, delay, limit eng = "zoomeye" case "netlas-query": eng = "netlas" + case "criminalip-query": + eng = "criminalip" default: continue } @@ -131,6 +134,8 @@ func getTargets(uncoverOptions *ucRunner.Options, field string) (chan string, er agent, err = zoomeye.NewWithOptions(&uncover.AgentOptions{RateLimiter: rateLimiter}) case "netlas": agent, err = netlas.NewWithOptions(&uncover.AgentOptions{RateLimiter: rateLimiter}) + case "criminalip": + agent, err = criminalip.NewWithOptions(&uncover.AgentOptions{RateLimiter: rateLimiter}) default: err = errors.Errorf("%s unknown uncover agent type", engine) } @@ -231,6 +236,12 @@ func loadKeys(engine string, options *ucRunner.Options) error { } else { return errors.Errorf("NETLAS_API_KEY env variable is not configured") } + case "criminalip": + if key, exists := os.LookupEnv("CRIMINALIP_API_KEY"); exists { + options.Provider.CriminalIP = append(options.Provider.CriminalIP, key) + } else { + return errors.Errorf("CRIMINALIP_API_KEY env variable is not configured") + } default: return errors.Errorf("unknown uncover agent") }