go-dork

repository·master·Indexed 23 days ago

https://github.com/dwisiswant0/go-dork

A high-performance dork scanner written in Go that supports multiple search engines including Google, Shodan, Bing, Duck, Yahoo, and Ask. It features support for custom HTTP headers, proxy routing to avoid Captchas, pagination for scraping multiple pages, and a silent mode for piping results into other tools.

Tokens
1.2K
Snippets
9
Records
13
Agent score
78%

What's inside go-dork

  1. Add custom headers for search engines

    master

    You can pass custom headers (such as cookies or specific User-Agents) using the -H or --header flag. This is particularly useful for engines like Shodan that may require specific authentication or filters.

    go-dork -q "org:'Target' http.favicon.hash:116323821" \
      --engine shodan -H "Cookie: ..." -H "User-Agent: ..."
  2. Change the search engine

    master

    You can specify which search engine to use with the -e or --engine flag. If not specified, Google is used by default. Supported engines are Google, Shodan, Bing, Duck, Yahoo, and Ask.

    go-dork -e bing -q ".php?id="
  3. Chain go-dork with other tools using silent mode

    master

    If you want to pipe the results of go-dork directly into another tool, use the -s or --silent flag. This ensures that only the search results are printed to stdout, omitting any other tool output.

    Example: Piping to pwntools

    cat dorks.txt | go-dork | pwntools

    Example: Piping to Nuclei

    go-dork -q "inurl:'/secure' intext:'jira' site:org" -s | nuclei -t workflows/jira-exploitaiton-workflow.yaml
  4. Reference the go-dork CLI flags

    master

    The following flags are supported by the go-dork CLI:

    FlagDescription
    -q, --querySearch query (required)
    -e, --engineProvide search engine (default: Google). Options: Google, Shodan, Bing, Duck, Yahoo, Ask
    -p, --pageSpecify number of pages (default: 1)
    -H, --headerPass custom header to search engine
    -x, --proxyUse proxy to surfing
    -s, --silentSilent mode, prints only results in output
  5. Manage custom HTTP headers with customHeaders

    master

    The customHeaders type is a slice of strings used to manage a collection of custom HTTP headers. It implements the http.Header interface (specifically the Set method) allowing you to append multiple header values to a request.

    • Set(val string) error: Appends a new header value to the existing collection.
    • String() string: Returns a comma-separated string representation of all headers in the collection.
  6. Use go-dork CLI flags

    master

    The go-dork CLI tool accepts several flags to control search queries, engines, pagination, and network settings.

    Available Flags:

    • -q, --query <query>: The search query string. Required if not providing input via STDIN.
    • -e, --engine <engine>: The search engine to use. Supported options: Google, Shodan, Bing, Duck, Yahoo, Ask. (Default: google)
    • -p, --page <i>: Specify the number of pages to retrieve. (Default: 1)
    • -H, --header <header>: Pass custom headers to the search engine.
    • -x, --proxy <proxy_url>: Use an HTTP or SOCKSv5 proxy for the request.
    • -s, --silent: Enable silent mode to reduce log output.