user-scanner 1.0.2.1__py3-none-any.whl → 1.0.3.1__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/cli/banner.py +1 -8
- user_scanner/core/orchestrator.py +41 -42
- user_scanner/version.json +1 -1
- {user_scanner-1.0.2.1.dist-info → user_scanner-1.0.3.1.dist-info}/METADATA +2 -2
- {user_scanner-1.0.2.1.dist-info → user_scanner-1.0.3.1.dist-info}/RECORD +8 -8
- {user_scanner-1.0.2.1.dist-info → user_scanner-1.0.3.1.dist-info}/WHEEL +0 -0
- {user_scanner-1.0.2.1.dist-info → user_scanner-1.0.3.1.dist-info}/entry_points.txt +0 -0
- {user_scanner-1.0.2.1.dist-info → user_scanner-1.0.3.1.dist-info}/licenses/LICENSE +0 -0
user_scanner/cli/banner.py
CHANGED
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
import importlib
|
|
2
2
|
import pkgutil
|
|
3
3
|
from colorama import Fore, Style
|
|
4
|
+
import threading
|
|
5
|
+
|
|
6
|
+
lock = threading.Condition()
|
|
7
|
+
#Basically which thread is the one to print
|
|
8
|
+
print_queue = 0
|
|
4
9
|
|
|
5
10
|
def load_modules(package):
|
|
6
11
|
|
|
@@ -13,7 +18,8 @@ def load_modules(package):
|
|
|
13
18
|
print(f"Failed to import {name}: {e}")
|
|
14
19
|
return modules
|
|
15
20
|
|
|
16
|
-
def
|
|
21
|
+
def worker_single(module, username, i):
|
|
22
|
+
global print_queue
|
|
17
23
|
|
|
18
24
|
func = next((getattr(module, f) for f in dir(module)
|
|
19
25
|
if f.startswith("validate_") and callable(getattr(module, f))), None)
|
|
@@ -21,31 +27,54 @@ def run_module_single(module, username):
|
|
|
21
27
|
if site_name == "X":
|
|
22
28
|
site_name = "X (Twitter)"
|
|
23
29
|
|
|
30
|
+
output = ""
|
|
24
31
|
if func:
|
|
25
32
|
try:
|
|
26
33
|
result = func(username)
|
|
27
34
|
if result == 1:
|
|
28
|
-
|
|
35
|
+
output = f" {Fore.GREEN}[✔] {site_name}: Available{Style.RESET_ALL}"
|
|
29
36
|
elif result == 0:
|
|
30
|
-
|
|
37
|
+
output = f" {Fore.RED}[✘] {site_name}: Taken{Style.RESET_ALL}"
|
|
31
38
|
else:
|
|
32
|
-
|
|
39
|
+
output = f" {Fore.YELLOW}[!] {site_name}: Error{Style.RESET_ALL}"
|
|
33
40
|
except Exception as e:
|
|
34
|
-
|
|
41
|
+
output = f" {Fore.YELLOW}[!] {site_name}: Exception - {e}{Style.RESET_ALL}"
|
|
35
42
|
else:
|
|
36
|
-
|
|
43
|
+
output = f" {Fore.YELLOW}[!] {site_name} has no validate_ function{Style.RESET_ALL}"
|
|
44
|
+
|
|
45
|
+
with lock:
|
|
46
|
+
#Waits for in-order printing
|
|
47
|
+
while i != print_queue:
|
|
48
|
+
lock.wait()
|
|
37
49
|
|
|
50
|
+
print(output)
|
|
51
|
+
print_queue += 1
|
|
52
|
+
lock.notify_all()
|
|
53
|
+
|
|
54
|
+
def run_module_single(module, username):
|
|
55
|
+
#Just executes as if it was a thread
|
|
56
|
+
worker_single(module, username, print_queue)
|
|
57
|
+
|
|
38
58
|
def run_checks_category(package, username, verbose=False):
|
|
59
|
+
global print_queue
|
|
60
|
+
|
|
39
61
|
modules = load_modules(package)
|
|
40
62
|
category_name = package.__name__.split('.')[-1].capitalize()
|
|
41
63
|
print(f"{Fore.MAGENTA}== {category_name} SITES =={Style.RESET_ALL}")
|
|
42
64
|
|
|
43
|
-
|
|
44
|
-
run_module_single(module, username)
|
|
65
|
+
print_queue = 0
|
|
45
66
|
|
|
46
|
-
|
|
67
|
+
threads = []
|
|
68
|
+
for i, module in enumerate(modules):
|
|
69
|
+
t = threading.Thread(target=worker_single, args=(module, username, i))
|
|
70
|
+
threads.append(t)
|
|
71
|
+
t.start()
|
|
72
|
+
|
|
73
|
+
for t in threads:
|
|
74
|
+
t.join()
|
|
47
75
|
|
|
48
|
-
|
|
76
|
+
def run_checks(username):
|
|
77
|
+
from user_scanner import dev, social, creator, community, gaming
|
|
49
78
|
|
|
50
79
|
categories = [
|
|
51
80
|
("DEV", dev),
|
|
@@ -57,36 +86,6 @@ def run_checks(username):
|
|
|
57
86
|
|
|
58
87
|
print(f"\n{Fore.CYAN} Checking username: {username}{Style.RESET_ALL}\n")
|
|
59
88
|
|
|
60
|
-
for
|
|
61
|
-
|
|
62
|
-
modules = load_modules(package)
|
|
63
|
-
except ModuleNotFoundError:
|
|
64
|
-
continue
|
|
65
|
-
|
|
66
|
-
print(f"{Fore.MAGENTA}== {cat_name} SITES =={Style.RESET_ALL}")
|
|
67
|
-
|
|
68
|
-
for module in modules:
|
|
69
|
-
# Find the first function starting with "validate_"
|
|
70
|
-
func = None
|
|
71
|
-
for f in dir(module):
|
|
72
|
-
if f.startswith("validate_") and callable(getattr(module, f)):
|
|
73
|
-
func = getattr(module, f)
|
|
74
|
-
break
|
|
75
|
-
if not func:
|
|
76
|
-
continue
|
|
77
|
-
|
|
78
|
-
site_name = module.__name__.split('.')[-1].capitalize()
|
|
79
|
-
if site_name == "X":
|
|
80
|
-
site_name = "X (Twitter)"
|
|
81
|
-
try:
|
|
82
|
-
result = func(username)
|
|
83
|
-
if result == 1:
|
|
84
|
-
print(f" {Fore.GREEN}[✔] {site_name}: Available{Style.RESET_ALL}")
|
|
85
|
-
elif result == 0:
|
|
86
|
-
print(f" {Fore.RED}[✘] {site_name}: Taken{Style.RESET_ALL}")
|
|
87
|
-
else:
|
|
88
|
-
print(f" {Fore.YELLOW}[!] {site_name}: Error{Style.RESET_ALL}")
|
|
89
|
-
except Exception as e:
|
|
90
|
-
print(f" {Fore.YELLOW}[!] {site_name}: Exception - {e}{Style.RESET_ALL}")
|
|
91
|
-
|
|
89
|
+
for _, package in categories:
|
|
90
|
+
run_checks_category(package, username)
|
|
92
91
|
print()
|
user_scanner/version.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: user-scanner
|
|
3
|
-
Version: 1.0.
|
|
3
|
+
Version: 1.0.3.1
|
|
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>
|
|
@@ -15,7 +15,7 @@ Project-URL: Homepage, https://github.com/kaifcodec/user-scanner
|
|
|
15
15
|
|
|
16
16
|

|
|
17
17
|
<p align="center">
|
|
18
|
-
<img src="https://img.shields.io/badge/Version-1.0.
|
|
18
|
+
<img src="https://img.shields.io/badge/Version-1.0.3.0-blueviolet?style=for-the-badge&logo=github" />
|
|
19
19
|
<img src="https://img.shields.io/github/issues/kaifcodec/user-scanner?style=for-the-badge&logo=github" />
|
|
20
20
|
<img src="https://img.shields.io/badge/Tested%20on-Termux-black?style=for-the-badge&logo=termux" />
|
|
21
21
|
<img src="https://img.shields.io/badge/Tested%20on-Windows-cyan?style=for-the-badge&logo=Windows" />
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
user_scanner/__init__.py,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
|
|
2
2
|
user_scanner/__main__.py,sha256=Zu9ZPz3f4QPvtyj9NswmUkqjQmKiFKoxOp6KKCz-ngg,3676
|
|
3
|
-
user_scanner/version.json,sha256=
|
|
3
|
+
user_scanner/version.json,sha256=wPpJFUdlOQyAab1tygb975oMrQuZGSeYmQajLyPQ7AQ,49
|
|
4
4
|
user_scanner/cli/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
5
|
-
user_scanner/cli/banner.py,sha256=
|
|
5
|
+
user_scanner/cli/banner.py,sha256=A3uMAwkyf-WHQH3ki3XlslAxAEMPQYZiIGeawnctZEA,1497
|
|
6
6
|
user_scanner/community/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
7
7
|
user_scanner/community/coderlegion.py,sha256=wva0seSkd4h7kSjIprW0wM7JC0zspFjXGnDHkeIJ3YI,1141
|
|
8
8
|
user_scanner/core/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
9
|
-
user_scanner/core/orchestrator.py,sha256
|
|
9
|
+
user_scanner/core/orchestrator.py,sha256=oI6wHi6tK0rBVqLLjJckb3RTNsfRMnp6iITeV4HjrCE,2727
|
|
10
10
|
user_scanner/creator/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
11
11
|
user_scanner/creator/devto.py,sha256=K9jXlwSlhJxwZomGJB7m8u_22kTejLPJ_-AvwFZahsY,1034
|
|
12
12
|
user_scanner/creator/hashnode.py,sha256=2Q-K9Yuy-6qOoJJPMq3UD0JHP4d9XeO9OGpBeHuMims,1351
|
|
@@ -41,8 +41,8 @@ user_scanner/social/x.py,sha256=NetPGmPnWEKv6za9E_Ekah9bAeeFlEeY3qbTJQo7AqE,1560
|
|
|
41
41
|
user_scanner/social/youtube.py,sha256=zuyWCy5FtEilaIcUZ4dTCctRR9deFnwwWJkf-h_1K0E,1943
|
|
42
42
|
user_scanner/utils/update.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
43
43
|
user_scanner/utils/version.py,sha256=ou6CF7ndVwEYvSpO4Se-B-71AvVezZcaZJpYFgDQsqM,621
|
|
44
|
-
user_scanner-1.0.
|
|
45
|
-
user_scanner-1.0.
|
|
46
|
-
user_scanner-1.0.
|
|
47
|
-
user_scanner-1.0.
|
|
48
|
-
user_scanner-1.0.
|
|
44
|
+
user_scanner-1.0.3.1.dist-info/entry_points.txt,sha256=XqU3kssYZ0vXaPy5qYUOTCu4u-48Xie7QWFpBCYc7Nc,59
|
|
45
|
+
user_scanner-1.0.3.1.dist-info/licenses/LICENSE,sha256=XH1QyQG68zo1opDIZHTHcTAbe9XMzewvTaFTukcN9vc,1061
|
|
46
|
+
user_scanner-1.0.3.1.dist-info/WHEEL,sha256=G2gURzTEtmeR8nrdXUJfNiB3VYVxigPQ-bEQujpNiNs,82
|
|
47
|
+
user_scanner-1.0.3.1.dist-info/METADATA,sha256=WGImslMdCT1EZOc3PMZH8F8q7u2TtJzZROwWMBgVTxw,4970
|
|
48
|
+
user_scanner-1.0.3.1.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|