leakhunt 2.2.1__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.
- leakhunt-2.2.1/LICENSE +21 -0
- leakhunt-2.2.1/PKG-INFO +247 -0
- leakhunt-2.2.1/README.md +227 -0
- leakhunt-2.2.1/leakhunt/__init__.py +3 -0
- leakhunt-2.2.1/leakhunt/__main__.py +3 -0
- leakhunt-2.2.1/leakhunt/cli.py +244 -0
- leakhunt-2.2.1/leakhunt/fetcher.py +94 -0
- leakhunt-2.2.1/leakhunt/patterns.py +78 -0
- leakhunt-2.2.1/leakhunt/scanner.py +169 -0
- leakhunt-2.2.1/leakhunt/utils.py +40 -0
- leakhunt-2.2.1/leakhunt.egg-info/PKG-INFO +247 -0
- leakhunt-2.2.1/leakhunt.egg-info/SOURCES.txt +20 -0
- leakhunt-2.2.1/leakhunt.egg-info/dependency_links.txt +1 -0
- leakhunt-2.2.1/leakhunt.egg-info/entry_points.txt +2 -0
- leakhunt-2.2.1/leakhunt.egg-info/requires.txt +9 -0
- leakhunt-2.2.1/leakhunt.egg-info/top_level.txt +1 -0
- leakhunt-2.2.1/pyproject.toml +27 -0
- leakhunt-2.2.1/setup.cfg +4 -0
- leakhunt-2.2.1/setup.py +17 -0
- leakhunt-2.2.1/tests/test_cli.py +117 -0
- leakhunt-2.2.1/tests/test_fetcher.py +19 -0
- leakhunt-2.2.1/tests/test_scanner.py +48 -0
leakhunt-2.2.1/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 Drag0nSlay
|
|
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.
|
leakhunt-2.2.1/PKG-INFO
ADDED
|
@@ -0,0 +1,247 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: leakhunt
|
|
3
|
+
Version: 2.2.1
|
|
4
|
+
Summary: A tool to detect sensitive information leaks in code
|
|
5
|
+
Author: Drag0nSlay
|
|
6
|
+
License: MIT
|
|
7
|
+
Requires-Python: >=3.9
|
|
8
|
+
Description-Content-Type: text/markdown
|
|
9
|
+
License-File: LICENSE
|
|
10
|
+
Requires-Dist: beautifulsoup4
|
|
11
|
+
Requires-Dist: colorama
|
|
12
|
+
Requires-Dist: requests>=2.31.0
|
|
13
|
+
Requires-Dist: tenacity>=8.2.3
|
|
14
|
+
Requires-Dist: tqdm>=4.66.0
|
|
15
|
+
Requires-Dist: pyyaml>=6.0
|
|
16
|
+
Provides-Extra: dev
|
|
17
|
+
Requires-Dist: pytest>=7.0; extra == "dev"
|
|
18
|
+
Dynamic: license-file
|
|
19
|
+
Dynamic: requires-python
|
|
20
|
+
|
|
21
|
+
# π **LeakHunt v2.2.1 - Production Ready Secret Scanner**
|
|
22
|
+
|
|
23
|
+
**Independent secret scanner** for bug bounty hunters and security testers. Scans URLs, local files, and directories to detect exposed secrets using pattern matching, entropy analysis, and severity classification.
|
|
24
|
+
|
|
25
|
+
[](https://pypi.org/project/leakhunt/)
|
|
26
|
+
[](https://github.com/Drag0nSlay/LeakHunt/actions)
|
|
27
|
+
|
|
28
|
+
## π What's New in v2.2.1
|
|
29
|
+
- Pluggable pattern loading via leakhunt.patterns module
|
|
30
|
+
- load_patterns with DEFAULT_PATTERNS_DIR and SecretPattern dataclass
|
|
31
|
+
- YAML pattern loader with sorted *.yaml discovery and hardcoded fallback
|
|
32
|
+
- Generic regexes now support spaces around =/: and secrets up to 128 chars
|
|
33
|
+
- Scanner accepts optional patterns parameter for custom pattern sets
|
|
34
|
+
- CLI --patterns-dir flag wires custom patterns directly into scan_many
|
|
35
|
+
- Fixed api_key = "..." (spaced assignment) detection
|
|
36
|
+
- CI pipeline hardened across Python 3.9, 3.10, 3.11, 3.12
|
|
37
|
+
- Added pip caching and retry logic to GitHub Actions workflow
|
|
38
|
+
- Fixed lab/targets.txt missing on CI runners (auto-created in workflow)
|
|
39
|
+
- All tests passing across all supported Python versions
|
|
40
|
+
|
|
41
|
+
## π Whatβs New in v2.2.0 (Feature List)
|
|
42
|
+
|
|
43
|
+
### Core Detection Features
|
|
44
|
+
- β
12+ Production Patterns
|
|
45
|
+
- GitHub Tokens (ghp_, github_pat_)
|
|
46
|
+
- AWS Access Keys (AKIA...)
|
|
47
|
+
- Generic API Keys (api_key=, token=)
|
|
48
|
+
- Slack/Discord Tokens
|
|
49
|
+
- Private Keys (RSA/ECDSA)
|
|
50
|
+
- JWT Tokens
|
|
51
|
+
- Mailgun/SendGrid/Twilio
|
|
52
|
+
- Firebase Keys
|
|
53
|
+
|
|
54
|
+
- β
Shannon Entropy Analysis (3.5 default)
|
|
55
|
+
- β
Severity Classification (high/medium/low)
|
|
56
|
+
- β
False Positive Reduction
|
|
57
|
+
- β
Deterministic Ordering
|
|
58
|
+
|
|
59
|
+
### Performance Features
|
|
60
|
+
- β
Multi-Threaded Fetching (-t 15)
|
|
61
|
+
- β
Progress Bars (tqdm)
|
|
62
|
+
- β
Memory Efficient Processing
|
|
63
|
+
- β
Stable Result Ordering
|
|
64
|
+
- β
Graceful Error Handling
|
|
65
|
+
- β
Thread-Safe Operations
|
|
66
|
+
|
|
67
|
+
### Security & Privacy
|
|
68
|
+
- β
SAFE MODE (--safe-mode)
|
|
69
|
+
- ghp_abcde...f123 (masked)
|
|
70
|
+
- AKIAIOSF...MPLE (masked)
|
|
71
|
+
- No secret exposure in logs
|
|
72
|
+
|
|
73
|
+
- β
No External Dependencies
|
|
74
|
+
- β
No Network Calls During Scan
|
|
75
|
+
- β
Clean Error Messages
|
|
76
|
+
|
|
77
|
+
### CLI Features
|
|
78
|
+
- β
Input Flexibility
|
|
79
|
+
- **Positional:** leakhunt file.txt url.com
|
|
80
|
+
- **URLs:** -u url -u url2
|
|
81
|
+
- **URL File:** -U targets.txt
|
|
82
|
+
- **Files:** -f file1 -f file2
|
|
83
|
+
|
|
84
|
+
- β
Output Options
|
|
85
|
+
- Console (colored/rich)
|
|
86
|
+
- JSON Export (-o results.json)
|
|
87
|
+
- Verbose Debug (-v)
|
|
88
|
+
- No Color (--no-color)
|
|
89
|
+
|
|
90
|
+
- β
Configuration
|
|
91
|
+
- --entropy-threshold 3.0
|
|
92
|
+
- --patterns-dir patterns/
|
|
93
|
+
- --threads 10
|
|
94
|
+
- --dry-run (validate only)
|
|
95
|
+
|
|
96
|
+
### Extensibility
|
|
97
|
+
β
YAML Pattern System
|
|
98
|
+
```bash
|
|
99
|
+
patterns/
|
|
100
|
+
βββ api_keys.yaml
|
|
101
|
+
βββ generic.yaml
|
|
102
|
+
βββ custom.yaml
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
β
Pattern Format
|
|
106
|
+
```yaml
|
|
107
|
+
- name: "Stripe API Key"
|
|
108
|
+
regex: "sk_live_[0-9a-zA-Z]{24,}"
|
|
109
|
+
severity: "high"
|
|
110
|
+
entropy_required: false
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
### Testing & Validation
|
|
114
|
+
- β
Local Lab Included
|
|
115
|
+
```bash
|
|
116
|
+
lab/
|
|
117
|
+
βββ targets.txt
|
|
118
|
+
βββ index.html (GitHub tokens)
|
|
119
|
+
βββ test_private_key.txt
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
- β
Dry Run Mode
|
|
123
|
+
- β
Regression Test Suite
|
|
124
|
+
- β
All Tests Passing
|
|
125
|
+
- β
Deterministic Output
|
|
126
|
+
|
|
127
|
+
## Detection Matrix
|
|
128
|
+
|
|
129
|
+
| Pattern Type | Example Match | Severity | Entropy Filter |
|
|
130
|
+
| ------------ | -------------- | -------- | -------------- |
|
|
131
|
+
| GitHub Token | ghp_xxxxxxxxxx | HIGH | β No |
|
|
132
|
+
| AWS Key | AKIAxxxxxxxxxx | HIGH | β No |
|
|
133
|
+
| API Key | api_key="xxx" | MEDIUM | β No |
|
|
134
|
+
| JWT | eyJxxxxx.xxx | MEDIUM | β
Yes |
|
|
135
|
+
| Slack | xoxb-xxxx | HIGH | β No |
|
|
136
|
+
|
|
137
|
+
---
|
|
138
|
+
|
|
139
|
+
## π Whatβs New in v2.1.2 (Old Version)
|
|
140
|
+
|
|
141
|
+
### π Stability & Error Handling
|
|
142
|
+
- Graceful handling of missing or unreadable target list files
|
|
143
|
+
- Safe JSON output handling with clean error messages
|
|
144
|
+
- No more unexpected CLI crashes
|
|
145
|
+
|
|
146
|
+
### π§ͺ CLI Improvements
|
|
147
|
+
- Strict validation for `--threads` (must be positive integer)
|
|
148
|
+
- Clean argparse errors for invalid or non-numeric input
|
|
149
|
+
- Programmatic CLI support via `parse_args(argv=...)`
|
|
150
|
+
|
|
151
|
+
### βοΈ Deterministic Output
|
|
152
|
+
- Stable ordering of scan results across runs
|
|
153
|
+
- Fetch results preserve original target order
|
|
154
|
+
- Consistent JSON output for automation & pipelines
|
|
155
|
+
|
|
156
|
+
### π§° Testing Enhancements
|
|
157
|
+
- Added regression tests for:
|
|
158
|
+
- Missing files
|
|
159
|
+
- Invalid output paths
|
|
160
|
+
- Invalid thread values
|
|
161
|
+
- Fetch order consistency
|
|
162
|
+
- Stable scan ordering
|
|
163
|
+
|
|
164
|
+
- Test suite fully passing:
|
|
165
|
+
- pytest -q 6 passed
|
|
166
|
+
|
|
167
|
+
---
|
|
168
|
+
|
|
169
|
+
## βοΈ Installation
|
|
170
|
+
|
|
171
|
+
```bash
|
|
172
|
+
pip install -r requirements.txt
|
|
173
|
+
pip install .
|
|
174
|
+
```
|
|
175
|
+
|
|
176
|
+
## π CLI Usage
|
|
177
|
+
|
|
178
|
+
```bash
|
|
179
|
+
# mixed targets
|
|
180
|
+
leakhunt -t 8 -o findings.json https://example.com/app.js ./local.js
|
|
181
|
+
|
|
182
|
+
# multiple URLs
|
|
183
|
+
leakhunt -u https://example.com/app.js -u https://example.com/main.js
|
|
184
|
+
|
|
185
|
+
# targets from file
|
|
186
|
+
leakhunt -U lab/targets.txt -t 10 -v
|
|
187
|
+
|
|
188
|
+
# local files
|
|
189
|
+
leakhunt -f lab/index.html -f lab/test_private_key.txt
|
|
190
|
+
|
|
191
|
+
# Bug Bounty
|
|
192
|
+
leakhunt --safe-mode -t 15 -U targets.txt -o findings.json -v
|
|
193
|
+
|
|
194
|
+
# Lab Testing
|
|
195
|
+
leakhunt --safe-mode -U lab/targets.txt
|
|
196
|
+
|
|
197
|
+
# Custom Patterns
|
|
198
|
+
leakhunt --patterns-dir patterns/ test.txt
|
|
199
|
+
|
|
200
|
+
# Dry Run
|
|
201
|
+
leakhunt --dry-run -U urls.txt
|
|
202
|
+
|
|
203
|
+
# Low Entropy
|
|
204
|
+
leakhunt --entropy-threshold 3.0 --safe-mode files/
|
|
205
|
+
```
|
|
206
|
+
|
|
207
|
+
## π§ͺ Local Testing Lab
|
|
208
|
+
|
|
209
|
+
1. Start a local server from repo root
|
|
210
|
+
2. In another terminal:
|
|
211
|
+
`leakhunt -U lab/targets.txt -t 5 -v -o lab/results.json`
|
|
212
|
+
|
|
213
|
+
**Lab includes:**
|
|
214
|
+
- `lab/index.html` β dummy tokens
|
|
215
|
+
- `lab/test_private_key.txt` β dummy private key
|
|
216
|
+
|
|
217
|
+
## β οΈ Ethics Warning
|
|
218
|
+
|
|
219
|
+
> Use LeakHunt only on systems you own or have explicit authorization to test. Unauthorized scanning may violate laws and responsible disclosure policies.
|
|
220
|
+
|
|
221
|
+
## π¦ Release Notes
|
|
222
|
+
|
|
223
|
+
**v2.2.0**
|
|
224
|
+
|
|
225
|
+
- **SAFE MODE -** Masks secrets: ghp_abcde...f123
|
|
226
|
+
- **GENERIC API KEYS -** api_key="123456..."
|
|
227
|
+
- **PROGRESS BARS -** Real-time fetching status
|
|
228
|
+
- **DRY RUN -** Validate targets without scanning
|
|
229
|
+
- **YAML PATTERNS -** Extensible pattern system
|
|
230
|
+
- **12+ PRODUCTION PATTERNS -** GitHub, AWS, Slack+
|
|
231
|
+
- **GIT BUG BOUNTY READY -** Deterministic output
|
|
232
|
+
|
|
233
|
+
**v2.1.2**
|
|
234
|
+
|
|
235
|
+
- Deterministic scan result ordering
|
|
236
|
+
- Stable fetch order preservation
|
|
237
|
+
- Improved CLI argument validation
|
|
238
|
+
- Graceful error handling for file I/O
|
|
239
|
+
- Programmatic CLI support for testing
|
|
240
|
+
- Expanded regression test coverage
|
|
241
|
+
|
|
242
|
+
**v2.0.0**
|
|
243
|
+
- Full project refactor into package layout
|
|
244
|
+
- Independent scanning engine
|
|
245
|
+
- Multi-threaded fetching
|
|
246
|
+
- JSON reporting + severity summaries
|
|
247
|
+
- Local testing lab
|
leakhunt-2.2.1/README.md
ADDED
|
@@ -0,0 +1,227 @@
|
|
|
1
|
+
# π **LeakHunt v2.2.1 - Production Ready Secret Scanner**
|
|
2
|
+
|
|
3
|
+
**Independent secret scanner** for bug bounty hunters and security testers. Scans URLs, local files, and directories to detect exposed secrets using pattern matching, entropy analysis, and severity classification.
|
|
4
|
+
|
|
5
|
+
[](https://pypi.org/project/leakhunt/)
|
|
6
|
+
[](https://github.com/Drag0nSlay/LeakHunt/actions)
|
|
7
|
+
|
|
8
|
+
## π What's New in v2.2.1
|
|
9
|
+
- Pluggable pattern loading via leakhunt.patterns module
|
|
10
|
+
- load_patterns with DEFAULT_PATTERNS_DIR and SecretPattern dataclass
|
|
11
|
+
- YAML pattern loader with sorted *.yaml discovery and hardcoded fallback
|
|
12
|
+
- Generic regexes now support spaces around =/: and secrets up to 128 chars
|
|
13
|
+
- Scanner accepts optional patterns parameter for custom pattern sets
|
|
14
|
+
- CLI --patterns-dir flag wires custom patterns directly into scan_many
|
|
15
|
+
- Fixed api_key = "..." (spaced assignment) detection
|
|
16
|
+
- CI pipeline hardened across Python 3.9, 3.10, 3.11, 3.12
|
|
17
|
+
- Added pip caching and retry logic to GitHub Actions workflow
|
|
18
|
+
- Fixed lab/targets.txt missing on CI runners (auto-created in workflow)
|
|
19
|
+
- All tests passing across all supported Python versions
|
|
20
|
+
|
|
21
|
+
## π Whatβs New in v2.2.0 (Feature List)
|
|
22
|
+
|
|
23
|
+
### Core Detection Features
|
|
24
|
+
- β
12+ Production Patterns
|
|
25
|
+
- GitHub Tokens (ghp_, github_pat_)
|
|
26
|
+
- AWS Access Keys (AKIA...)
|
|
27
|
+
- Generic API Keys (api_key=, token=)
|
|
28
|
+
- Slack/Discord Tokens
|
|
29
|
+
- Private Keys (RSA/ECDSA)
|
|
30
|
+
- JWT Tokens
|
|
31
|
+
- Mailgun/SendGrid/Twilio
|
|
32
|
+
- Firebase Keys
|
|
33
|
+
|
|
34
|
+
- β
Shannon Entropy Analysis (3.5 default)
|
|
35
|
+
- β
Severity Classification (high/medium/low)
|
|
36
|
+
- β
False Positive Reduction
|
|
37
|
+
- β
Deterministic Ordering
|
|
38
|
+
|
|
39
|
+
### Performance Features
|
|
40
|
+
- β
Multi-Threaded Fetching (-t 15)
|
|
41
|
+
- β
Progress Bars (tqdm)
|
|
42
|
+
- β
Memory Efficient Processing
|
|
43
|
+
- β
Stable Result Ordering
|
|
44
|
+
- β
Graceful Error Handling
|
|
45
|
+
- β
Thread-Safe Operations
|
|
46
|
+
|
|
47
|
+
### Security & Privacy
|
|
48
|
+
- β
SAFE MODE (--safe-mode)
|
|
49
|
+
- ghp_abcde...f123 (masked)
|
|
50
|
+
- AKIAIOSF...MPLE (masked)
|
|
51
|
+
- No secret exposure in logs
|
|
52
|
+
|
|
53
|
+
- β
No External Dependencies
|
|
54
|
+
- β
No Network Calls During Scan
|
|
55
|
+
- β
Clean Error Messages
|
|
56
|
+
|
|
57
|
+
### CLI Features
|
|
58
|
+
- β
Input Flexibility
|
|
59
|
+
- **Positional:** leakhunt file.txt url.com
|
|
60
|
+
- **URLs:** -u url -u url2
|
|
61
|
+
- **URL File:** -U targets.txt
|
|
62
|
+
- **Files:** -f file1 -f file2
|
|
63
|
+
|
|
64
|
+
- β
Output Options
|
|
65
|
+
- Console (colored/rich)
|
|
66
|
+
- JSON Export (-o results.json)
|
|
67
|
+
- Verbose Debug (-v)
|
|
68
|
+
- No Color (--no-color)
|
|
69
|
+
|
|
70
|
+
- β
Configuration
|
|
71
|
+
- --entropy-threshold 3.0
|
|
72
|
+
- --patterns-dir patterns/
|
|
73
|
+
- --threads 10
|
|
74
|
+
- --dry-run (validate only)
|
|
75
|
+
|
|
76
|
+
### Extensibility
|
|
77
|
+
β
YAML Pattern System
|
|
78
|
+
```bash
|
|
79
|
+
patterns/
|
|
80
|
+
βββ api_keys.yaml
|
|
81
|
+
βββ generic.yaml
|
|
82
|
+
βββ custom.yaml
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
β
Pattern Format
|
|
86
|
+
```yaml
|
|
87
|
+
- name: "Stripe API Key"
|
|
88
|
+
regex: "sk_live_[0-9a-zA-Z]{24,}"
|
|
89
|
+
severity: "high"
|
|
90
|
+
entropy_required: false
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
### Testing & Validation
|
|
94
|
+
- β
Local Lab Included
|
|
95
|
+
```bash
|
|
96
|
+
lab/
|
|
97
|
+
βββ targets.txt
|
|
98
|
+
βββ index.html (GitHub tokens)
|
|
99
|
+
βββ test_private_key.txt
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
- β
Dry Run Mode
|
|
103
|
+
- β
Regression Test Suite
|
|
104
|
+
- β
All Tests Passing
|
|
105
|
+
- β
Deterministic Output
|
|
106
|
+
|
|
107
|
+
## Detection Matrix
|
|
108
|
+
|
|
109
|
+
| Pattern Type | Example Match | Severity | Entropy Filter |
|
|
110
|
+
| ------------ | -------------- | -------- | -------------- |
|
|
111
|
+
| GitHub Token | ghp_xxxxxxxxxx | HIGH | β No |
|
|
112
|
+
| AWS Key | AKIAxxxxxxxxxx | HIGH | β No |
|
|
113
|
+
| API Key | api_key="xxx" | MEDIUM | β No |
|
|
114
|
+
| JWT | eyJxxxxx.xxx | MEDIUM | β
Yes |
|
|
115
|
+
| Slack | xoxb-xxxx | HIGH | β No |
|
|
116
|
+
|
|
117
|
+
---
|
|
118
|
+
|
|
119
|
+
## π Whatβs New in v2.1.2 (Old Version)
|
|
120
|
+
|
|
121
|
+
### π Stability & Error Handling
|
|
122
|
+
- Graceful handling of missing or unreadable target list files
|
|
123
|
+
- Safe JSON output handling with clean error messages
|
|
124
|
+
- No more unexpected CLI crashes
|
|
125
|
+
|
|
126
|
+
### π§ͺ CLI Improvements
|
|
127
|
+
- Strict validation for `--threads` (must be positive integer)
|
|
128
|
+
- Clean argparse errors for invalid or non-numeric input
|
|
129
|
+
- Programmatic CLI support via `parse_args(argv=...)`
|
|
130
|
+
|
|
131
|
+
### βοΈ Deterministic Output
|
|
132
|
+
- Stable ordering of scan results across runs
|
|
133
|
+
- Fetch results preserve original target order
|
|
134
|
+
- Consistent JSON output for automation & pipelines
|
|
135
|
+
|
|
136
|
+
### π§° Testing Enhancements
|
|
137
|
+
- Added regression tests for:
|
|
138
|
+
- Missing files
|
|
139
|
+
- Invalid output paths
|
|
140
|
+
- Invalid thread values
|
|
141
|
+
- Fetch order consistency
|
|
142
|
+
- Stable scan ordering
|
|
143
|
+
|
|
144
|
+
- Test suite fully passing:
|
|
145
|
+
- pytest -q 6 passed
|
|
146
|
+
|
|
147
|
+
---
|
|
148
|
+
|
|
149
|
+
## βοΈ Installation
|
|
150
|
+
|
|
151
|
+
```bash
|
|
152
|
+
pip install -r requirements.txt
|
|
153
|
+
pip install .
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
## π CLI Usage
|
|
157
|
+
|
|
158
|
+
```bash
|
|
159
|
+
# mixed targets
|
|
160
|
+
leakhunt -t 8 -o findings.json https://example.com/app.js ./local.js
|
|
161
|
+
|
|
162
|
+
# multiple URLs
|
|
163
|
+
leakhunt -u https://example.com/app.js -u https://example.com/main.js
|
|
164
|
+
|
|
165
|
+
# targets from file
|
|
166
|
+
leakhunt -U lab/targets.txt -t 10 -v
|
|
167
|
+
|
|
168
|
+
# local files
|
|
169
|
+
leakhunt -f lab/index.html -f lab/test_private_key.txt
|
|
170
|
+
|
|
171
|
+
# Bug Bounty
|
|
172
|
+
leakhunt --safe-mode -t 15 -U targets.txt -o findings.json -v
|
|
173
|
+
|
|
174
|
+
# Lab Testing
|
|
175
|
+
leakhunt --safe-mode -U lab/targets.txt
|
|
176
|
+
|
|
177
|
+
# Custom Patterns
|
|
178
|
+
leakhunt --patterns-dir patterns/ test.txt
|
|
179
|
+
|
|
180
|
+
# Dry Run
|
|
181
|
+
leakhunt --dry-run -U urls.txt
|
|
182
|
+
|
|
183
|
+
# Low Entropy
|
|
184
|
+
leakhunt --entropy-threshold 3.0 --safe-mode files/
|
|
185
|
+
```
|
|
186
|
+
|
|
187
|
+
## π§ͺ Local Testing Lab
|
|
188
|
+
|
|
189
|
+
1. Start a local server from repo root
|
|
190
|
+
2. In another terminal:
|
|
191
|
+
`leakhunt -U lab/targets.txt -t 5 -v -o lab/results.json`
|
|
192
|
+
|
|
193
|
+
**Lab includes:**
|
|
194
|
+
- `lab/index.html` β dummy tokens
|
|
195
|
+
- `lab/test_private_key.txt` β dummy private key
|
|
196
|
+
|
|
197
|
+
## β οΈ Ethics Warning
|
|
198
|
+
|
|
199
|
+
> Use LeakHunt only on systems you own or have explicit authorization to test. Unauthorized scanning may violate laws and responsible disclosure policies.
|
|
200
|
+
|
|
201
|
+
## π¦ Release Notes
|
|
202
|
+
|
|
203
|
+
**v2.2.0**
|
|
204
|
+
|
|
205
|
+
- **SAFE MODE -** Masks secrets: ghp_abcde...f123
|
|
206
|
+
- **GENERIC API KEYS -** api_key="123456..."
|
|
207
|
+
- **PROGRESS BARS -** Real-time fetching status
|
|
208
|
+
- **DRY RUN -** Validate targets without scanning
|
|
209
|
+
- **YAML PATTERNS -** Extensible pattern system
|
|
210
|
+
- **12+ PRODUCTION PATTERNS -** GitHub, AWS, Slack+
|
|
211
|
+
- **GIT BUG BOUNTY READY -** Deterministic output
|
|
212
|
+
|
|
213
|
+
**v2.1.2**
|
|
214
|
+
|
|
215
|
+
- Deterministic scan result ordering
|
|
216
|
+
- Stable fetch order preservation
|
|
217
|
+
- Improved CLI argument validation
|
|
218
|
+
- Graceful error handling for file I/O
|
|
219
|
+
- Programmatic CLI support for testing
|
|
220
|
+
- Expanded regression test coverage
|
|
221
|
+
|
|
222
|
+
**v2.0.0**
|
|
223
|
+
- Full project refactor into package layout
|
|
224
|
+
- Independent scanning engine
|
|
225
|
+
- Multi-threaded fetching
|
|
226
|
+
- JSON reporting + severity summaries
|
|
227
|
+
- Local testing lab
|