### Install go-dork using Go Modules Source: https://github.com/dwisiswant0/go-dork/blob/master/README.md This command installs the go-dork tool using Go modules. Ensure you have Go version 1.15 or higher installed and configured. This method fetches the latest version of the tool directly from its GitHub repository. ```bash GO111MODULE=on go install github.com/dwisiswant0/go-dork@latest ``` -------------------------------- ### Common Dork Queries with go-dork Source: https://context7.com/dwisiswant0/go-dork/llms.txt Provides examples of effective dork queries for security reconnaissance, including finding exposed configuration files, login pages, SQL dumps, Git directories, and Jira installations. These examples utilize various flags like `-q`, `-p`, `-s`, and `-e` for targeted searches. ```bash # Find exposed configuration files go-dork -q "intitle:'index of' .env" -p 3 -s # Discover login pages go-dork -q "inurl:admin intitle:login" -e bing -p 5 -s # Find SQL dumps go-dork -q "filetype:sql intext:'CREATE TABLE'" -p 2 -s # Locate exposed Git directories go-dork -q "intitle:'index of' .git" -p 3 -s # Find Jira installations go-dork -q "intext:'Powered by Atlassian JIRA'" -p 5 -s ``` -------------------------------- ### Install go-dork using Go Compiler Source: https://context7.com/dwisiswant0/go-dork/llms.txt Installs the go-dork tool using the Go compiler. Requires Go version 1.15 or later. Alternatively, prebuilt binaries can be downloaded from the releases page. ```bash # Install using Go 1.15+ GO111MODULE=on go install github.com/dwisiswant0/go-dork@latest # Or download prebuilt binary from releases # https://github.com/dwisiswant0/go-dork/releases ``` -------------------------------- ### Enable Pagination with go-dork Source: https://context7.com/dwisiswant0/go-dork/llms.txt Fetches results from multiple pages using the `-p` flag to increase the number of discovered URLs. This allows for a more comprehensive search. Examples demonstrate combining pagination with a specific engine. ```bash # Fetch results from first 5 pages go-dork -q "intext:'jira'" -p 5 # Combine pagination with specific engine go-dork -e bing -q "intitle:'BigIP'" -p 3 # Output (results from pages 1-5): # https://jira.company1.com/browse/PROJ-123 # https://company2.org/jira/issues/ # https://atlassian.company3.net/secure/Dashboard.jspa # ... (more results from subsequent pages) ``` -------------------------------- ### Configure Pagination with go-dork Source: https://github.com/dwisiswant0/go-dork/blob/master/README.md Control the number of pages go-dork scrapes by using the -p or --page flag. By default, it scrapes only the first page. This example scrapes pages 1 through 5 for the given query. ```bash go-dork -q "intext:'jira'" -p 5 ``` -------------------------------- ### Stdin Input for Batch Processing with go-dork Source: https://context7.com/dwisiswant0/go-dork/llms.txt Processes multiple dork queries from a file or standard input for batch operations. This allows for efficient scanning of numerous search criteria simultaneously. Examples show processing dorks from a file with pagination, a specific engine, and through a proxy in silent mode. ```bash # Create a dorks file cat > dorks.txt << 'EOF' inurl:.php?id= inurl:admin intitle:login filetype:sql intext:password site:gov filetype:pdf confidential intitle:"index of" .env EOF # Process all dorks with pagination cat dorks.txt | go-dork -p 5 # Process dorks with specific engine cat dorks.txt | go-dork -e bing -p 3 # Process dorks through proxy in silent mode cat dorks.txt | go-dork -p 2 -x http://127.0.0.1:8080 -s > results.txt ``` -------------------------------- ### Select Search Engine with go-dork Source: https://context7.com/dwisiswant0/go-dork/llms.txt Specifies the search engine to use for dork queries with the `-e` flag. Supported engines include Google (default), Shodan, Bing, DuckDuckGo, Yahoo, and Ask. Examples show searching with Bing, Shodan, DuckDuckGo, Yahoo, and Ask. ```bash # Search using Bing engine go-dork -e bing -q ".php?id=" # Search using Shodan for devices go-dork -e shodan -q "apache" # Search using DuckDuckGo go-dork -e duck -q "inurl:admin" # Search using Yahoo go-dork -e yahoo -q "intitle:index.of" # Search using Ask go-dork -e ask -q "site:gov filetype:pdf" ``` -------------------------------- ### Add Custom HTTP Headers with go-dork Source: https://context7.com/dwisiswant0/go-dork/llms.txt Adds custom HTTP headers for authentication, user-agent spoofing, or search engine filters using the `-H` flag. This is useful for authenticated searches or mimicking specific client behaviors. Examples show adding cookie, user-agent, and authorization headers. ```bash # Add cookie header for authenticated Shodan searches go-dork -q "org:'Target' http.favicon.hash:116323821" \ --engine shodan \ -H "Cookie: polito=your_session_cookie" # Multiple custom headers go-dork -q "inurl:admin" \ -H "Cookie: session=abc123" \ -H "User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64)" # Custom authorization header go-dork -q "site:internal.company.com" \ -H "Authorization: Bearer your_token_here" ``` -------------------------------- ### Display go-dork Help Information Source: https://github.com/dwisiswant0/go-dork/blob/master/README.md To see all available options and flags for go-dork, use the -h or --help flag. This command displays a detailed list of supported arguments and their descriptions, aiding in understanding the tool's capabilities. ```bash go-dork -h ``` -------------------------------- ### Basic go-dork Usage Source: https://github.com/dwisiswant0/go-dork/blob/master/README.md The most basic way to use go-dork is by providing a search query using the -q or --query flag. This command will initiate a search on the default search engine (Google) with the specified query. ```bash go-dork -q "inurl:'...'" ``` -------------------------------- ### Find Exposed phpMyAdmin Instances Source: https://context7.com/dwisiswant0/go-dork/llms.txt This command uses go-dork to find exposed phpMyAdmin instances. It searches for 'phpmyadmin' in the URL and 'phpMyAdmin' in the title, limiting the search to the top 3 results and enabling silent mode. ```bash go-dork -q "inurl:phpmyadmin intitle:phpMyAdmin" -p 3 -s ``` -------------------------------- ### Discover BigIP Management Interfaces via Shodan Source: https://context7.com/dwisiswant0/go-dork/llms.txt This command uses go-dork to search Shodan for BIG-IP management interfaces. It specifies Shodan as the search engine, uses a query to find titles containing 'BIG-IP', and includes a custom 'Cookie' header for authentication. ```bash go-dork -e shodan -q "http.title:'BIG-IP'" -H "Cookie: polito=xxx" -s ``` -------------------------------- ### Input Queries via Stdin with go-dork Source: https://github.com/dwisiswant0/go-dork/blob/master/README.md go-dork supports reading search queries from standard input (stdin). This is useful for processing lists of dorks from a file. The -p flag can be used to specify the number of pages to scrape. ```bash cat dorks.txt | go-dork -p 5 ``` -------------------------------- ### Basic Dork Query Search with go-dork Source: https://context7.com/dwisiswant0/go-dork/llms.txt Executes a simple dork query against the default Google search engine to find URLs matching specific search criteria, such as PHP files with an 'id' parameter. The output lists the matching URLs. ```bash # Basic dork query to find PHP files with ID parameter go-dork -q "inurl:.php?id=" # Output: # https://example.com/page.php?id=1 # https://another-site.org/article.php?id=42 # https://vulnerable.net/product.php?id=123 ``` -------------------------------- ### Use Proxy with go-dork Source: https://github.com/dwisiswant0/go-dork/blob/master/README.md To route traffic through a proxy, use the -x or --proxy flag followed by the proxy address. This can help bypass CAPTCHAs or other network restrictions imposed by search engines. ```bash go-dork -q "intitle:'BigIP'" -p 2 -x http://127.0.0.1:8989 ``` -------------------------------- ### Add Custom Headers with go-dork Source: https://github.com/dwisiswant0/go-dork/blob/master/README.md go-dork allows you to pass custom headers using the -H or --header flag. This is particularly useful for engines like Shodan, where you might need to include specific cookies or User-Agent strings. ```bash go-dork -q "org:'Target' http.favicon.hash:116323821" \ --engine shodan -H "Cookie: ..." -H "User-Agent: ..." ``` -------------------------------- ### Chain go-dork Results with Other Tools Source: https://github.com/dwisiswant0/go-dork/blob/master/README.md The -s or --silent flag enables silent mode, printing only the results to standard output. This is ideal for piping the output of go-dork to other command-line tools for further processing or analysis. ```bash cat dorks.txt | go-dork | pwntools ``` ```bash go-dork -q "inurl:'/secure' intext:'jira' site:org" -s | nuclei -t workflows/jira-exploitaiton-workflow.yaml ``` -------------------------------- ### Specify Search Engine with go-dork Source: https://github.com/dwisiswant0/go-dork/blob/master/README.md You can change the search engine used by go-dork with the -e or --engine flag. Supported engines include Google, Shodan, Bing, DuckDuckGo, Yahoo, and Ask. If not specified, it defaults to Google. ```bash go-dork -e bing -q ".php?id=" ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.