user-scanner 1.0.0.2__py3-none-any.whl → 1.0.0.3__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.
user_scanner/__main__.py CHANGED
@@ -1,4 +1,5 @@
1
1
  import argparse
2
+ import re
2
3
  from user_scanner.core.orchestrator import run_checks, load_modules
3
4
  from colorama import Fore, Style
4
5
 
@@ -59,6 +60,8 @@ def main():
59
60
  if not args.username:
60
61
  print(Fore.RED + "[!] Please provide a username with -u or --username." + Style.RESET_ALL)
61
62
  return
63
+ if re.search(r"[^a-zA-Z0-9._-]", args.username):
64
+ print(Fore.RED + f"[!] Username '{args.username}' contains unsupported special characters. X (Twitter) doesn't support these." + Style.RESET_ALL)
62
65
 
63
66
  from user_scanner import dev, social, creator, community
64
67
 
@@ -14,9 +14,7 @@ def load_modules(package):
14
14
  return modules
15
15
 
16
16
  def run_module_single(module, username):
17
- """
18
- Run a single module's validate_ function on the given username.
19
- """
17
+
20
18
  func = next((getattr(module, f) for f in dir(module)
21
19
  if f.startswith("validate_") and callable(getattr(module, f))), None)
22
20
  site_name = module.__name__.split('.')[-1].capitalize()
@@ -38,9 +36,6 @@ def run_module_single(module, username):
38
36
  print(f" {Fore.YELLOW}[!] {site_name} has no validate_ function{Style.RESET_ALL}")
39
37
 
40
38
  def run_checks_category(package, username, verbose=False):
41
- """
42
- Run all modules in a given package (category) on the username.
43
- """
44
39
  modules = load_modules(package)
45
40
  category_name = package.__name__.split('.')[-1].capitalize()
46
41
  print(f"{Fore.MAGENTA}== {category_name} SITES =={Style.RESET_ALL}")
user_scanner/social/x.py CHANGED
@@ -18,7 +18,7 @@ def validate_x(user):
18
18
 
19
19
  try:
20
20
  response = httpx.get(url, params=params, headers=headers, timeout = 3.0)
21
- print(status)
21
+ status = response.status_code
22
22
  if status in [401, 403, 429]:
23
23
  return 2
24
24
 
@@ -29,6 +29,9 @@ def validate_x(user):
29
29
  return 1
30
30
  elif data.get('reason') == 'taken':
31
31
  return 0
32
+ elif data.get('reason') == "improper_format":
33
+ print(data.get('desc'))
34
+ return 2
32
35
  else:
33
36
  return 2
34
37
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: user-scanner
3
- Version: 1.0.0.2
3
+ Version: 1.0.0.3
4
4
  Summary: Check username availability across multiple popular platforms
5
5
  Keywords: username,checker,availability,social,tech,python,user-scanner
6
6
  Author-email: Kaif <kafcodec@gmail.com>
@@ -1,8 +1,8 @@
1
1
  user_scanner/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
- user_scanner/__main__.py,sha256=oodw-az7GxHMmu2pdvT2wv_3Yq5vThVLlW55Wr0TzbQ,2947
2
+ user_scanner/__main__.py,sha256=gTuNDvGcxJxnJgbviOARUN42bhpEZ3j5oUgZBFIYa4U,3164
3
3
  user_scanner/community/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
4
4
  user_scanner/core/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
5
- user_scanner/core/orchestrator.py,sha256=FQCwP9rBIXF_EXouJWE22k2TmOjAzpPu0p0m0oM0fik,3360
5
+ user_scanner/core/orchestrator.py,sha256=5HgT9tP5r6pX8eUOaHOwXeCz0wDTfifyGW_WtNnz6kQ,3194
6
6
  user_scanner/creator/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
7
7
  user_scanner/creator/devto.py,sha256=K9jXlwSlhJxwZomGJB7m8u_22kTejLPJ_-AvwFZahsY,1034
8
8
  user_scanner/creator/hashnode.py,sha256=2Q-K9Yuy-6qOoJJPMq3UD0JHP4d9XeO9OGpBeHuMims,1351
@@ -23,10 +23,10 @@ user_scanner/social/pinterest.py,sha256=5cDmvtAXPtvpsO2vdAd30_Gx11i8L90mYrAU2OgN
23
23
  user_scanner/social/reddit.py,sha256=GkbQ6fPQVDygcOsnpuOkmIpATW5YlbEnKtC8lF2U5w0,1317
24
24
  user_scanner/social/snapchat.py,sha256=Qik4Jfaz3Glo_Wer5NrB7IVTBcP2D8AL_mVRnPXAKkc,1650
25
25
  user_scanner/social/threads.py,sha256=_8pUvLtJ6NT0LA9cEQn2IqIiA0IIn3LKZFaVtbhSMQk,1354
26
- user_scanner/social/x.py,sha256=WEqZV2-LAHh742bHlvfhVJ1pHm5zoKik-RvTORvR0dQ,1383
26
+ user_scanner/social/x.py,sha256=8SfCq61ky012s1FtqQ9mcpexs3Y8z7dynmp6YgpK2gQ,1522
27
27
  user_scanner/social/youtube.py,sha256=pYBVeYpo1fFdcMAQ22ruka9TFkNpQr1h3YuatM_s0rU,2066
28
- user_scanner-1.0.0.2.dist-info/entry_points.txt,sha256=XqU3kssYZ0vXaPy5qYUOTCu4u-48Xie7QWFpBCYc7Nc,59
29
- user_scanner-1.0.0.2.dist-info/licenses/LICENSE,sha256=XH1QyQG68zo1opDIZHTHcTAbe9XMzewvTaFTukcN9vc,1061
30
- user_scanner-1.0.0.2.dist-info/WHEEL,sha256=G2gURzTEtmeR8nrdXUJfNiB3VYVxigPQ-bEQujpNiNs,82
31
- user_scanner-1.0.0.2.dist-info/METADATA,sha256=MkAAhdciR-At2g6P2TOKJj7TgKxGqrE1m4TS7qb2zB4,452
32
- user_scanner-1.0.0.2.dist-info/RECORD,,
28
+ user_scanner-1.0.0.3.dist-info/entry_points.txt,sha256=XqU3kssYZ0vXaPy5qYUOTCu4u-48Xie7QWFpBCYc7Nc,59
29
+ user_scanner-1.0.0.3.dist-info/licenses/LICENSE,sha256=XH1QyQG68zo1opDIZHTHcTAbe9XMzewvTaFTukcN9vc,1061
30
+ user_scanner-1.0.0.3.dist-info/WHEEL,sha256=G2gURzTEtmeR8nrdXUJfNiB3VYVxigPQ-bEQujpNiNs,82
31
+ user_scanner-1.0.0.3.dist-info/METADATA,sha256=Smt9GME2bnRFIMnbAbs34NrbttkJtU8KHqjJI28ccj8,452
32
+ user_scanner-1.0.0.3.dist-info/RECORD,,