Skip to content

Commit f73069c

Browse files
authored
Merge branch 'main' into test/pattern-improvements
2 parents dde976e + 5997af2 commit f73069c

126 files changed

Lines changed: 2833 additions & 1390 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

CONTRIBUTING.md

Lines changed: 17 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ This project separates two kinds of checks:
77
- Username availability checks (under `user_scanner/user_scan/*`) — synchronous validators that the main username scanner uses.
88
- Email OSINT checks (under `user_scanner/email_scan/`) — asynchronous, multi-step flows that probe signup pages or email-focused APIs. Put email-focused modules in `user_scanner/email_scan/` (subfolders like `social/`, `dev/`, `community`, `creator` etc. are fine — follow the existing tree).
99

10-
1110
---
1211

1312
## Module naming for both `email_scan` and `user_scan` modules
@@ -17,10 +16,10 @@ This project separates two kinds of checks:
1716

1817
---
1918

20-
2119
## Email-scan (email_scan) — guide for contributors
2220

2321
Minimal best-practices checklist for email modules
22+
2423
- [ ] Put file in `user_scanner/email_scan/<category>/service.py`.
2524
- [ ] Export `async def validate_<service>(email: str) -> Result`.
2625
- [ ] Use `httpx.AsyncClient` for requests, with sensible timeouts and follow_redirects when needed.
@@ -37,13 +36,13 @@ from user_scanner.core.result import Result
3736
async def _check(email: str) -> Result:
3837
"""
3938
Internal helper that performs the multi-step signup probe.
40-
41-
This function demonstrates how to handle CSRF tokens, custom error
39+
40+
This function demonstrates how to handle CSRF tokens, custom error
4241
messages (like IP bans), and passing the target URL back to Results.
4342
"""
4443
# The display URL used for output and error reporting
4544
show_url = "https://mastodon.social"
46-
45+
4746
signup_url = f"{show_url}/auth/sign_up"
4847
post_url = f"{show_url}/auth"
4948

@@ -87,17 +86,17 @@ async def _check(email: str) -> Result:
8786
# 3. Analyze the response to determine account status
8887
if "has already been taken" in res_text:
8988
return Result.taken(url=show_url)
90-
89+
9190
elif "registration attempt has been blocked" in res_text:
9291
return Result.error("Your IP has been flagged by Mastodon", url=show_url)
93-
92+
9493
elif res_status == 429:
9594
return Result.error("Rate limited; try using the '-d' flag", url=show_url)
96-
95+
9796
elif res_status in [200, 302]:
9897
# If no 'taken' message is found and status is OK/Redirect, it's available
9998
return Result.available(url=show_url)
100-
99+
101100
else:
102101
return Result.error("Unexpected response body", url=show_url)
103102

@@ -109,21 +108,19 @@ async def _check(email: str) -> Result:
109108
async def validate_mastodon(email: str) -> Result:
110109
"""
111110
Public validator used by the email mode.
112-
113-
All email modules must export a 'validate_<name>' function that
111+
112+
All email modules must export a 'validate_<name>' function that
114113
returns a Result object.
115114
"""
116115
return await _check(email)
117116

118117

119118
```
120119

121-
122120
---
123121

124122
## Username availability check guide:
125123

126-
127124
### Validator function (user_scan/)
128125

129126
Each module must expose exactly one validator function named:
@@ -134,6 +131,7 @@ def validate_<sitename>(user: str) -> Result:
134131
```
135132

136133
Rules:
134+
137135
- Single parameter: the username (str).
138136
- Return a Result object (use Result.available(), Result.taken(), or Result.error(msg)).
139137
- Keep the function synchronous unless you are implementing an optional async variant; prefer sync for consistency.
@@ -146,6 +144,7 @@ Rules:
146144
To keep validators DRY, the repository provides helper functions in `core/orchestrator.py`. Use these where appropriate.
147145

148146
1. generic_validate
147+
149148
- Purpose: Run a request for a given URL and let a small callback (processor) inspect the httpx.Response and return a Result.
150149
- Typical signature (example — consult the actual orchestrator implementation for exact parameter names):
151150
- `generic_validate(url: str, processor: Callable[[httpx.Response], Result], headers: Optional[dict] = None, show_url=None, timeout: float = 5.0, follow_redirects: bool = False) -> Result`
@@ -155,6 +154,7 @@ To keep validators DRY, the repository provides helper functions in `core/orches
155154
- Use case: Sites that return 200 for both found and not-found states and require checking the HTML body for a unique "not found" string (or other content inspection).
156155

157156
### Example `github.py` module:
157+
158158
- This example shows how to use `generic_validate()` and how to return Result values with optional error messages.
159159

160160
```python
@@ -166,7 +166,7 @@ def validate_github(user: str) -> Result:
166166
Use this when the site requires complex logic or response body parsing.
167167
"""
168168
url = f"https://github.com/signup_check/username?value={user}"
169-
169+
170170
# Define show_url for clean output display
171171
show_url = "https://github.com"
172172

@@ -185,7 +185,7 @@ def validate_github(user: str) -> Result:
185185
def process(response):
186186
"""
187187
Internal processing function.
188-
Note: You don't need to pass 'url' here;
188+
Note: You don't need to pass 'url' here;
189189
generic_validate will attach it automatically from the kwargs.
190190
"""
191191
if response.status_code == 200:
@@ -199,25 +199,13 @@ def validate_github(user: str) -> Result:
199199

200200
return Result.error(f"GitHub returned unexpected status: {response.status_code}")
201201

202-
# Pass show_url into generic_validate so the Orchestrator
202+
# Pass show_url into generic_validate so the Orchestrator
203203
# can attach it to the final Result object.
204204
return generic_validate(url, process, headers=headers, show_url=show_url)
205-
206-
207-
if __name__ == "__main__":
208-
user = input("Username?: ").strip()
209-
result = validate_github(user)
210-
211-
if result.is_available():
212-
print("Available!")
213-
elif result.is_taken():
214-
print(f"Unavailable! Site: {result.url}")
215-
else:
216-
print(f"Error: {result.get_reason()}")
217-
218205
```
219206

220207
2. status_validate
208+
221209
- Purpose: Simple helper for sites where availability can be determined purely from HTTP status codes (e.g., 404 = available, 200 = taken).
222210
- Typical signature (example):
223211
- `status_validate(url: str, available_status: int, taken_status: int, show_url=None, headers: Optional[dict] = None, timeout: float = 5.0, follow_redirects: bool = False) -> Result`
@@ -263,7 +251,6 @@ Note: The exact parameter names and behavior of the orchestrator functions are d
263251

264252
---
265253

266-
267254
## Return values and error handling
268255

269256
- Always return a Result object:

README.md

Lines changed: 15 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
![User Scanner Logo](https://github.com/user-attachments/assets/49ec8d24-665b-4115-8525-01a8d0ca2ef4)
44
<p align="center">
5-
<img src="https://img.shields.io/badge/Version-1.3.0.2-blueviolet?style=for-the-badge&logo=github" />
5+
<img src="https://img.shields.io/badge/Version-1.3.3.3-blueviolet?style=for-the-badge&logo=github" />
66
<img src="https://img.shields.io/github/issues/kaifcodec/user-scanner?style=for-the-badge&logo=github" />
77
<img src="https://img.shields.io/badge/Tested%20on-Termux-black?style=for-the-badge&logo=termux" />
88
<img src="https://img.shields.io/badge/Tested%20on-Windows-cyan?style=for-the-badge&logo=Windows" />
@@ -12,17 +12,17 @@
1212

1313
---
1414

15-
A powerful *Email OSINT tool* that checks if a specific email is registered on various sites, combined with *username scanning* for branding or OSINT — 2-in-1 tool.
15+
A powerful *Email OSINT tool* that checks if a specific email is registered on various sites, combined with *username scanning* for OSINT or branding — 2-in-1 tool.
1616

17-
Perfect for fast, accurate and lightweight email OSINT
17+
Perfect for fast, accurate username and email OSINT
1818

19-
Perfect for finding a **unique username** across GitHub, Twitter, Reddit, Instagram, and more, all in a single command.
19+
Also perfect for finding a **unique username** across GitHub, Twitter, Reddit, Instagram, and more, all in a single command.
2020

2121
## Features
2222

2323
- ✅ Email & username OSINT: check email registrations and username availability across social, developer, creator, and other platforms
2424
- ✅ Dual-mode usage: works as an email scanner, username scanner, or username-only tool
25-
- ✅ Clear results: `Registered` / `Not Registered` for emails and `Available` / `Taken` / `Error` for usernames with precise failure reasons
25+
- ✅ Clear results: `Registered` / `Not Registered` for emails and `Not Found` / `Found` / `Error` for usernames with precise failure reasons
2626
- ✅ Fully modular architecture for easy addition of new platform modules
2727
- ✅ Bulk scanning support for usernames and emails via input files
2828
- ✅ Wildcard-based username permutations with automatic variation generation
@@ -65,8 +65,8 @@ See [Important flags](docs/FLAGS.md) here and use the tool powerfully
6565
Scan a single email or username across **all** available modules/platforms:
6666

6767
```bash
68-
user-scanner -e john_doe@gmail.com # single email scanning
69-
user-scanner -u john_doe # single username scanning
68+
user-scanner -e johndoe@gmail.com # single email scanning
69+
user-scanner -u johndoe # single username scanning
7070
```
7171
### Verbose mode
7272

@@ -89,8 +89,8 @@ Output:
8989
Scan only specific categories or single modules:
9090

9191
```bash
92-
user-scanner -u john_doe -c dev # developer platforms only
93-
user-scanner -e john_doe@gmail.com -m github # only GitHub
92+
user-scanner -u johndoe -c dev # developer platforms only
93+
user-scanner -e johndoe@gmail.com -m github # only GitHub
9494
```
9595

9696
### Bulk email/username scanning
@@ -151,31 +151,27 @@ Output:
151151
Validate proxies before scanning (tests each proxy against google.com):
152152

153153
```bash
154-
user-scanner -u john_doe -P proxies.txt --validate-proxies # recommended
154+
user-scanner -u johndoe -P proxies.txt --validate-proxies # recommended
155155
```
156156

157157
This will:
158158
1. Filter out non-working proxies
159159
2. Save working proxies to `validated_proxies.txt`
160160
3. Use only validated proxies for scanning
161161

162+
### Screenshots:
163+
**Note**: Screenshots might be outdated
162164

163165
---
166+
<img width="1080" height="1350" alt="1000175086" src="https://github.com/user-attachments/assets/c90396d6-b8d9-4ea3-aac4-d2086f9b5756" />
164167

165-
## Screenshots:
166-
167-
- Note*: New modules are constantly getting added so screenshots might show only limited, outdated output:
168-
169-
<img width="1080" height="930" alt="1000146237" src="https://github.com/user-attachments/assets/3cbcecaf-3620-49be-9d0a-8f94790acdf0" />
170168

171169
---
170+
<img width="1080" height="730" alt="1000175084" src="https://github.com/user-attachments/assets/b399b924-6c4a-4b5b-af0d-67f7c0b39436" />
172171

173172

174-
<img width="1072" height="848" alt="user-scanner's main usage screenshot" src="https://github.com/user-attachments/assets/34e44ca6-e314-419e-9035-d951b493b47f" />
175173

176174
---
177-
178-
179175
## ❤️ Support the project
180176

181177
If this project helps you, consider supporting its development:
@@ -193,7 +189,7 @@ user_scanner/
193189
├── email_scan/ # Currently in development
194190
│ ├── social/ # Social email scan modules (Instagram, Mastodon, X, etc.)
195191
| ├── adult/ # Adult sites
196-
| ... # New sites to be added soon
192+
| ...
197193
├── user_scan/
198194
│ ├── dev/ # Developer platforms (GitHub, GitLab, npm, etc.)
199195
│ ├── social/ # Social platforms (Twitter/X, Reddit, Instagram, Discord, etc.)
@@ -238,4 +234,3 @@ Some sites may return **403 Forbidden** or **connection timeout** errors, especi
238234
- Then run the tool again.
239235
240236
These issues are caused by regional or network restrictions, not by the tool itself. If it still fails, report the error by opening an issue.
241-

docs/FLAGS.md

Lines changed: 20 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,22 @@
11
## Important Flags
22

3-
| Flag | Description |
4-
|------|-------------|
5-
| `-u, --username USERNAME` | Scan a single username across platforms |
6-
| `-e, --email EMAIL` | Scan a single email across platforms |
7-
| `-uf, --username-file FILE` | Scan multiple usernames from file (one per line) |
8-
| `-ef, --email-file FILE` | Scan multiple emails from file (one per line) |
9-
| `-c, --category CATEGORY` | Scan all platforms in a specific category |
10-
| `-lu, --list-user` | List all available modules for username scanning |
11-
| `-le, --list-email` | List all available modules for email scanning |
12-
| `-v, --verbose` | Enable verbose output to show urls of the websites |
13-
| `-m, --module MODULE` | Scan a single specific module |
14-
| `-p, --permute PERMUTE` | Generate username permutations using a pattern/suffix |
15-
| `-P, --proxy-file FILE` | Use proxies from file (one per line) |
16-
| `--validate-proxies` | Validate proxies before scanning (tests against google.com) |
17-
| `-s, --stop STOP` | Limit the number of permutations generated |
18-
| `-d, --delay DELAY` | Delay (in seconds) between requests |
19-
| `-f, --format {csv,json}` | Select output format |
20-
| `-o, --output OUTPUT` | Save results to a file |
3+
| Flag | Description |
4+
| --------------------------- | ----------------------------------------------------------- |
5+
| `-u, --username USERNAME` | Scan a single username across platforms |
6+
| `-e, --email EMAIL` | Scan a single email across platforms |
7+
| `-uf, --username-file FILE` | Scan multiple usernames from file (one per line) |
8+
| `-ef, --email-file FILE` | Scan multiple emails from file (one per line) |
9+
| `--only-found` | Only show sites where the username/email was found |
10+
| `--allow-loud` | Enable scanning sites that may send emails/notifications |
11+
| `-c, --category CATEGORY` | Scan all platforms in a specific category |
12+
| `-lu, --list-user` | List all available modules for username scanning |
13+
| `-le, --list-email` | List all available modules for email scanning |
14+
| `-v, --verbose` | Enable verbose output to show urls of the websites |
15+
| `-m, --module MODULE` | Scan a single specific module |
16+
| `-p, --permute PERMUTE` | Generate username permutations using a pattern/suffix |
17+
| `-P, --proxy-file FILE` | Use proxies from file (one per line) |
18+
| `--validate-proxies` | Validate proxies before scanning (tests against google.com) |
19+
| `-s, --stop STOP` | Limit the number of permutations generated |
20+
| `-d, --delay DELAY` | Delay (in seconds) between requests |
21+
| `-f, --format {csv,json}` | Select output format |
22+
| `-o, --output OUTPUT` | Save results to a file |

0 commit comments

Comments
 (0)