gitdork 1.0.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- gitdork-1.0.0/.github/workflows/ci.yml +34 -0
- gitdork-1.0.0/.github/workflows/release.yml +92 -0
- gitdork-1.0.0/CHANGELOG.md +14 -0
- gitdork-1.0.0/LICENSE +21 -0
- gitdork-1.0.0/PKG-INFO +223 -0
- gitdork-1.0.0/README.md +193 -0
- gitdork-1.0.0/gitdork/__init__.py +2 -0
- gitdork-1.0.0/gitdork/cli.py +174 -0
- gitdork-1.0.0/gitdork/dork_engine.py +47 -0
- gitdork-1.0.0/gitdork/extractor.py +111 -0
- gitdork-1.0.0/gitdork/models.py +115 -0
- gitdork-1.0.0/gitdork/reporters/__init__.py +0 -0
- gitdork-1.0.0/gitdork/reporters/json_report.py +47 -0
- gitdork-1.0.0/gitdork/reporters/markdown.py +65 -0
- gitdork-1.0.0/gitdork/reporters/terminal.py +149 -0
- gitdork-1.0.0/gitdork/templates/__init__.py +1 -0
- gitdork-1.0.0/gitdork/templates/github.py +163 -0
- gitdork-1.0.0/gitdork/templates/google.py +213 -0
- gitdork-1.0.0/gitdork/templates/shodan.py +155 -0
- gitdork-1.0.0/pyproject.toml +50 -0
- gitdork-1.0.0/tests/__init__.py +0 -0
- gitdork-1.0.0/tests/test_gitdork.py +474 -0
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main, dev]
|
|
6
|
+
pull_request:
|
|
7
|
+
branches: [main]
|
|
8
|
+
|
|
9
|
+
jobs:
|
|
10
|
+
test:
|
|
11
|
+
runs-on: ubuntu-latest
|
|
12
|
+
strategy:
|
|
13
|
+
matrix:
|
|
14
|
+
python-version: ["3.10", "3.11", "3.12"]
|
|
15
|
+
|
|
16
|
+
steps:
|
|
17
|
+
- uses: actions/checkout@v4
|
|
18
|
+
|
|
19
|
+
- name: Set up Python ${{ matrix.python-version }}
|
|
20
|
+
uses: actions/setup-python@v5
|
|
21
|
+
with:
|
|
22
|
+
python-version: ${{ matrix.python-version }}
|
|
23
|
+
|
|
24
|
+
- name: Install dependencies
|
|
25
|
+
run: |
|
|
26
|
+
python -m pip install --upgrade pip
|
|
27
|
+
pip install click rich httpx pytest ruff
|
|
28
|
+
pip install -e .
|
|
29
|
+
|
|
30
|
+
- name: Lint with ruff
|
|
31
|
+
run: ruff check gitdork/
|
|
32
|
+
|
|
33
|
+
- name: Run tests
|
|
34
|
+
run: pytest tests/ -v --tb=short
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
name: Release
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
tags:
|
|
6
|
+
- 'v*.*.*'
|
|
7
|
+
|
|
8
|
+
jobs:
|
|
9
|
+
release:
|
|
10
|
+
name: Build & Publish Release
|
|
11
|
+
runs-on: ubuntu-latest
|
|
12
|
+
|
|
13
|
+
permissions:
|
|
14
|
+
contents: write
|
|
15
|
+
id-token: write
|
|
16
|
+
|
|
17
|
+
steps:
|
|
18
|
+
- name: Checkout repository
|
|
19
|
+
uses: actions/checkout@v4
|
|
20
|
+
|
|
21
|
+
- name: Set up Python 3.10
|
|
22
|
+
uses: actions/setup-python@v5
|
|
23
|
+
with:
|
|
24
|
+
python-version: '3.10'
|
|
25
|
+
cache: 'pip'
|
|
26
|
+
|
|
27
|
+
- name: Install dependencies
|
|
28
|
+
run: |
|
|
29
|
+
python -m pip install --upgrade pip
|
|
30
|
+
pip install click rich httpx pytest build twine
|
|
31
|
+
pip install -e .
|
|
32
|
+
|
|
33
|
+
- name: Run tests (must pass before release)
|
|
34
|
+
run: pytest tests/ -v --tb=short
|
|
35
|
+
|
|
36
|
+
- name: Build PyPI package
|
|
37
|
+
run: python -m build
|
|
38
|
+
|
|
39
|
+
- name: Publish to PyPI
|
|
40
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
41
|
+
with:
|
|
42
|
+
password: ${{ secrets.PYPI_API_TOKEN }}
|
|
43
|
+
|
|
44
|
+
- name: Build release zip
|
|
45
|
+
run: |
|
|
46
|
+
TAG="${GITHUB_REF_NAME}"
|
|
47
|
+
STAGING="gitdork-${TAG}"
|
|
48
|
+
mkdir -p "${STAGING}"
|
|
49
|
+
rsync -av \
|
|
50
|
+
--exclude='.git' \
|
|
51
|
+
--exclude='__pycache__' \
|
|
52
|
+
--exclude='*.pyc' \
|
|
53
|
+
--exclude='.pytest_cache' \
|
|
54
|
+
--exclude='*.egg-info' \
|
|
55
|
+
--exclude="${STAGING}" \
|
|
56
|
+
. "${STAGING}/"
|
|
57
|
+
ZIP_NAME="gitdork-${TAG}.zip"
|
|
58
|
+
zip -r "${ZIP_NAME}" "${STAGING}/"
|
|
59
|
+
echo "ZIP_NAME=${ZIP_NAME}" >> $GITHUB_ENV
|
|
60
|
+
echo "TAG=${TAG}" >> $GITHUB_ENV
|
|
61
|
+
echo "--- Release zip contents ---"
|
|
62
|
+
unzip -l "${ZIP_NAME}"
|
|
63
|
+
|
|
64
|
+
- name: Extract changelog entry
|
|
65
|
+
run: |
|
|
66
|
+
python3 - << 'PYEOF'
|
|
67
|
+
import re, os
|
|
68
|
+
tag = os.environ["GITHUB_REF_NAME"]
|
|
69
|
+
version = tag.lstrip("v")
|
|
70
|
+
try:
|
|
71
|
+
readme = open("CHANGELOG.md").read()
|
|
72
|
+
pattern = rf"(?m)^##\s+\[?v?{re.escape(version)}\]?.*?\n(.*?)(?=\n^##\s|\Z)"
|
|
73
|
+
m = re.search(pattern, readme, re.DOTALL)
|
|
74
|
+
notes = m.group(1).strip() if m else f"Release {tag}"
|
|
75
|
+
except Exception:
|
|
76
|
+
notes = f"gitdork {tag}"
|
|
77
|
+
with open("/tmp/release_notes.md", "w") as f:
|
|
78
|
+
f.write(notes)
|
|
79
|
+
print(notes[:500])
|
|
80
|
+
PYEOF
|
|
81
|
+
|
|
82
|
+
- name: Create GitHub Release
|
|
83
|
+
uses: softprops/action-gh-release@v2
|
|
84
|
+
with:
|
|
85
|
+
tag_name: ${{ github.ref_name }}
|
|
86
|
+
name: "gitdork ${{ github.ref_name }}"
|
|
87
|
+
body_path: /tmp/release_notes.md
|
|
88
|
+
draft: false
|
|
89
|
+
prerelease: ${{ contains(github.ref_name, 'alpha') || contains(github.ref_name, 'beta') || contains(github.ref_name, 'rc') }}
|
|
90
|
+
files: ${{ env.ZIP_NAME }}
|
|
91
|
+
env:
|
|
92
|
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## [1.0.0] - 2024-01-01
|
|
4
|
+
|
|
5
|
+
### Added
|
|
6
|
+
- Initial release
|
|
7
|
+
- Google dork generation — 40+ templates across 8 categories
|
|
8
|
+
- Shodan dork generation — 30+ templates covering ports, services, SSL, admin panels
|
|
9
|
+
- GitHub code search dorks — 35+ templates for secrets, sensitive files, misconfigs
|
|
10
|
+
- Tech stack detection via `--enrich` flag (GitHub API)
|
|
11
|
+
- Category filtering with `--category`
|
|
12
|
+
- Engine filtering with `--engine`
|
|
13
|
+
- Terminal (Rich), JSON, and Markdown output formats
|
|
14
|
+
- `generate`, `list-categories`, `list-engines` commands
|
gitdork-1.0.0/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2024 ExploitCraft
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
gitdork-1.0.0/PKG-INFO
ADDED
|
@@ -0,0 +1,223 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: gitdork
|
|
3
|
+
Version: 1.0.0
|
|
4
|
+
Summary: Google, Shodan, and GitHub dork generator for pentesters and bug bounty hunters
|
|
5
|
+
Project-URL: Homepage, https://github.com/ExploitCraft/gitdork
|
|
6
|
+
Project-URL: Repository, https://github.com/ExploitCraft/gitdork
|
|
7
|
+
Project-URL: Bug Tracker, https://github.com/ExploitCraft/gitdork/issues
|
|
8
|
+
Author-email: ExploitCraft <exploitcraft@users.noreply.github.com>
|
|
9
|
+
License: MIT
|
|
10
|
+
License-File: LICENSE
|
|
11
|
+
Keywords: bugbounty,dorking,google-dorks,osint,pentest,recon,security,shodan
|
|
12
|
+
Classifier: Development Status :: 5 - Production/Stable
|
|
13
|
+
Classifier: Environment :: Console
|
|
14
|
+
Classifier: Intended Audience :: Information Technology
|
|
15
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
16
|
+
Classifier: Programming Language :: Python :: 3
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
20
|
+
Classifier: Topic :: Security
|
|
21
|
+
Requires-Python: >=3.10
|
|
22
|
+
Requires-Dist: click>=8.1
|
|
23
|
+
Requires-Dist: httpx>=0.25
|
|
24
|
+
Requires-Dist: rich>=13.0
|
|
25
|
+
Provides-Extra: dev
|
|
26
|
+
Requires-Dist: pytest; extra == 'dev'
|
|
27
|
+
Requires-Dist: respx; extra == 'dev'
|
|
28
|
+
Requires-Dist: ruff; extra == 'dev'
|
|
29
|
+
Description-Content-Type: text/markdown
|
|
30
|
+
|
|
31
|
+
# 🎯 gitdork
|
|
32
|
+
|
|
33
|
+
> Google, Shodan, and GitHub dork generator. Feed it a repo URL or domain — get ready-to-use dork queries targeting exposed secrets, sensitive files, open directories, and misconfigs. Built for pentesters and bug bounty hunters.
|
|
34
|
+
|
|
35
|
+
[](https://github.com/ExploitCraft/gitdork/actions)
|
|
36
|
+
[](https://pypi.org/project/gitdork/)
|
|
37
|
+
[](https://pypi.org/project/gitdork/)
|
|
38
|
+
[](LICENSE)
|
|
39
|
+
|
|
40
|
+
---
|
|
41
|
+
|
|
42
|
+
## Features
|
|
43
|
+
|
|
44
|
+
- 🔍 **Google dorks** — `site:`, `filetype:`, `intitle:`, `inurl:` across 8 categories
|
|
45
|
+
- 🌐 **Shodan dorks** — `hostname:`, `port:`, `ssl:`, `product:` for infra recon
|
|
46
|
+
- 🐙 **GitHub code search** — `org:`, `filename:`, `extension:` for secret hunting
|
|
47
|
+
- 🧠 **Tech stack detection** — fetch GitHub metadata to generate tech-specific dorks
|
|
48
|
+
- 🗂️ **Category filtering** — focus on secrets, misconfigs, login panels, or any combo
|
|
49
|
+
- ⚙️ **Engine filtering** — run just Google, just Shodan, or all three
|
|
50
|
+
- 📊 **Multiple output formats** — terminal (Rich), JSON, Markdown
|
|
51
|
+
- 🔗 **Clickable URLs** — every dork includes a direct search link
|
|
52
|
+
|
|
53
|
+
---
|
|
54
|
+
|
|
55
|
+
## Installation
|
|
56
|
+
|
|
57
|
+
```bash
|
|
58
|
+
pip install gitdork
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
Or from source:
|
|
62
|
+
|
|
63
|
+
```bash
|
|
64
|
+
git clone https://github.com/ExploitCraft/gitdork
|
|
65
|
+
cd gitdork
|
|
66
|
+
pip install -e .
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
---
|
|
70
|
+
|
|
71
|
+
## Quick Start
|
|
72
|
+
|
|
73
|
+
```bash
|
|
74
|
+
# Generate dorks for a domain
|
|
75
|
+
gitdork generate example.com
|
|
76
|
+
|
|
77
|
+
# Generate dorks for a GitHub org/repo
|
|
78
|
+
gitdork generate ExploitCraft/ReconNinja
|
|
79
|
+
|
|
80
|
+
# Google dorks only
|
|
81
|
+
gitdork generate example.com --engine google
|
|
82
|
+
|
|
83
|
+
# Secrets and misconfigs only
|
|
84
|
+
gitdork generate example.com --category secrets,misconfigs
|
|
85
|
+
|
|
86
|
+
# Enrich with GitHub API (detects tech stack for extra dorks)
|
|
87
|
+
gitdork generate ExploitCraft/ReconNinja --enrich
|
|
88
|
+
|
|
89
|
+
# Export to JSON
|
|
90
|
+
gitdork generate example.com --format json --output dorks.json
|
|
91
|
+
|
|
92
|
+
# Export to Markdown (great for reports)
|
|
93
|
+
gitdork generate example.com --format markdown --output dorks.md
|
|
94
|
+
|
|
95
|
+
# Group output by category instead of engine
|
|
96
|
+
gitdork generate example.com --group-by category
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
---
|
|
100
|
+
|
|
101
|
+
## Example Output
|
|
102
|
+
|
|
103
|
+
```
|
|
104
|
+
╭─ gitdork — Google, Shodan & GitHub dork generator ─╮
|
|
105
|
+
|
|
106
|
+
Target: example.com
|
|
107
|
+
|
|
108
|
+
── GOOGLE ──────────────────────────────────────────────
|
|
109
|
+
|
|
110
|
+
# CATEGORY DESCRIPTION QUERY
|
|
111
|
+
1 Secrets & Creds API keys in GitHub site:github.com "example.com" "api_key"
|
|
112
|
+
2 Sensitive Files .env files exposed site:example.com filetype:env
|
|
113
|
+
3 Sensitive Files Log files exposed site:example.com filetype:log
|
|
114
|
+
4 Exposed Dirs Open directory listings site:example.com intitle:"index of /"
|
|
115
|
+
5 Misconfigurations phpMyAdmin exposed site:example.com inurl:phpMyAdmin
|
|
116
|
+
...
|
|
117
|
+
|
|
118
|
+
── SHODAN ───────────────────────────────────────────────
|
|
119
|
+
|
|
120
|
+
# CATEGORY DESCRIPTION QUERY
|
|
121
|
+
1 Subdomains All hosts under this domain hostname:"example.com"
|
|
122
|
+
2 Misconfigs SSH exposed hostname:"example.com" port:22
|
|
123
|
+
3 Misconfigs Redis exposed (often no auth) hostname:"example.com" port:6379
|
|
124
|
+
...
|
|
125
|
+
|
|
126
|
+
╭─ Summary ──────────────────────╮
|
|
127
|
+
Total dorks 97
|
|
128
|
+
Google 42
|
|
129
|
+
Shodan 31
|
|
130
|
+
GitHub 24
|
|
131
|
+
╰────────────────────────────────╯
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
---
|
|
135
|
+
|
|
136
|
+
## Categories
|
|
137
|
+
|
|
138
|
+
| ID | Description |
|
|
139
|
+
|----|-------------|
|
|
140
|
+
| `secrets` | API keys, tokens, passwords, private keys |
|
|
141
|
+
| `sensitive_files` | .env, .sql, .log, .bak, config files |
|
|
142
|
+
| `exposed_dirs` | Open directory listings |
|
|
143
|
+
| `misconfigs` | phpMyAdmin, Jenkins, Grafana, Docker API, debug mode |
|
|
144
|
+
| `login_panels` | Admin panels, login pages |
|
|
145
|
+
| `error_pages` | Stack traces, PHP errors, SQL errors |
|
|
146
|
+
| `subdomains` | Subdomain enumeration, infra discovery |
|
|
147
|
+
| `code_leaks` | TODO credentials, internal-only code |
|
|
148
|
+
|
|
149
|
+
```bash
|
|
150
|
+
# View all categories
|
|
151
|
+
gitdork list-categories
|
|
152
|
+
|
|
153
|
+
# View all engines
|
|
154
|
+
gitdork list-engines
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
---
|
|
158
|
+
|
|
159
|
+
## CLI Reference
|
|
160
|
+
|
|
161
|
+
```
|
|
162
|
+
Usage: gitdork [OPTIONS] COMMAND [ARGS]...
|
|
163
|
+
|
|
164
|
+
Commands:
|
|
165
|
+
generate Generate dorks for a target
|
|
166
|
+
list-categories List all available categories
|
|
167
|
+
list-engines List all supported engines
|
|
168
|
+
|
|
169
|
+
Options for generate:
|
|
170
|
+
TARGET Domain, GitHub org/repo, or URL
|
|
171
|
+
--engine, -e google,shodan,github (default: all)
|
|
172
|
+
--category, -c Comma-separated category filter
|
|
173
|
+
--format terminal | json | markdown (default: terminal)
|
|
174
|
+
--output, -o Write to file
|
|
175
|
+
--group-by engine | category (default: engine)
|
|
176
|
+
--enrich Fetch GitHub metadata for tech-stack dorks
|
|
177
|
+
--token GitHub token for enrichment (or GITHUB_TOKEN env)
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
---
|
|
181
|
+
|
|
182
|
+
## Tech Stack Detection
|
|
183
|
+
|
|
184
|
+
With `--enrich`, gitdork queries the GitHub API to detect the repo's language, topics, and description — then generates additional targeted dorks:
|
|
185
|
+
|
|
186
|
+
| Tech | Extra dorks |
|
|
187
|
+
|------|-------------|
|
|
188
|
+
| `django` | DEBUG mode, SECRET_KEY, ALLOWED_HOSTS |
|
|
189
|
+
| `wordpress` | wp-config.php, upload PHP shells |
|
|
190
|
+
| `laravel` | .env APP_KEY |
|
|
191
|
+
| `aws` | aws_access_key_id in code |
|
|
192
|
+
| `kubernetes` | API server, Shodan product query |
|
|
193
|
+
| `terraform` | tfvars with secrets |
|
|
194
|
+
|
|
195
|
+
```bash
|
|
196
|
+
# Use your GitHub token for higher API rate limits
|
|
197
|
+
export GITHUB_TOKEN=ghp_...
|
|
198
|
+
gitdork generate ExploitCraft/ReconNinja --enrich
|
|
199
|
+
```
|
|
200
|
+
|
|
201
|
+
---
|
|
202
|
+
|
|
203
|
+
## Part of the HackerInc/ExploitCraft Ecosystem
|
|
204
|
+
|
|
205
|
+
| Tool | Description |
|
|
206
|
+
|------|-------------|
|
|
207
|
+
| [envleaks](https://github.com/ExploitCraft/envleaks) | Codebase & git history secret scanner |
|
|
208
|
+
| [gitdork](https://github.com/ExploitCraft/gitdork) | Google/Shodan dork generator (this repo) |
|
|
209
|
+
| [wifi-passview](https://github.com/ExploitCraft/wifi-passview) | Cross-platform WiFi credential dumper |
|
|
210
|
+
| **ReconNinja** | ReconNinja v6 — 21-phase recon framework |
|
|
211
|
+
| [VaultHound](https://github.com/ExploitCraft/VaultHound) | Secret & credential scanner |
|
|
212
|
+
|
|
213
|
+
---
|
|
214
|
+
|
|
215
|
+
## Disclaimer
|
|
216
|
+
|
|
217
|
+
gitdork generates search queries only — it does not perform any active scanning or exploitation. Use responsibly, only against targets you own or have explicit written permission to test.
|
|
218
|
+
|
|
219
|
+
---
|
|
220
|
+
|
|
221
|
+
## License
|
|
222
|
+
|
|
223
|
+
MIT © [ExploitCraft](https://github.com/ExploitCraft)
|
gitdork-1.0.0/README.md
ADDED
|
@@ -0,0 +1,193 @@
|
|
|
1
|
+
# 🎯 gitdork
|
|
2
|
+
|
|
3
|
+
> Google, Shodan, and GitHub dork generator. Feed it a repo URL or domain — get ready-to-use dork queries targeting exposed secrets, sensitive files, open directories, and misconfigs. Built for pentesters and bug bounty hunters.
|
|
4
|
+
|
|
5
|
+
[](https://github.com/ExploitCraft/gitdork/actions)
|
|
6
|
+
[](https://pypi.org/project/gitdork/)
|
|
7
|
+
[](https://pypi.org/project/gitdork/)
|
|
8
|
+
[](LICENSE)
|
|
9
|
+
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
## Features
|
|
13
|
+
|
|
14
|
+
- 🔍 **Google dorks** — `site:`, `filetype:`, `intitle:`, `inurl:` across 8 categories
|
|
15
|
+
- 🌐 **Shodan dorks** — `hostname:`, `port:`, `ssl:`, `product:` for infra recon
|
|
16
|
+
- 🐙 **GitHub code search** — `org:`, `filename:`, `extension:` for secret hunting
|
|
17
|
+
- 🧠 **Tech stack detection** — fetch GitHub metadata to generate tech-specific dorks
|
|
18
|
+
- 🗂️ **Category filtering** — focus on secrets, misconfigs, login panels, or any combo
|
|
19
|
+
- ⚙️ **Engine filtering** — run just Google, just Shodan, or all three
|
|
20
|
+
- 📊 **Multiple output formats** — terminal (Rich), JSON, Markdown
|
|
21
|
+
- 🔗 **Clickable URLs** — every dork includes a direct search link
|
|
22
|
+
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
## Installation
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
pip install gitdork
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
Or from source:
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
git clone https://github.com/ExploitCraft/gitdork
|
|
35
|
+
cd gitdork
|
|
36
|
+
pip install -e .
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
---
|
|
40
|
+
|
|
41
|
+
## Quick Start
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
# Generate dorks for a domain
|
|
45
|
+
gitdork generate example.com
|
|
46
|
+
|
|
47
|
+
# Generate dorks for a GitHub org/repo
|
|
48
|
+
gitdork generate ExploitCraft/ReconNinja
|
|
49
|
+
|
|
50
|
+
# Google dorks only
|
|
51
|
+
gitdork generate example.com --engine google
|
|
52
|
+
|
|
53
|
+
# Secrets and misconfigs only
|
|
54
|
+
gitdork generate example.com --category secrets,misconfigs
|
|
55
|
+
|
|
56
|
+
# Enrich with GitHub API (detects tech stack for extra dorks)
|
|
57
|
+
gitdork generate ExploitCraft/ReconNinja --enrich
|
|
58
|
+
|
|
59
|
+
# Export to JSON
|
|
60
|
+
gitdork generate example.com --format json --output dorks.json
|
|
61
|
+
|
|
62
|
+
# Export to Markdown (great for reports)
|
|
63
|
+
gitdork generate example.com --format markdown --output dorks.md
|
|
64
|
+
|
|
65
|
+
# Group output by category instead of engine
|
|
66
|
+
gitdork generate example.com --group-by category
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
---
|
|
70
|
+
|
|
71
|
+
## Example Output
|
|
72
|
+
|
|
73
|
+
```
|
|
74
|
+
╭─ gitdork — Google, Shodan & GitHub dork generator ─╮
|
|
75
|
+
|
|
76
|
+
Target: example.com
|
|
77
|
+
|
|
78
|
+
── GOOGLE ──────────────────────────────────────────────
|
|
79
|
+
|
|
80
|
+
# CATEGORY DESCRIPTION QUERY
|
|
81
|
+
1 Secrets & Creds API keys in GitHub site:github.com "example.com" "api_key"
|
|
82
|
+
2 Sensitive Files .env files exposed site:example.com filetype:env
|
|
83
|
+
3 Sensitive Files Log files exposed site:example.com filetype:log
|
|
84
|
+
4 Exposed Dirs Open directory listings site:example.com intitle:"index of /"
|
|
85
|
+
5 Misconfigurations phpMyAdmin exposed site:example.com inurl:phpMyAdmin
|
|
86
|
+
...
|
|
87
|
+
|
|
88
|
+
── SHODAN ───────────────────────────────────────────────
|
|
89
|
+
|
|
90
|
+
# CATEGORY DESCRIPTION QUERY
|
|
91
|
+
1 Subdomains All hosts under this domain hostname:"example.com"
|
|
92
|
+
2 Misconfigs SSH exposed hostname:"example.com" port:22
|
|
93
|
+
3 Misconfigs Redis exposed (often no auth) hostname:"example.com" port:6379
|
|
94
|
+
...
|
|
95
|
+
|
|
96
|
+
╭─ Summary ──────────────────────╮
|
|
97
|
+
Total dorks 97
|
|
98
|
+
Google 42
|
|
99
|
+
Shodan 31
|
|
100
|
+
GitHub 24
|
|
101
|
+
╰────────────────────────────────╯
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
---
|
|
105
|
+
|
|
106
|
+
## Categories
|
|
107
|
+
|
|
108
|
+
| ID | Description |
|
|
109
|
+
|----|-------------|
|
|
110
|
+
| `secrets` | API keys, tokens, passwords, private keys |
|
|
111
|
+
| `sensitive_files` | .env, .sql, .log, .bak, config files |
|
|
112
|
+
| `exposed_dirs` | Open directory listings |
|
|
113
|
+
| `misconfigs` | phpMyAdmin, Jenkins, Grafana, Docker API, debug mode |
|
|
114
|
+
| `login_panels` | Admin panels, login pages |
|
|
115
|
+
| `error_pages` | Stack traces, PHP errors, SQL errors |
|
|
116
|
+
| `subdomains` | Subdomain enumeration, infra discovery |
|
|
117
|
+
| `code_leaks` | TODO credentials, internal-only code |
|
|
118
|
+
|
|
119
|
+
```bash
|
|
120
|
+
# View all categories
|
|
121
|
+
gitdork list-categories
|
|
122
|
+
|
|
123
|
+
# View all engines
|
|
124
|
+
gitdork list-engines
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
---
|
|
128
|
+
|
|
129
|
+
## CLI Reference
|
|
130
|
+
|
|
131
|
+
```
|
|
132
|
+
Usage: gitdork [OPTIONS] COMMAND [ARGS]...
|
|
133
|
+
|
|
134
|
+
Commands:
|
|
135
|
+
generate Generate dorks for a target
|
|
136
|
+
list-categories List all available categories
|
|
137
|
+
list-engines List all supported engines
|
|
138
|
+
|
|
139
|
+
Options for generate:
|
|
140
|
+
TARGET Domain, GitHub org/repo, or URL
|
|
141
|
+
--engine, -e google,shodan,github (default: all)
|
|
142
|
+
--category, -c Comma-separated category filter
|
|
143
|
+
--format terminal | json | markdown (default: terminal)
|
|
144
|
+
--output, -o Write to file
|
|
145
|
+
--group-by engine | category (default: engine)
|
|
146
|
+
--enrich Fetch GitHub metadata for tech-stack dorks
|
|
147
|
+
--token GitHub token for enrichment (or GITHUB_TOKEN env)
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
---
|
|
151
|
+
|
|
152
|
+
## Tech Stack Detection
|
|
153
|
+
|
|
154
|
+
With `--enrich`, gitdork queries the GitHub API to detect the repo's language, topics, and description — then generates additional targeted dorks:
|
|
155
|
+
|
|
156
|
+
| Tech | Extra dorks |
|
|
157
|
+
|------|-------------|
|
|
158
|
+
| `django` | DEBUG mode, SECRET_KEY, ALLOWED_HOSTS |
|
|
159
|
+
| `wordpress` | wp-config.php, upload PHP shells |
|
|
160
|
+
| `laravel` | .env APP_KEY |
|
|
161
|
+
| `aws` | aws_access_key_id in code |
|
|
162
|
+
| `kubernetes` | API server, Shodan product query |
|
|
163
|
+
| `terraform` | tfvars with secrets |
|
|
164
|
+
|
|
165
|
+
```bash
|
|
166
|
+
# Use your GitHub token for higher API rate limits
|
|
167
|
+
export GITHUB_TOKEN=ghp_...
|
|
168
|
+
gitdork generate ExploitCraft/ReconNinja --enrich
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
---
|
|
172
|
+
|
|
173
|
+
## Part of the HackerInc/ExploitCraft Ecosystem
|
|
174
|
+
|
|
175
|
+
| Tool | Description |
|
|
176
|
+
|------|-------------|
|
|
177
|
+
| [envleaks](https://github.com/ExploitCraft/envleaks) | Codebase & git history secret scanner |
|
|
178
|
+
| [gitdork](https://github.com/ExploitCraft/gitdork) | Google/Shodan dork generator (this repo) |
|
|
179
|
+
| [wifi-passview](https://github.com/ExploitCraft/wifi-passview) | Cross-platform WiFi credential dumper |
|
|
180
|
+
| **ReconNinja** | ReconNinja v6 — 21-phase recon framework |
|
|
181
|
+
| [VaultHound](https://github.com/ExploitCraft/VaultHound) | Secret & credential scanner |
|
|
182
|
+
|
|
183
|
+
---
|
|
184
|
+
|
|
185
|
+
## Disclaimer
|
|
186
|
+
|
|
187
|
+
gitdork generates search queries only — it does not perform any active scanning or exploitation. Use responsibly, only against targets you own or have explicit written permission to test.
|
|
188
|
+
|
|
189
|
+
---
|
|
190
|
+
|
|
191
|
+
## License
|
|
192
|
+
|
|
193
|
+
MIT © [ExploitCraft](https://github.com/ExploitCraft)
|