user-scanner 1.0.0.5__py3-none-any.whl → 1.0.0.6__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 +3 -0
- user_scanner/social/bluesky.py +71 -0
- user_scanner/social/instagram.py +2 -2
- user_scanner/social/x.py +4 -2
- {user_scanner-1.0.0.5.dist-info → user_scanner-1.0.0.6.dist-info}/METADATA +1 -1
- {user_scanner-1.0.0.5.dist-info → user_scanner-1.0.0.6.dist-info}/RECORD +9 -8
- {user_scanner-1.0.0.5.dist-info → user_scanner-1.0.0.6.dist-info}/WHEEL +0 -0
- {user_scanner-1.0.0.5.dist-info → user_scanner-1.0.0.6.dist-info}/entry_points.txt +0 -0
- {user_scanner-1.0.0.5.dist-info → user_scanner-1.0.0.6.dist-info}/licenses/LICENSE +0 -0
user_scanner/__main__.py
CHANGED
|
@@ -62,6 +62,9 @@ def main():
|
|
|
62
62
|
return
|
|
63
63
|
if re.search(r"[^a-zA-Z0-9._-]", args.username):
|
|
64
64
|
print(Fore.RED + f"[!] Username '{args.username}' contains unsupported special characters. X (Twitter) doesn't support these." + Style.RESET_ALL)
|
|
65
|
+
if re.search(r"[^a-zA-Z0-9\.-]", args.username):
|
|
66
|
+
print(Fore.RED + f"[!] Username '{args.username}' contains unsupported special characters. Bluesky will throw error. (Supported: only hyphens and digits)" + Style.RESET_ALL +"\n")
|
|
67
|
+
|
|
65
68
|
|
|
66
69
|
from user_scanner import dev, social, creator, community
|
|
67
70
|
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import httpx
|
|
2
|
+
from httpx import ConnectError, TimeoutException
|
|
3
|
+
import re
|
|
4
|
+
import json
|
|
5
|
+
|
|
6
|
+
def validate_bluesky(user):
|
|
7
|
+
handle = user if user.endswith('.bsky.social') else f"{user}.bsky.social"
|
|
8
|
+
url = "https://bsky.social/xrpc/com.atproto.temp.checkHandleAvailability"
|
|
9
|
+
|
|
10
|
+
headers = {
|
|
11
|
+
'User-Agent': "Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Mobile Safari/537.36",
|
|
12
|
+
'Accept-Encoding': "gzip",
|
|
13
|
+
'atproto-accept-labelers': "did:plc:ar7c4by46qjdydhdevvrndac;redact",
|
|
14
|
+
'sec-ch-ua-platform': "\"Android\"",
|
|
15
|
+
'sec-ch-ua': "\"Google Chrome\";v=\"141\", \"Not?A_Brand\";v=\"8\", \"Chromium\";v=\"141\"",
|
|
16
|
+
'sec-ch-ua-mobile': "?1",
|
|
17
|
+
'origin': "https://bsky.app",
|
|
18
|
+
'sec-fetch-site': "cross-site",
|
|
19
|
+
'sec-fetch-mode': "cors",
|
|
20
|
+
'sec-fetch-dest': "empty",
|
|
21
|
+
'referer': "https://bsky.app/",
|
|
22
|
+
'accept-language': "en-US,en;q=0.9",
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
params = {
|
|
26
|
+
'handle': handle,
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
if not re.fullmatch(r"^[a-zA-Z0-9\.-]{1,64}$", user):
|
|
30
|
+
return 2
|
|
31
|
+
|
|
32
|
+
try:
|
|
33
|
+
response = httpx.get(url, headers=headers, params=params, timeout = 15.0)
|
|
34
|
+
status = response.status_code
|
|
35
|
+
|
|
36
|
+
if status == 200:
|
|
37
|
+
data = response.json()
|
|
38
|
+
result_type = data.get('result', {}).get('$type')
|
|
39
|
+
|
|
40
|
+
if result_type == "com.atproto.temp.checkHandleAvailability#resultAvailable":
|
|
41
|
+
return 1
|
|
42
|
+
elif result_type == "com.atproto.temp.checkHandleAvailability#resultUnavailable":
|
|
43
|
+
return 0
|
|
44
|
+
else:
|
|
45
|
+
return 2
|
|
46
|
+
else:
|
|
47
|
+
return 2
|
|
48
|
+
|
|
49
|
+
except (ConnectError, TimeoutException):
|
|
50
|
+
return 2
|
|
51
|
+
except json.JSONDecodeError:
|
|
52
|
+
return 2
|
|
53
|
+
except Exception:
|
|
54
|
+
return 2
|
|
55
|
+
|
|
56
|
+
if __name__ == "__main__":
|
|
57
|
+
try:
|
|
58
|
+
import httpx
|
|
59
|
+
except ImportError:
|
|
60
|
+
print("Error: 'httpx' library is not installed.")
|
|
61
|
+
exit()
|
|
62
|
+
|
|
63
|
+
user = input ("Username?: ").strip()
|
|
64
|
+
result = validate_bluesky(user)
|
|
65
|
+
|
|
66
|
+
if result == 1:
|
|
67
|
+
print("Available!")
|
|
68
|
+
elif result == 0:
|
|
69
|
+
print("Unavailable!")
|
|
70
|
+
else:
|
|
71
|
+
print("Error occured!")
|
user_scanner/social/instagram.py
CHANGED
|
@@ -13,9 +13,9 @@ def validate_instagram(user):
|
|
|
13
13
|
'X-Requested-With': "XMLHttpRequest",
|
|
14
14
|
'Referer': f"https://www.instagram.com/{user}/",
|
|
15
15
|
}
|
|
16
|
-
|
|
16
|
+
|
|
17
17
|
try:
|
|
18
|
-
response = httpx.get(url, headers=headers, timeout =
|
|
18
|
+
response = httpx.get(url, headers=headers, timeout = 3.0)
|
|
19
19
|
status = response.status_code
|
|
20
20
|
|
|
21
21
|
if status == 200:
|
user_scanner/social/x.py
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import httpx
|
|
2
2
|
import json
|
|
3
|
+
from colorama import Fore, Style
|
|
3
4
|
from httpx import ConnectError, TimeoutException
|
|
4
5
|
|
|
5
6
|
def validate_x(user):
|
|
@@ -19,6 +20,7 @@ def validate_x(user):
|
|
|
19
20
|
try:
|
|
20
21
|
response = httpx.get(url, params=params, headers=headers, timeout = 3.0)
|
|
21
22
|
status = response.status_code
|
|
23
|
+
# print(response.text)
|
|
22
24
|
if status in [401, 403, 429]:
|
|
23
25
|
return 2
|
|
24
26
|
|
|
@@ -29,8 +31,8 @@ def validate_x(user):
|
|
|
29
31
|
return 1
|
|
30
32
|
elif data.get('reason') == 'taken':
|
|
31
33
|
return 0
|
|
32
|
-
elif data.get('reason') == "improper_format":
|
|
33
|
-
print(data.get('desc'))
|
|
34
|
+
elif (data.get('reason') == "improper_format" or data.get('reason') == "invalid_username"):
|
|
35
|
+
print("\n" +" "+f"{Fore.CYAN}X says: {data.get('desc')}{Style.RESET_ALL}")
|
|
34
36
|
return 2
|
|
35
37
|
else:
|
|
36
38
|
return 2
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: user-scanner
|
|
3
|
-
Version: 1.0.0.
|
|
3
|
+
Version: 1.0.0.6
|
|
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,5 +1,5 @@
|
|
|
1
1
|
user_scanner/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
2
|
-
user_scanner/__main__.py,sha256=
|
|
2
|
+
user_scanner/__main__.py,sha256=ND5nN2WF2RYyHo0hkuNVzmyDAjd9jE-6M1Yl_4hasz8,3406
|
|
3
3
|
user_scanner/community/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
4
4
|
user_scanner/community/coderlegion.py,sha256=wva0seSkd4h7kSjIprW0wM7JC0zspFjXGnDHkeIJ3YI,1141
|
|
5
5
|
user_scanner/core/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -19,15 +19,16 @@ user_scanner/dev/launchpad.py,sha256=ank50BpTsN7m5_MuQNxAbLpfQOrwjnwS_olO9nhPwgk
|
|
|
19
19
|
user_scanner/dev/npmjs.py,sha256=Tv2YgCpuSxJKWEPdcTWwm9CCl2rmfKlGdQe2rnMnXM8,1141
|
|
20
20
|
user_scanner/dev/replit.py,sha256=GN1Q8PecTzBsd6TpOT-qRnMvKhFTh1P6uCa8CDlXkpw,925
|
|
21
21
|
user_scanner/social/__init__.py,sha256=jaCkFwX1uYtF0ENifVwF8OfHrYYUTm64B9wlBq9BBfQ,9
|
|
22
|
-
user_scanner/social/
|
|
22
|
+
user_scanner/social/bluesky.py,sha256=r5UIFCStlwEM4UxE6cDTrDb5w_EqPCgJ2iYz27GpjA8,2157
|
|
23
|
+
user_scanner/social/instagram.py,sha256=oskZgHagkyl_p-bi7CMYqCh0wsoqfCFnR7GZcbKX1-U,1229
|
|
23
24
|
user_scanner/social/pinterest.py,sha256=LHCiTmPALPLYXDClz09EBKRREhs5u3CajeFiQg5Vvlg,1168
|
|
24
25
|
user_scanner/social/reddit.py,sha256=DQYWedJeeyUuk-6EARU_52rPQHNkjfSbahOl5AHENa0,1194
|
|
25
26
|
user_scanner/social/snapchat.py,sha256=ZG-SIv6RopT45dudfOm5sRxmV_ihWG1Vh1Z766fm8XE,1527
|
|
26
27
|
user_scanner/social/threads.py,sha256=QRidTYquAMDHJSg68ySpWCbliRYdWJkbOqn8RfWzFQQ,1231
|
|
27
|
-
user_scanner/social/x.py,sha256=
|
|
28
|
+
user_scanner/social/x.py,sha256=NetPGmPnWEKv6za9E_Ekah9bAeeFlEeY3qbTJQo7AqE,1560
|
|
28
29
|
user_scanner/social/youtube.py,sha256=zuyWCy5FtEilaIcUZ4dTCctRR9deFnwwWJkf-h_1K0E,1943
|
|
29
|
-
user_scanner-1.0.0.
|
|
30
|
-
user_scanner-1.0.0.
|
|
31
|
-
user_scanner-1.0.0.
|
|
32
|
-
user_scanner-1.0.0.
|
|
33
|
-
user_scanner-1.0.0.
|
|
30
|
+
user_scanner-1.0.0.6.dist-info/entry_points.txt,sha256=XqU3kssYZ0vXaPy5qYUOTCu4u-48Xie7QWFpBCYc7Nc,59
|
|
31
|
+
user_scanner-1.0.0.6.dist-info/licenses/LICENSE,sha256=XH1QyQG68zo1opDIZHTHcTAbe9XMzewvTaFTukcN9vc,1061
|
|
32
|
+
user_scanner-1.0.0.6.dist-info/WHEEL,sha256=G2gURzTEtmeR8nrdXUJfNiB3VYVxigPQ-bEQujpNiNs,82
|
|
33
|
+
user_scanner-1.0.0.6.dist-info/METADATA,sha256=dCf8wfkFEUjHzPV4IcowAQNGbuzKEY1D0g1oKlm9KUE,2363
|
|
34
|
+
user_scanner-1.0.0.6.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|