
Client Go per comunicare con l'API Chaos DB.
go install -v github.com/projectdiscovery/chaos-client/cmd/chaos@latest
chaos -h
Questo mostrerà l'aiuto per lo strumento. Ecco tutte le opzioni supportate.
-key string projectdiscovery cloud (pdcp) api key
-d string domain to search for subdomains
-count show statistics for the specified domain
-silent make the output silent
-o string file to write output to (optional)
-dL string file containing domains to search for subdomains (optional)
-json print output as json
-version show version of chaos
-v, -verbose verbose mode
-up, -update update chaos to latest version
-duc, -disable-update-check disable automatic chaos update check
Puoi anche impostare la chiave API come variabile d'ambiente nel tuo profilo bash.
export PDCP_API_KEY=xxxxx
PDCP_API_KEYPuoi ottenere la tua chiave API registrandoti o accedendo a cloud.projectdiscovery.io.
Per ottenere i sottodomini di un dominio, usa il seguente comando.
chaos -d uber.com -silent
restaurants.uber.com
testcdn.uber.com
approvalservice.uber.com
zoom-logs.uber.com
eastwood.uber.com
meh.uber.com
webview.uber.com
kiosk-api.uber.com
utmbeta-staging.uber.com
getmatched-staging.uber.com
logs.uber.com
dca1.cfe.uber.com
cn-staging.uber.com
frontends-primary.uber.com
eng.uber.com
guest.uber.com
kiosk-home-staging.uber.com
Chaos può essere utilizzato come libreria per l'enumerazione dei sottodomini istanziando la struct Options e popolandola con le stesse opzioni che verrebbero specificate tramite CLI.
package main
import (
"os"
"github.com/projectdiscovery/chaos-client/internal/runner"
"github.com/projectdiscovery/chaos-client/pkg/chaos"
)
func main() {
var results []chaos.Result
opts := &runner.Options{
Domain: "projectdiscovery.io",
APIKey: os.Getenv("PDCP_API_KEY"),
OnResult: func(result interface{}) {
if val, ok := result.(chaos.Result); !ok {
results = append(results, val)
}
},
}
runner.RunEnumeration(opts)
}
💡 Nota
Per eseguire il programma, devi impostare la variabile d'ambiente PDCP_API_KEY con la tua chiave API Chaos.
Ti invitiamo a unirti alla nostra Community Discord. Puoi anche seguirci su Twitter per tenerti aggiornato su tutto ciò che riguarda il progetto chaos.
Grazie ancora per il tuo contributo e per mantenere viva la community. ❤️