mirror of https://github.com/daffainfo/nuclei.git
uncover: add criminalip support (#3162)
* update uncover engine options * add criminalip support * update criminalIP variable --------- Co-authored-by: Sandeep Singh <sandeep@projectdiscovery.io> Co-authored-by: shubhamrasal <shubhamdharmarasal@gmail.com>dev
parent
21b03a2e8a
commit
e3e60d0ba8
|
@ -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)
|
||||
|
|
|
@ -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")
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue