userrecon 1.0.3__tar.gz → 1.0.4__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: userrecon
3
- Version: 1.0.3
3
+ Version: 1.0.4
4
4
  Summary: CLI-based OSINT tool for username reconnaissance
5
5
  Author: CyberWithPriyanshu
6
6
  Author-email: Cyberwithpriyanshu@gmail.com
@@ -2,7 +2,7 @@ from setuptools import setup, find_packages
2
2
 
3
3
  setup(
4
4
  name="userrecon",
5
- version="1.0.3",
5
+ version="1.0.4",
6
6
  author="CyberWithPriyanshu",
7
7
  author_email="Cyberwithpriyanshu@gmail.com",
8
8
  description="CLI-based OSINT tool for username reconnaissance",
@@ -0,0 +1,220 @@
1
+ import requests
2
+ from typing import Dict, List, Tuple
3
+ from platforms import Platforms
4
+
5
+ def display_platforms_menu() -> None:
6
+ """
7
+ Display all available platforms for checking.
8
+ """
9
+ print("\n[+] Available platforms:")
10
+ for i, platform in enumerate(Platforms.keys(), 1):
11
+ print(f" {i:2d}. {platform}")
12
+ print()
13
+
14
+ def get_selected_platforms() -> Dict[str, str]:
15
+ """
16
+ Let user select which platforms to check.
17
+
18
+ Returns:
19
+ Dictionary of selected platforms {name: url_template}
20
+ """
21
+ platform_list = list(Platforms.keys())
22
+
23
+ print("\n[+] Select platforms to check:")
24
+ print(" 1. Check ALL platforms")
25
+ print(" 2. Select specific platforms")
26
+ print(" 3. Enter custom list (comma-separated numbers)")
27
+
28
+ while True:
29
+ choice = input("\nEnter your choice (1-3): ").strip()
30
+
31
+ if choice == '1':
32
+ # Check all platforms
33
+ return Platforms
34
+
35
+ elif choice == '2':
36
+ # Interactive selection
37
+ selected = {}
38
+ display_platforms_menu()
39
+ print("Enter platform numbers one by one (enter 'done' when finished):")
40
+
41
+ while True:
42
+ selection = input("Platform # (or 'done'): ").strip().lower()
43
+
44
+ if selection == 'done':
45
+ if not selected:
46
+ print("[!] No platforms selected. Please select at least one.")
47
+ continue
48
+ return selected
49
+
50
+ if selection.isdigit():
51
+ idx = int(selection) - 1
52
+ if 0 <= idx < len(platform_list):
53
+ platform_name = platform_list[idx]
54
+ selected[platform_name] = Platforms[platform_name]
55
+ print(f"[+] Added: {platform_name}")
56
+ else:
57
+ print(f"[!] Invalid number. Please enter 1-{len(platform_list)}")
58
+ else:
59
+ print("[!] Please enter a number or 'done'")
60
+
61
+ elif choice == '3':
62
+ # Bulk input
63
+ display_platforms_menu()
64
+ print(f"Enter platform numbers separated by commas (e.g., 1,3,5,7):")
65
+
66
+ while True:
67
+ try:
68
+ selection = input("Platform numbers: ").strip()
69
+ if not selection:
70
+ print("[!] Please enter at least one number")
71
+ continue
72
+
73
+ numbers = [int(n.strip()) for n in selection.split(',')]
74
+ selected = {}
75
+
76
+ for num in numbers:
77
+ idx = num - 1
78
+ if 0 <= idx < len(platform_list):
79
+ platform_name = platform_list[idx]
80
+ selected[platform_name] = Platforms[platform_name]
81
+ else:
82
+ print(f"[!] Skipping invalid number: {num}")
83
+
84
+ if selected:
85
+ print(f"[+] Selected {len(selected)} platform(s)")
86
+ return selected
87
+ else:
88
+ print("[!] No valid platforms selected. Try again.")
89
+
90
+ except ValueError:
91
+ print("[!] Invalid input. Please enter numbers separated by commas.")
92
+
93
+ else:
94
+ print("[!] Invalid choice. Please enter 1, 2, or 3.")
95
+
96
+ def check_username(username: str, platforms_to_check: Dict[str, str] = None) -> Tuple[Dict[str, str], List[str]]:
97
+ """
98
+ Check if a username exists on selected platforms.
99
+
100
+ Args:
101
+ username: The username to check
102
+ platforms_to_check: Specific platforms to check (if None, checks all)
103
+
104
+ Returns:
105
+ Tuple containing (found_platforms, error_platforms)
106
+ """
107
+ if platforms_to_check is None:
108
+ platforms_to_check = Platforms
109
+
110
+ print(f"\n[+] Checking username: {username}")
111
+ print(f"[+] Platforms to check: {', '.join(platforms_to_check.keys())}\n")
112
+
113
+ found_platforms = {}
114
+ error_platforms = []
115
+ total_checked = 0
116
+
117
+ for platform_name, url_template in platforms_to_check.items():
118
+ profile_url = url_template.format(username)
119
+ total_checked += 1
120
+
121
+ try:
122
+ response = requests.get(
123
+ profile_url,
124
+ timeout=5,
125
+ headers={
126
+ 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36'
127
+ }
128
+ )
129
+
130
+ # Check if the profile exists
131
+ if response.status_code == 200:
132
+ # Some platforms return 200 even for non-existent profiles
133
+ # We can add platform-specific checks if needed
134
+ print(f"[✓ FOUND] {platform_name}: {profile_url}")
135
+ found_platforms[platform_name] = profile_url
136
+ else:
137
+ print(f"[✗ NOT FOUND] {platform_name}")
138
+
139
+ except requests.exceptions.Timeout:
140
+ print(f"[⌛ TIMEOUT] {platform_name}")
141
+ error_platforms.append(f"{platform_name} (timeout)")
142
+ except requests.exceptions.ConnectionError:
143
+ print(f"[🔌 CONNECTION ERROR] {platform_name}")
144
+ error_platforms.append(f"{platform_name} (connection)")
145
+ except requests.exceptions.RequestException as e:
146
+ print(f"[⚠ ERROR] {platform_name}: {type(e).__name__}")
147
+ error_platforms.append(f"{platform_name} ({type(e).__name__})")
148
+
149
+ # Print summary
150
+ print(f"\n{'='*50}")
151
+ print(f"[+] SUMMARY:")
152
+ print(f" • Total platforms checked: {total_checked}")
153
+ print(f" • Found on: {len(found_platforms)} platforms")
154
+ print(f" • Errors: {len(error_platforms)} platforms")
155
+
156
+ if found_platforms:
157
+ print(f"\n[+] Found profiles:")
158
+ for platform, url in found_platforms.items():
159
+ print(f" • {platform}: {url}")
160
+
161
+ if error_platforms:
162
+ print(f"\n[!] Platforms with errors:")
163
+ for error in error_platforms:
164
+ print(f" • {error}")
165
+
166
+ return found_platforms, error_platforms
167
+
168
+ def save_results(username: str, found_platforms: Dict[str, str], filename: str = None) -> None:
169
+ """
170
+ Save results to a file.
171
+ """
172
+ if filename is None:
173
+ filename = f"{username}_results.txt"
174
+
175
+ with open(filename, 'w') as f:
176
+ f.write(f"Username: {username}\n")
177
+ f.write(f"Found on {len(found_platforms)} platforms:\n")
178
+ f.write("="*50 + "\n")
179
+
180
+ for platform, url in found_platforms.items():
181
+ f.write(f"{platform}: {url}\n")
182
+
183
+ print(f"\n[+] Results saved to: {filename}")
184
+
185
+ def main():
186
+ print("Userrecon - Username Checker")
187
+ print("=" * 50)
188
+
189
+ while True:
190
+ username = input("\nEnter username to check (or 'quit' to exit): ").strip()
191
+
192
+ if username.lower() in ['quit', 'exit', 'q']:
193
+ print("\nGoodbye!")
194
+ break
195
+
196
+ if not username:
197
+ print("[!] Please enter a valid username")
198
+ continue
199
+
200
+ # Let user select platforms
201
+ selected_platforms = get_selected_platforms()
202
+
203
+ # Check username on selected platforms
204
+ found_platforms, error_platforms = check_username(username, selected_platforms)
205
+
206
+ # Option to save results
207
+ if found_platforms:
208
+ save_choice = input("\nSave results to file? (y/n): ").strip().lower()
209
+ if save_choice in ['y', 'yes']:
210
+ save_results(username, found_platforms)
211
+
212
+ # Option to continue with same selection
213
+ print("\n" + "="*50)
214
+ again = input("\nCheck another username? (y/n): ").strip().lower()
215
+ if again not in ['y', 'yes']:
216
+ print("\nGoodbye!")
217
+ break
218
+
219
+ if __name__ == "__main__":
220
+ main()
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: userrecon
3
- Version: 1.0.3
3
+ Version: 1.0.4
4
4
  Summary: CLI-based OSINT tool for username reconnaissance
5
5
  Author: CyberWithPriyanshu
6
6
  Author-email: Cyberwithpriyanshu@gmail.com
@@ -1,93 +0,0 @@
1
- import requests
2
- from typing import Dict, List, Tuple
3
- from .platforms import Platforms
4
-
5
- def check_username(username: str) -> Tuple[Dict[str, str], List[str]]:
6
- """
7
- Check if a username exists on various platforms.
8
-
9
- Args:
10
- username: The username to check
11
-
12
- Returns:
13
- Tuple containing (found_platforms, error_platforms)
14
- """
15
- print(f"\n[+] Checking username: {username}\n")
16
-
17
- found_platforms = {}
18
- error_platforms = []
19
- total_checked = 0
20
-
21
- for platform_name, url_template in Platforms.items():
22
- profile_url = url_template.format(username)
23
- total_checked += 1
24
-
25
- try:
26
- response = requests.get(
27
- profile_url,
28
- timeout=5,
29
- headers={
30
- 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36'
31
- }
32
- )
33
-
34
- # Check if the profile exists
35
- if response.status_code == 200:
36
- # Some platforms return 200 even for non-existent profiles
37
- # We can add platform-specific checks if needed
38
- print(f"[✓ FOUND] {platform_name}: {profile_url}")
39
- found_platforms[platform_name] = profile_url
40
- else:
41
- print(f"[✗ NOT FOUND] {platform_name}")
42
-
43
- except requests.exceptions.Timeout:
44
- print(f"[⌛ TIMEOUT] {platform_name}")
45
- error_platforms.append(f"{platform_name} (timeout)")
46
- except requests.exceptions.ConnectionError:
47
- print(f"[🔌 CONNECTION ERROR] {platform_name}")
48
- error_platforms.append(f"{platform_name} (connection)")
49
- except requests.exceptions.RequestException as e:
50
- print(f"[⚠ ERROR] {platform_name}: {type(e).__name__}")
51
- error_platforms.append(f"{platform_name} ({type(e).__name__})")
52
-
53
- # Print summary
54
- print(f"\n{'='*50}")
55
- print(f"[+] SUMMARY:")
56
- print(f" • Total platforms checked: {total_checked}")
57
- print(f" • Found on: {len(found_platforms)} platforms")
58
- print(f" • Errors: {len(error_platforms)} platforms")
59
-
60
- if found_platforms:
61
- print(f"\n[+] Found profiles:")
62
- for platform, url in found_platforms.items():
63
- print(f" • {platform}: {url}")
64
-
65
- if error_platforms:
66
- print(f"\n[!] Platforms with errors:")
67
- for error in error_platforms:
68
- print(f" • {error}")
69
-
70
- return found_platforms, error_platforms
71
-
72
-
73
-
74
-
75
- def main():
76
-
77
- print("Userrecon")
78
- print("=" * 50)
79
-
80
- while True:
81
- username = input("\nEnter username to check (or 'quit' to exit): ").strip()
82
-
83
- if username.lower() in ['quit', 'exit', 'q']:
84
- print("\nGoodbye!")
85
- break
86
-
87
- if username:
88
- check_username(username)
89
- else:
90
- print("[!] Please enter a valid username")
91
-
92
- if __name__ == "__main__":
93
- main()
File without changes
File without changes
File without changes