userrecon 1.0.3__py3-none-any.whl → 1.0.4__py3-none-any.whl

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.
userrecon/recon.py CHANGED
@@ -1,24 +1,120 @@
1
1
  import requests
2
2
  from typing import Dict, List, Tuple
3
- from .platforms import Platforms
3
+ from platforms import Platforms
4
4
 
5
- def check_username(username: str) -> Tuple[Dict[str, str], List[str]]:
5
+ def display_platforms_menu() -> None:
6
6
  """
7
- Check if a username exists on various platforms.
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.
8
99
 
9
100
  Args:
10
101
  username: The username to check
102
+ platforms_to_check: Specific platforms to check (if None, checks all)
11
103
 
12
104
  Returns:
13
105
  Tuple containing (found_platforms, error_platforms)
14
106
  """
15
- print(f"\n[+] Checking username: {username}\n")
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")
16
112
 
17
113
  found_platforms = {}
18
114
  error_platforms = []
19
115
  total_checked = 0
20
116
 
21
- for platform_name, url_template in Platforms.items():
117
+ for platform_name, url_template in platforms_to_check.items():
22
118
  profile_url = url_template.format(username)
23
119
  total_checked += 1
24
120
 
@@ -69,12 +165,25 @@ def check_username(username: str) -> Tuple[Dict[str, str], List[str]]:
69
165
 
70
166
  return found_platforms, error_platforms
71
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"
72
174
 
73
-
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}")
74
184
 
75
185
  def main():
76
-
77
- print("Userrecon")
186
+ print("Userrecon - Username Checker")
78
187
  print("=" * 50)
79
188
 
80
189
  while True:
@@ -84,10 +193,28 @@ def main():
84
193
  print("\nGoodbye!")
85
194
  break
86
195
 
87
- if username:
88
- check_username(username)
89
- else:
196
+ if not username:
90
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
91
218
 
92
219
  if __name__ == "__main__":
93
- 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
@@ -0,0 +1,8 @@
1
+ userrecon/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
+ userrecon/platforms.py,sha256=dM-ULNMViQ7hDpkYOA7U41lLbFYMEgNpvqSarfDikpI,3562
3
+ userrecon/recon.py,sha256=Q_BN8B0to_4jB7KKIN4rOYbH0kRn77aqJ-JBPNyYvUY,8311
4
+ userrecon-1.0.4.dist-info/METADATA,sha256=FLHCZ5BdxSRBJtPnUE6bqqqiIHvVJRg5Yj3FwhPvuts,930
5
+ userrecon-1.0.4.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
6
+ userrecon-1.0.4.dist-info/entry_points.txt,sha256=GA80RahJyfpoOGh9Brlr2CxNkeciAHTf6BzVm8WbamI,51
7
+ userrecon-1.0.4.dist-info/top_level.txt,sha256=TlkpGSQ7F_z_i7LnZGPZ7qR7As_MzQ9qOHfWw6DrHF0,10
8
+ userrecon-1.0.4.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (80.9.0)
2
+ Generator: setuptools (80.10.2)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5
 
@@ -1,8 +0,0 @@
1
- userrecon/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
- userrecon/platforms.py,sha256=dM-ULNMViQ7hDpkYOA7U41lLbFYMEgNpvqSarfDikpI,3562
3
- userrecon/recon.py,sha256=hTzTyjoQBT46VhATDkXYJYKZnJlenE3JNcpPvq7Cpu8,3103
4
- userrecon-1.0.3.dist-info/METADATA,sha256=plM_wjjJq95Qq01gDa5zfCUyehOLDAMgnA3IcCKAgsU,930
5
- userrecon-1.0.3.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
6
- userrecon-1.0.3.dist-info/entry_points.txt,sha256=GA80RahJyfpoOGh9Brlr2CxNkeciAHTf6BzVm8WbamI,51
7
- userrecon-1.0.3.dist-info/top_level.txt,sha256=TlkpGSQ7F_z_i7LnZGPZ7qR7As_MzQ9qOHfWw6DrHF0,10
8
- userrecon-1.0.3.dist-info/RECORD,,