user-scanner 1.0.2.1__py3-none-any.whl → 1.0.9.0__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/__init__.py +0 -1
- user_scanner/__main__.py +114 -61
- user_scanner/cli/banner.py +3 -8
- user_scanner/cli/printer.py +117 -0
- user_scanner/community/__init__.py +1 -0
- user_scanner/community/coderlegion.py +11 -31
- user_scanner/community/stackoverflow.py +35 -0
- user_scanner/core/orchestrator.py +199 -79
- user_scanner/core/result.py +128 -0
- user_scanner/core/utils.py +9 -0
- user_scanner/creator/devto.py +11 -29
- user_scanner/creator/hashnode.py +25 -28
- user_scanner/creator/itch_io.py +19 -0
- user_scanner/creator/kaggle.py +11 -29
- user_scanner/creator/medium.py +18 -22
- user_scanner/creator/patreon.py +12 -38
- user_scanner/creator/producthunt.py +47 -0
- user_scanner/dev/codeberg.py +11 -29
- user_scanner/dev/cratesio.py +11 -24
- user_scanner/dev/dockerhub.py +11 -27
- user_scanner/dev/github.py +43 -39
- user_scanner/dev/gitlab.py +21 -32
- user_scanner/dev/huggingface.py +19 -0
- user_scanner/dev/launchpad.py +11 -24
- user_scanner/dev/npmjs.py +21 -34
- user_scanner/dev/replit.py +11 -29
- user_scanner/donation/__init__.py +0 -0
- user_scanner/donation/buymeacoffee.py +19 -0
- user_scanner/donation/liberapay.py +36 -0
- user_scanner/gaming/chess_com.py +20 -36
- user_scanner/gaming/minecraft.py +19 -0
- user_scanner/gaming/monkeytype.py +8 -26
- user_scanner/gaming/osu.py +13 -38
- user_scanner/gaming/roblox.py +37 -42
- user_scanner/gaming/steam.py +29 -0
- user_scanner/social/bluesky.py +21 -38
- user_scanner/social/discord.py +17 -21
- user_scanner/social/instagram.py +11 -24
- user_scanner/social/mastodon.py +12 -38
- user_scanner/social/pinterest.py +18 -32
- user_scanner/social/reddit.py +19 -32
- user_scanner/social/snapchat.py +24 -37
- user_scanner/social/soundcloud.py +43 -0
- user_scanner/social/telegram.py +19 -24
- user_scanner/social/threads.py +11 -24
- user_scanner/social/x.py +20 -28
- user_scanner/social/youtube.py +41 -47
- user_scanner/utils/version.py +2 -0
- user_scanner/version.json +1 -1
- {user_scanner-1.0.2.1.dist-info → user_scanner-1.0.9.0.dist-info}/METADATA +62 -67
- user_scanner-1.0.9.0.dist-info/RECORD +61 -0
- user_scanner-1.0.2.1.dist-info/RECORD +0 -48
- {user_scanner-1.0.2.1.dist-info → user_scanner-1.0.9.0.dist-info}/WHEEL +0 -0
- {user_scanner-1.0.2.1.dist-info → user_scanner-1.0.9.0.dist-info}/entry_points.txt +0 -0
- {user_scanner-1.0.2.1.dist-info → user_scanner-1.0.9.0.dist-info}/licenses/LICENSE +0 -0
user_scanner/creator/patreon.py
CHANGED
|
@@ -1,45 +1,19 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
1
|
+
from user_scanner.core.orchestrator import status_validate
|
|
2
|
+
|
|
3
3
|
|
|
4
4
|
def validate_patreon(user):
|
|
5
5
|
url = f"https://www.patreon.com/{user}"
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
'User-Agent': "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36",
|
|
9
|
-
'Accept': "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7",
|
|
10
|
-
'Accept-Encoding': "gzip, deflate, br",
|
|
11
|
-
'Accept-Language': "en-US,en;q=0.9",
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
try:
|
|
15
|
-
response = httpx.get(url, headers=headers, timeout = 15.0, follow_redirects=True)
|
|
16
|
-
status = response.status_code
|
|
17
|
-
|
|
18
|
-
if status == 200:
|
|
19
|
-
return 0
|
|
20
|
-
elif status == 404:
|
|
21
|
-
return 1
|
|
22
|
-
else:
|
|
23
|
-
return 2
|
|
7
|
+
return status_validate(url, 404, 200, timeout=15.0, follow_redirects=True)
|
|
24
8
|
|
|
25
|
-
except (ConnectError, TimeoutException):
|
|
26
|
-
return 2
|
|
27
|
-
except Exception:
|
|
28
|
-
return 2
|
|
29
9
|
|
|
30
10
|
if __name__ == "__main__":
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
if result == 1:
|
|
41
|
-
print("Available!")
|
|
42
|
-
elif result == 0:
|
|
43
|
-
print("Unavailable!")
|
|
44
|
-
else:
|
|
45
|
-
print("Error occured!")
|
|
11
|
+
user = input("Username?: ").strip()
|
|
12
|
+
result = validate_patreon(user)
|
|
13
|
+
|
|
14
|
+
if result == 1:
|
|
15
|
+
print("Available!")
|
|
16
|
+
elif result == 0:
|
|
17
|
+
print("Unavailable!")
|
|
18
|
+
else:
|
|
19
|
+
print("Error occured!")
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
from user_scanner.core.orchestrator import status_validate, Result
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
def validate_youtube(user) -> Result:
|
|
5
|
+
url = f"https://m.youtube.com/@{user}"
|
|
6
|
+
headers = {
|
|
7
|
+
'User-Agent': "Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/143.0.0.0 Mobile Safari/537.36",
|
|
8
|
+
'Accept': "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7",
|
|
9
|
+
'Accept-Encoding': "identity",
|
|
10
|
+
'sec-ch-dpr': "2.75",
|
|
11
|
+
'sec-ch-viewport-width': "980",
|
|
12
|
+
'sec-ch-ua': "\"Google Chrome\";v=\"143\", \"Chromium\";v=\"143\", \"Not A(Brand\";v=\"24\"",
|
|
13
|
+
'sec-ch-ua-mobile': "?1",
|
|
14
|
+
'sec-ch-ua-full-version': "\"143.0.7499.52\"",
|
|
15
|
+
'sec-ch-ua-arch': "\"\"",
|
|
16
|
+
'sec-ch-ua-platform': "\"Android\"",
|
|
17
|
+
'sec-ch-ua-platform-version': "\"15.0.0\"",
|
|
18
|
+
'sec-ch-ua-bitness': "\"\"",
|
|
19
|
+
'sec-ch-ua-wow64': "?0",
|
|
20
|
+
'sec-ch-ua-full-version-list': "\"Google Chrome\";v=\"143.0.7499.52\", \"Chromium\";v=\"143.0.7499.52\", \"Not A(Brand\";v=\"24.0.0.0\"",
|
|
21
|
+
'sec-ch-ua-form-factors': "\"Mobile\"",
|
|
22
|
+
'upgrade-insecure-requests': "1",
|
|
23
|
+
'x-browser-channel': "stable",
|
|
24
|
+
'x-browser-year': "2025",
|
|
25
|
+
'x-browser-copyright': "Copyright 2025 Google LLC. All Rights reserved.",
|
|
26
|
+
'sec-fetch-site': "none",
|
|
27
|
+
'sec-fetch-mode': "navigate",
|
|
28
|
+
'sec-fetch-user': "?1",
|
|
29
|
+
'sec-fetch-dest': "document",
|
|
30
|
+
'accept-language': "en-US,en;q=0.9",
|
|
31
|
+
'priority': "u=0, i"
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
return status_validate(url, 404, 200, headers=headers)
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
if __name__ == "__main__":
|
|
38
|
+
user = input("Username?: ").strip()
|
|
39
|
+
result = validate_youtube(user)
|
|
40
|
+
|
|
41
|
+
if result == 1:
|
|
42
|
+
print("Available!")
|
|
43
|
+
elif result == 0:
|
|
44
|
+
print("Unavailable!")
|
|
45
|
+
else:
|
|
46
|
+
reason = result.get_reason()
|
|
47
|
+
print(f"Error occurred! Reason: {reason}")
|
user_scanner/dev/codeberg.py
CHANGED
|
@@ -1,37 +1,19 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
1
|
+
from user_scanner.core.orchestrator import status_validate
|
|
2
|
+
|
|
3
3
|
|
|
4
4
|
def validate_codeberg(user):
|
|
5
5
|
url = f"https://codeberg.org/{user}"
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
'User-Agent': "Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Mobile Safari/537.36",
|
|
9
|
-
'Accept': "text/html",
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
try:
|
|
13
|
-
response = httpx.head(url, headers=headers, timeout=3.0, follow_redirects=True)
|
|
14
|
-
status = response.status_code
|
|
15
|
-
|
|
16
|
-
if status == 200:
|
|
17
|
-
return 0
|
|
18
|
-
elif status == 404:
|
|
19
|
-
return 1
|
|
20
|
-
else:
|
|
21
|
-
return 2
|
|
7
|
+
return status_validate(url, 404, 200, follow_redirects=True)
|
|
22
8
|
|
|
23
|
-
except (ConnectError, TimeoutException):
|
|
24
|
-
return 2
|
|
25
|
-
except Exception:
|
|
26
|
-
return 2
|
|
27
9
|
|
|
28
10
|
if __name__ == "__main__":
|
|
29
|
-
|
|
30
|
-
|
|
11
|
+
user = input("Username?: ").strip()
|
|
12
|
+
result = validate_codeberg(user)
|
|
31
13
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
14
|
+
if result == 1:
|
|
15
|
+
print("Available!")
|
|
16
|
+
elif result == 0:
|
|
17
|
+
print("Unavailable!")
|
|
18
|
+
else:
|
|
19
|
+
print("Error occurred!")
|
user_scanner/dev/cratesio.py
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
1
|
+
from user_scanner.core.orchestrator import status_validate
|
|
2
|
+
|
|
3
3
|
|
|
4
4
|
def validate_cratesio(user):
|
|
5
5
|
url = f"https://crates.io/api/v1/users/{user}"
|
|
@@ -11,29 +11,16 @@ def validate_cratesio(user):
|
|
|
11
11
|
'sec-fetch-mode': "cors",
|
|
12
12
|
}
|
|
13
13
|
|
|
14
|
-
|
|
15
|
-
response = httpx.head(url, headers=headers, timeout=5.0)
|
|
16
|
-
status = response.status_code
|
|
17
|
-
|
|
18
|
-
if status == 200:
|
|
19
|
-
return 0
|
|
20
|
-
elif status == 404:
|
|
21
|
-
return 1
|
|
22
|
-
else:
|
|
23
|
-
return 2
|
|
14
|
+
return status_validate(url, 404, 200, headers=headers)
|
|
24
15
|
|
|
25
|
-
except (ConnectError, TimeoutException):
|
|
26
|
-
return 2
|
|
27
|
-
except Exception:
|
|
28
|
-
return 2
|
|
29
16
|
|
|
30
17
|
if __name__ == "__main__":
|
|
31
|
-
|
|
32
|
-
|
|
18
|
+
user = input("Username?: ").strip()
|
|
19
|
+
result = validate_cratesio(user)
|
|
33
20
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
21
|
+
if result == 1:
|
|
22
|
+
print("Available!")
|
|
23
|
+
elif result == 0:
|
|
24
|
+
print("Unavailable!")
|
|
25
|
+
else:
|
|
26
|
+
print("Error occurred!")
|
user_scanner/dev/dockerhub.py
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
1
|
+
from user_scanner.core.orchestrator import status_validate
|
|
2
|
+
|
|
3
3
|
|
|
4
4
|
def validate_dockerhub(user):
|
|
5
5
|
url = f"https://hub.docker.com/v2/users/{user}/"
|
|
@@ -9,32 +9,16 @@ def validate_dockerhub(user):
|
|
|
9
9
|
'Accept': "application/json",
|
|
10
10
|
}
|
|
11
11
|
|
|
12
|
-
|
|
13
|
-
response = httpx.get(url, headers=headers, timeout=3.0)
|
|
14
|
-
status = response.status_code
|
|
15
|
-
|
|
16
|
-
# UNAVAILABLE (return 0) if the user API endpoint returns 200 OK
|
|
17
|
-
if status == 200:
|
|
18
|
-
return 0
|
|
19
|
-
# AVAILABLE (return 1) if the user API endpoint returns 404 Not Found
|
|
20
|
-
elif status == 404:
|
|
21
|
-
return 1
|
|
22
|
-
# Other status codes are errors
|
|
23
|
-
else:
|
|
24
|
-
return 2
|
|
12
|
+
return status_validate(url, 404, 200, headers=headers)
|
|
25
13
|
|
|
26
|
-
except (ConnectError, TimeoutException):
|
|
27
|
-
return 2
|
|
28
|
-
except Exception:
|
|
29
|
-
return 2
|
|
30
14
|
|
|
31
15
|
if __name__ == "__main__":
|
|
32
|
-
|
|
33
|
-
|
|
16
|
+
user = input("Username?: ").strip()
|
|
17
|
+
result = validate_dockerhub(user)
|
|
34
18
|
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
19
|
+
if result == 1:
|
|
20
|
+
print("Available!")
|
|
21
|
+
elif result == 0:
|
|
22
|
+
print("Unavailable!")
|
|
23
|
+
else:
|
|
24
|
+
print("Error occurred!")
|
user_scanner/dev/github.py
CHANGED
|
@@ -1,46 +1,50 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
1
|
+
from user_scanner.core.orchestrator import generic_validate, Result
|
|
2
|
+
|
|
3
3
|
|
|
4
4
|
def validate_github(user):
|
|
5
5
|
url = f"https://github.com/signup_check/username?value={user}"
|
|
6
6
|
|
|
7
7
|
headers = {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
8
|
+
'User-Agent': "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/140.0.0.0 Safari/537.36",
|
|
9
|
+
'Accept-Encoding': "gzip, deflate, br, zstd",
|
|
10
|
+
'sec-ch-ua-platform': "\"Linux\"",
|
|
11
|
+
'sec-ch-ua': "\"Chromium\";v=\"140\", \"Not=A?Brand\";v=\"24\", \"Google Chrome\";v=\"140\"",
|
|
12
|
+
'sec-ch-ua-mobile': "?0",
|
|
13
|
+
'sec-fetch-site': "same-origin",
|
|
14
|
+
'sec-fetch-mode': "cors",
|
|
15
|
+
'sec-fetch-dest': "empty",
|
|
16
|
+
'referer': "https://github.com/signup?source=form-home-signup&user_email=",
|
|
17
|
+
'accept-language': "en-US,en;q=0.9",
|
|
18
|
+
'priority': "u=1, i"
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
GITHUB_INVALID_MSG = (
|
|
22
|
+
"Username may only contain alphanumeric characters or single hyphens, "
|
|
23
|
+
"and cannot begin or end with a hyphen."
|
|
24
|
+
)
|
|
25
|
+
|
|
26
|
+
def process(response):
|
|
27
|
+
if response.status_code == 200:
|
|
28
|
+
return Result.available()
|
|
29
|
+
|
|
30
|
+
if response.status_code == 422:
|
|
31
|
+
if GITHUB_INVALID_MSG in response.text:
|
|
32
|
+
return Result.error("Cannot start/end with hyphen or use double hyphens")
|
|
33
|
+
|
|
34
|
+
return Result.taken()
|
|
35
|
+
|
|
36
|
+
return Result.error("Unexpected GitHub response report it via issues")
|
|
37
|
+
|
|
38
|
+
return generic_validate(url, process, headers=headers)
|
|
39
|
+
|
|
36
40
|
|
|
37
41
|
if __name__ == "__main__":
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
42
|
+
user = input("Username?: ").strip()
|
|
43
|
+
result = validate_github(user)
|
|
44
|
+
|
|
45
|
+
if result == 1:
|
|
46
|
+
print("Available!")
|
|
47
|
+
elif result == 0:
|
|
48
|
+
print("Unavailable!")
|
|
49
|
+
else:
|
|
50
|
+
print("Error occured!")
|
user_scanner/dev/gitlab.py
CHANGED
|
@@ -1,51 +1,40 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
|
|
1
|
+
from user_scanner.core.orchestrator import generic_validate
|
|
2
|
+
from user_scanner.core.result import Result
|
|
3
|
+
|
|
4
4
|
|
|
5
5
|
def validate_gitlab(user):
|
|
6
6
|
url = f"https://gitlab.com/users/{user}/exists"
|
|
7
7
|
|
|
8
8
|
headers = {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
9
|
+
'User-Agent': "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36",
|
|
10
|
+
'Accept': "application/json, text/plain, */*",
|
|
11
|
+
'X-Requested-With': "XMLHttpRequest",
|
|
12
|
+
'Referer': "https://gitlab.com/users/sign_up",
|
|
13
13
|
}
|
|
14
14
|
|
|
15
|
-
|
|
16
|
-
response = httpx.get(url, headers=headers, timeout=3.0)
|
|
17
|
-
|
|
15
|
+
def process(response):
|
|
18
16
|
if response.status_code == 200:
|
|
19
17
|
data = response.json()
|
|
20
|
-
|
|
21
18
|
if 'exists' in data:
|
|
22
19
|
# Corrected: Compare against Python boolean True/False
|
|
23
20
|
# AVAILABLE (return 1) if "exists": true
|
|
24
21
|
if data['exists'] is False:
|
|
25
|
-
return
|
|
22
|
+
return Result.available()
|
|
26
23
|
# UNAVAILABLE (return 0) if "exists": false
|
|
27
24
|
elif data['exists'] is True:
|
|
28
|
-
return
|
|
29
|
-
|
|
30
|
-
return 2
|
|
25
|
+
return Result.taken()
|
|
26
|
+
return Result.error("Invalid status code")
|
|
31
27
|
|
|
32
|
-
|
|
33
|
-
return 2
|
|
28
|
+
return generic_validate(url, process, headers=headers)
|
|
34
29
|
|
|
35
|
-
except (ConnectError, TimeoutException):
|
|
36
|
-
return 2
|
|
37
|
-
except json.JSONDecodeError:
|
|
38
|
-
return 2
|
|
39
|
-
except Exception:
|
|
40
|
-
return 2
|
|
41
30
|
|
|
42
31
|
if __name__ == "__main__":
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
32
|
+
user = input("Username?: ").strip()
|
|
33
|
+
result = validate_gitlab(user)
|
|
34
|
+
|
|
35
|
+
if result == 1:
|
|
36
|
+
print("Available!")
|
|
37
|
+
elif result == 0:
|
|
38
|
+
print("Unavailable!")
|
|
39
|
+
else:
|
|
40
|
+
print("Error occurred!")
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
from user_scanner.core.orchestrator import status_validate
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
def validate_huggingface(user):
|
|
5
|
+
url = f"https://huggingface.co/{user}"
|
|
6
|
+
|
|
7
|
+
return status_validate(url, 404, 200, follow_redirects=True)
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
if __name__ == "__main__":
|
|
11
|
+
user = input("Username?: ").strip()
|
|
12
|
+
result = validate_huggingface(user)
|
|
13
|
+
|
|
14
|
+
if result == 1:
|
|
15
|
+
print("Available!")
|
|
16
|
+
elif result == 0:
|
|
17
|
+
print("Unavailable!")
|
|
18
|
+
else:
|
|
19
|
+
print("Error occurred!")
|
user_scanner/dev/launchpad.py
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
1
|
+
from user_scanner.core.orchestrator import status_validate
|
|
2
|
+
|
|
3
3
|
|
|
4
4
|
def validate_launchpad(user):
|
|
5
5
|
url = f"https://launchpad.net/~{user}"
|
|
@@ -11,29 +11,16 @@ def validate_launchpad(user):
|
|
|
11
11
|
'Upgrade-Insecure-Requests': "1",
|
|
12
12
|
}
|
|
13
13
|
|
|
14
|
-
|
|
15
|
-
response = httpx.head(url, headers=headers, timeout=5.0, follow_redirects=True)
|
|
16
|
-
status = response.status_code
|
|
17
|
-
|
|
18
|
-
if status == 200:
|
|
19
|
-
return 0
|
|
20
|
-
elif status == 404:
|
|
21
|
-
return 1
|
|
22
|
-
else:
|
|
23
|
-
return 2
|
|
14
|
+
return status_validate(url, 404, 200, headers=headers, follow_redirects=True)
|
|
24
15
|
|
|
25
|
-
except (ConnectError, TimeoutException):
|
|
26
|
-
return 2
|
|
27
|
-
except Exception:
|
|
28
|
-
return 2
|
|
29
16
|
|
|
30
17
|
if __name__ == "__main__":
|
|
31
|
-
|
|
32
|
-
|
|
18
|
+
user = input("Username?: ").strip()
|
|
19
|
+
result = validate_launchpad(user)
|
|
33
20
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
21
|
+
if result == 1:
|
|
22
|
+
print("Available!")
|
|
23
|
+
elif result == 0:
|
|
24
|
+
print("Unavailable!")
|
|
25
|
+
else:
|
|
26
|
+
print("Error occurred!")
|
user_scanner/dev/npmjs.py
CHANGED
|
@@ -1,40 +1,27 @@
|
|
|
1
|
-
import
|
|
2
|
-
from
|
|
1
|
+
import re
|
|
2
|
+
from user_scanner.core.orchestrator import status_validate, Result
|
|
3
|
+
|
|
3
4
|
|
|
4
5
|
def validate_npmjs(user):
|
|
6
|
+
if re.match(r'^[^a-zA-Z0-9_-]', user):
|
|
7
|
+
return Result.error("Username cannot start with a period")
|
|
8
|
+
|
|
9
|
+
if re.search(r'[A-Z]', user):
|
|
10
|
+
return Result.error("Username cannot contain uppercase letters.")
|
|
11
|
+
|
|
5
12
|
url = f"https://www.npmjs.com/~{user}"
|
|
6
13
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
'Accept-Encoding': "gzip, deflate, br, zstd",
|
|
11
|
-
'accept-language': "en-US,en;q=0.9",
|
|
12
|
-
'priority': "u=0, i"
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
try:
|
|
16
|
-
response = httpx.head(url, headers=headers, timeout=3.0, follow_redirects=True)
|
|
17
|
-
status = response.status_code
|
|
18
|
-
|
|
19
|
-
if status == 200:
|
|
20
|
-
return 0
|
|
21
|
-
elif status == 404:
|
|
22
|
-
return 1
|
|
23
|
-
else:
|
|
24
|
-
return 2
|
|
25
|
-
|
|
26
|
-
except (ConnectError, TimeoutException):
|
|
27
|
-
return 2
|
|
28
|
-
except Exception:
|
|
29
|
-
return 2
|
|
14
|
+
|
|
15
|
+
return status_validate(url, 404, 200, timeout=3.0, follow_redirects=True)
|
|
16
|
+
|
|
30
17
|
|
|
31
18
|
if __name__ == "__main__":
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
19
|
+
user = input("Username?: ").strip()
|
|
20
|
+
result = validate_npmjs(user)
|
|
21
|
+
|
|
22
|
+
if result == 1:
|
|
23
|
+
print("Available!")
|
|
24
|
+
elif result == 0:
|
|
25
|
+
print("Unavailable!")
|
|
26
|
+
else:
|
|
27
|
+
print(f"Error occurred! Reason: {result}")
|
user_scanner/dev/replit.py
CHANGED
|
@@ -1,37 +1,19 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
1
|
+
from user_scanner.core.orchestrator import status_validate
|
|
2
|
+
|
|
3
3
|
|
|
4
4
|
def validate_replit(user):
|
|
5
5
|
url = f"https://replit.com/@{user}"
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
'User-Agent': "Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Mobile Safari/537.36",
|
|
9
|
-
'Accept': "text/html",
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
try:
|
|
13
|
-
response = httpx.head(url, headers=headers, timeout=3.0, follow_redirects=True)
|
|
14
|
-
status = response.status_code
|
|
15
|
-
|
|
16
|
-
if status == 200:
|
|
17
|
-
return 0
|
|
18
|
-
elif status == 404:
|
|
19
|
-
return 1
|
|
20
|
-
else:
|
|
21
|
-
return 2
|
|
7
|
+
return status_validate(url, 404, 200, follow_redirects=True)
|
|
22
8
|
|
|
23
|
-
except (ConnectError, TimeoutException):
|
|
24
|
-
return 2
|
|
25
|
-
except Exception:
|
|
26
|
-
return 2
|
|
27
9
|
|
|
28
10
|
if __name__ == "__main__":
|
|
29
|
-
|
|
30
|
-
|
|
11
|
+
user = input("Username?: ").strip()
|
|
12
|
+
result = validate_replit(user)
|
|
31
13
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
14
|
+
if result == 1:
|
|
15
|
+
print("Available!")
|
|
16
|
+
elif result == 0:
|
|
17
|
+
print("Unavailable!")
|
|
18
|
+
else:
|
|
19
|
+
print("Error occurred!")
|
|
File without changes
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
from user_scanner.core.orchestrator import status_validate
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
def validate_buymeacoffee(user):
|
|
5
|
+
url = f"https://buymeacoffee.com/{user}"
|
|
6
|
+
|
|
7
|
+
return status_validate(url, 404, 200, follow_redirects=True)
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
if __name__ == "__main__":
|
|
11
|
+
user = input("Username?: ").strip()
|
|
12
|
+
result = validate_buymeacoffee(user)
|
|
13
|
+
|
|
14
|
+
if result == 1:
|
|
15
|
+
print("Available!")
|
|
16
|
+
elif result == 0:
|
|
17
|
+
print("Unavailable!")
|
|
18
|
+
else:
|
|
19
|
+
print("Error occurred!")
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
from user_scanner.core.orchestrator import status_validate
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
def validate_liberapay(user):
|
|
5
|
+
url = f"https://en.liberapay.com/{user}"
|
|
6
|
+
|
|
7
|
+
headers = {
|
|
8
|
+
"accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8",
|
|
9
|
+
"accept-language": "en-Us,pt;q=0.6",
|
|
10
|
+
"cache-control": "no-cache",
|
|
11
|
+
"pragma": "no-cache",
|
|
12
|
+
"priority": "u=0, i",
|
|
13
|
+
"sec-ch-ua": '"Chromium";v="142", "Brave";v="142", "Not_A Brand";v="99"',
|
|
14
|
+
"sec-ch-ua-mobile": "?0",
|
|
15
|
+
"sec-ch-ua-platform": '"Windows"',
|
|
16
|
+
"sec-fetch-dest": "document",
|
|
17
|
+
"sec-fetch-mode": "navigate",
|
|
18
|
+
"sec-fetch-site": "none",
|
|
19
|
+
"sec-fetch-user": "?1",
|
|
20
|
+
"sec-gpc": "1",
|
|
21
|
+
"upgrade-insecure-requests": "1",
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
return status_validate(url, 404, 200, headers=headers, follow_redirects=True)
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
if __name__ == "__main__":
|
|
28
|
+
user = input("Username?: ").strip()
|
|
29
|
+
result = validate_liberapay(user)
|
|
30
|
+
|
|
31
|
+
if result == 1:
|
|
32
|
+
print("Available!")
|
|
33
|
+
elif result == 0:
|
|
34
|
+
print("Unavailable!")
|
|
35
|
+
else:
|
|
36
|
+
print("Error occurred!")
|