user-scanner 1.0.2.1__py3-none-any.whl → 1.0.5.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/__main__.py +10 -6
- user_scanner/cli/banner.py +1 -8
- user_scanner/community/coderlegion.py +5 -26
- user_scanner/core/orchestrator.py +98 -50
- user_scanner/creator/devto.py +3 -23
- user_scanner/creator/itch_io.py +22 -0
- user_scanner/creator/kaggle.py +3 -22
- user_scanner/creator/patreon.py +2 -24
- user_scanner/creator/producthunt.py +40 -0
- user_scanner/dev/codeberg.py +3 -23
- user_scanner/dev/cratesio.py +9 -24
- user_scanner/dev/dockerhub.py +7 -25
- user_scanner/dev/github.py +16 -31
- user_scanner/dev/gitlab.py +8 -22
- user_scanner/dev/launchpad.py +9 -24
- user_scanner/dev/replit.py +3 -23
- user_scanner/donation/buymeacoffee.py +21 -0
- user_scanner/gaming/chess_com.py +5 -18
- user_scanner/gaming/monkeytype.py +5 -18
- user_scanner/gaming/osu.py +2 -24
- user_scanner/gaming/roblox.py +3 -17
- user_scanner/gaming/steam.py +30 -0
- user_scanner/social/bluesky.py +6 -19
- user_scanner/social/instagram.py +12 -27
- user_scanner/social/mastodon.py +2 -24
- user_scanner/social/pinterest.py +4 -20
- user_scanner/social/reddit.py +4 -20
- user_scanner/social/snapchat.py +5 -20
- user_scanner/social/telegram.py +4 -11
- user_scanner/social/threads.py +13 -28
- user_scanner/version.json +1 -1
- {user_scanner-1.0.2.1.dist-info → user_scanner-1.0.5.0.dist-info}/METADATA +8 -48
- user_scanner-1.0.5.0.dist-info/RECORD +52 -0
- user_scanner-1.0.2.1.dist-info/RECORD +0 -48
- /user_scanner/{utils/update.py → donation/__init__.py} +0 -0
- {user_scanner-1.0.2.1.dist-info → user_scanner-1.0.5.0.dist-info}/WHEEL +0 -0
- {user_scanner-1.0.2.1.dist-info → user_scanner-1.0.5.0.dist-info}/entry_points.txt +0 -0
- {user_scanner-1.0.2.1.dist-info → user_scanner-1.0.5.0.dist-info}/licenses/LICENSE +0 -0
user_scanner/dev/gitlab.py
CHANGED
|
@@ -1,23 +1,18 @@
|
|
|
1
|
-
import
|
|
2
|
-
import json
|
|
3
|
-
from httpx import ConnectError, TimeoutException
|
|
1
|
+
from ..core.orchestrator import generic_validate
|
|
4
2
|
|
|
5
3
|
def validate_gitlab(user):
|
|
6
4
|
url = f"https://gitlab.com/users/{user}/exists"
|
|
7
5
|
|
|
8
6
|
headers = {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
7
|
+
'User-Agent': "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36",
|
|
8
|
+
'Accept': "application/json, text/plain, */*",
|
|
9
|
+
'X-Requested-With': "XMLHttpRequest",
|
|
10
|
+
'Referer': "https://gitlab.com/users/sign_up",
|
|
13
11
|
}
|
|
14
12
|
|
|
15
|
-
|
|
16
|
-
response = httpx.get(url, headers=headers, timeout=3.0)
|
|
17
|
-
|
|
13
|
+
def process(response):
|
|
18
14
|
if response.status_code == 200:
|
|
19
15
|
data = response.json()
|
|
20
|
-
|
|
21
16
|
if 'exists' in data:
|
|
22
17
|
# Corrected: Compare against Python boolean True/False
|
|
23
18
|
# AVAILABLE (return 1) if "exists": true
|
|
@@ -26,18 +21,9 @@ def validate_gitlab(user):
|
|
|
26
21
|
# UNAVAILABLE (return 0) if "exists": false
|
|
27
22
|
elif data['exists'] is True:
|
|
28
23
|
return 0
|
|
29
|
-
|
|
30
|
-
return 2
|
|
31
|
-
|
|
32
|
-
else:
|
|
33
|
-
return 2
|
|
34
|
-
|
|
35
|
-
except (ConnectError, TimeoutException):
|
|
36
|
-
return 2
|
|
37
|
-
except json.JSONDecodeError:
|
|
38
|
-
return 2
|
|
39
|
-
except Exception:
|
|
40
24
|
return 2
|
|
25
|
+
|
|
26
|
+
return generic_validate(url, process, headers = headers)
|
|
41
27
|
|
|
42
28
|
if __name__ == "__main__":
|
|
43
29
|
user = input ("Username?: ").strip()
|
user_scanner/dev/launchpad.py
CHANGED
|
@@ -1,31 +1,16 @@
|
|
|
1
|
-
import
|
|
2
|
-
from httpx import ConnectError, TimeoutException
|
|
1
|
+
from ..core.orchestrator import status_validate
|
|
3
2
|
|
|
4
3
|
def validate_launchpad(user):
|
|
5
|
-
|
|
4
|
+
url = f"https://launchpad.net/~{user}"
|
|
6
5
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
6
|
+
headers = {
|
|
7
|
+
'User-Agent': "Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Mobile Safari/537.36",
|
|
8
|
+
'Accept': "text/html,application/xhtml+xml,application/xml;q=0.9",
|
|
9
|
+
'Accept-Encoding': "gzip, deflate, br, zstd",
|
|
10
|
+
'Upgrade-Insecure-Requests': "1",
|
|
11
|
+
}
|
|
13
12
|
|
|
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
|
|
24
|
-
|
|
25
|
-
except (ConnectError, TimeoutException):
|
|
26
|
-
return 2
|
|
27
|
-
except Exception:
|
|
28
|
-
return 2
|
|
13
|
+
return status_validate(url, 404, 200, headers = headers, follow_redirects=True)
|
|
29
14
|
|
|
30
15
|
if __name__ == "__main__":
|
|
31
16
|
user = input ("Username?: ").strip()
|
user_scanner/dev/replit.py
CHANGED
|
@@ -1,29 +1,9 @@
|
|
|
1
|
-
import
|
|
2
|
-
from httpx import ConnectError, TimeoutException
|
|
1
|
+
from ..core.orchestrator import status_validate
|
|
3
2
|
|
|
4
3
|
def validate_replit(user):
|
|
5
|
-
|
|
4
|
+
url = f"https://replit.com/@{user}"
|
|
6
5
|
|
|
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
|
|
22
|
-
|
|
23
|
-
except (ConnectError, TimeoutException):
|
|
24
|
-
return 2
|
|
25
|
-
except Exception:
|
|
26
|
-
return 2
|
|
6
|
+
return status_validate(url, 404, 200, follow_redirects = True)
|
|
27
7
|
|
|
28
8
|
if __name__ == "__main__":
|
|
29
9
|
user = input ("Username?: ").strip()
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import httpx
|
|
2
|
+
from httpx import ConnectError, TimeoutException
|
|
3
|
+
|
|
4
|
+
from ..core.orchestrator import status_validate
|
|
5
|
+
|
|
6
|
+
def validate_buymeacoffee(user):
|
|
7
|
+
url = f"https://buymeacoffee.com/{user}"
|
|
8
|
+
|
|
9
|
+
return status_validate(url, 404, 200, follow_redirects = True)
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
if __name__ == "__main__":
|
|
13
|
+
user = input ("Username?: ").strip()
|
|
14
|
+
result = validate_buymeacoffee(user)
|
|
15
|
+
|
|
16
|
+
if result == 1:
|
|
17
|
+
print("Available!")
|
|
18
|
+
elif result == 0:
|
|
19
|
+
print("Unavailable!")
|
|
20
|
+
else:
|
|
21
|
+
print("Error occurred!")
|
user_scanner/gaming/chess_com.py
CHANGED
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
import
|
|
2
|
-
from httpx import ConnectError, TimeoutException
|
|
3
|
-
import json
|
|
1
|
+
from ..core.orchestrator import generic_validate
|
|
4
2
|
|
|
5
3
|
def validate_chess_com(user):
|
|
6
4
|
url = f"https://www.chess.com/callback/user/valid?username={user}"
|
|
@@ -12,11 +10,8 @@ def validate_chess_com(user):
|
|
|
12
10
|
'Accept-Language': "en-US,en;q=0.9",
|
|
13
11
|
}
|
|
14
12
|
|
|
15
|
-
|
|
16
|
-
response
|
|
17
|
-
status = response.status_code
|
|
18
|
-
|
|
19
|
-
if status == 200:
|
|
13
|
+
def process(response):
|
|
14
|
+
if response.status_code == 200:
|
|
20
15
|
data = response.json()
|
|
21
16
|
if data.get('valid') is True:
|
|
22
17
|
# 'valid': true means the username is NOT taken
|
|
@@ -24,18 +19,10 @@ def validate_chess_com(user):
|
|
|
24
19
|
elif data.get('valid') is False:
|
|
25
20
|
# 'valid': false means the username IS taken
|
|
26
21
|
return 0
|
|
27
|
-
else:
|
|
28
|
-
return 2
|
|
29
|
-
else:
|
|
30
|
-
return 2
|
|
31
|
-
|
|
32
|
-
except (ConnectError, TimeoutException):
|
|
33
|
-
return 2
|
|
34
|
-
except json.JSONDecodeError:
|
|
35
|
-
return 2
|
|
36
|
-
except Exception:
|
|
37
22
|
return 2
|
|
38
23
|
|
|
24
|
+
return generic_validate(url, process, headers = headers)
|
|
25
|
+
|
|
39
26
|
if __name__ == "__main__":
|
|
40
27
|
try:
|
|
41
28
|
import httpx
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
import
|
|
2
|
-
from httpx import ConnectError, TimeoutException
|
|
3
|
-
import json
|
|
1
|
+
from ..core.orchestrator import generic_validate
|
|
4
2
|
|
|
5
3
|
def validate_monkeytype(user: str) -> int:
|
|
6
4
|
|
|
@@ -17,11 +15,8 @@ def validate_monkeytype(user: str) -> int:
|
|
|
17
15
|
"Accept-Language": "en-US,en;q=0.9",
|
|
18
16
|
}
|
|
19
17
|
|
|
20
|
-
|
|
21
|
-
response
|
|
22
|
-
status = response.status_code
|
|
23
|
-
|
|
24
|
-
if status == 200:
|
|
18
|
+
def process(response):
|
|
19
|
+
if response.status_code == 200:
|
|
25
20
|
data = response.json()
|
|
26
21
|
# Expected shape:
|
|
27
22
|
# { "message": "string", "data": { "available": true/false } }
|
|
@@ -32,18 +27,10 @@ def validate_monkeytype(user: str) -> int:
|
|
|
32
27
|
return 1
|
|
33
28
|
elif available is False:
|
|
34
29
|
return 0
|
|
35
|
-
else:
|
|
36
|
-
return 2
|
|
37
|
-
else:
|
|
38
|
-
return 2
|
|
39
|
-
|
|
40
|
-
except (ConnectError, TimeoutException):
|
|
41
|
-
return 2
|
|
42
|
-
except json.JSONDecodeError:
|
|
43
|
-
return 2
|
|
44
|
-
except Exception:
|
|
45
30
|
return 2
|
|
31
|
+
|
|
46
32
|
|
|
33
|
+
return generic_validate(url, process, headers = headers)
|
|
47
34
|
|
|
48
35
|
if __name__ == "__main__":
|
|
49
36
|
try:
|
user_scanner/gaming/osu.py
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import
|
|
2
|
-
from httpx import ConnectError, TimeoutException
|
|
1
|
+
from ..core.orchestrator import status_validate
|
|
3
2
|
|
|
4
3
|
def validate_osu(user):
|
|
5
4
|
"""
|
|
@@ -9,28 +8,7 @@ def validate_osu(user):
|
|
|
9
8
|
|
|
10
9
|
url = f"https://osu.ppy.sh/users/{user}"
|
|
11
10
|
|
|
12
|
-
|
|
13
|
-
'User-Agent': "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36",
|
|
14
|
-
'Accept': "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8",
|
|
15
|
-
'Accept-Encoding': "gzip, deflate, br",
|
|
16
|
-
'Accept-Language': "en-US,en;q=0.9",
|
|
17
|
-
'sec-fetch-dest': "document",
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
try:
|
|
21
|
-
response = httpx.get(url, headers = headers, timeout = 5.0, follow_redirects = True)
|
|
22
|
-
status = response.status_code
|
|
23
|
-
|
|
24
|
-
if status == 200:
|
|
25
|
-
return 0
|
|
26
|
-
elif status == 404:
|
|
27
|
-
return 1
|
|
28
|
-
else:
|
|
29
|
-
return 2
|
|
30
|
-
except (ConnectError, TimeoutException):
|
|
31
|
-
return 2
|
|
32
|
-
except Exception:
|
|
33
|
-
return 2
|
|
11
|
+
return status_validate(url, 404, [200, 302], follow_redirects = True)
|
|
34
12
|
|
|
35
13
|
if __name__ == "__main__":
|
|
36
14
|
user = input ("Username?: ").strip()
|
user_scanner/gaming/roblox.py
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import
|
|
2
|
-
from httpx import ConnectError, TimeoutException
|
|
1
|
+
from ..core.orchestrator import generic_validate
|
|
3
2
|
|
|
4
3
|
def validate_roblox(user):
|
|
5
4
|
"""
|
|
@@ -9,17 +8,7 @@ def validate_roblox(user):
|
|
|
9
8
|
|
|
10
9
|
url = f"https://users.roblox.com/v1/users/search?keyword={user}&limit=10" # official api
|
|
11
10
|
|
|
12
|
-
|
|
13
|
-
'User-Agent': "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36",
|
|
14
|
-
'Accept': "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8",
|
|
15
|
-
'Accept-Encoding': "gzip, deflate, br",
|
|
16
|
-
'Accept-Language': "en-US,en;q=0.9",
|
|
17
|
-
'sec-fetch-dest': "document",
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
try:
|
|
21
|
-
response = httpx.get(url, headers = headers, timeout = 5.5, follow_redirects = True)
|
|
22
|
-
status = response.status_code
|
|
11
|
+
def process(response):
|
|
23
12
|
search_results = response.json() # api response
|
|
24
13
|
|
|
25
14
|
if "errors" in search_results: # this usually triggers when timeout or ratelimit
|
|
@@ -31,10 +20,7 @@ def validate_roblox(user):
|
|
|
31
20
|
return 0
|
|
32
21
|
return 1
|
|
33
22
|
|
|
34
|
-
|
|
35
|
-
return 2
|
|
36
|
-
except Exception as e:
|
|
37
|
-
return 2
|
|
23
|
+
return generic_validate(url, process, follow_redirects = True)
|
|
38
24
|
|
|
39
25
|
if __name__ == "__main__":
|
|
40
26
|
user = input ("Username?: ").strip()
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
from ..core.orchestrator import generic_validate
|
|
2
|
+
|
|
3
|
+
def validate_steam(user):
|
|
4
|
+
"""
|
|
5
|
+
Checks if a steam username is available.
|
|
6
|
+
Returns: 1 -> available, 0 -> taken, 2 -> error
|
|
7
|
+
"""
|
|
8
|
+
|
|
9
|
+
url = f"https://steamcommunity.com/id/{user}/"
|
|
10
|
+
|
|
11
|
+
def process(response):
|
|
12
|
+
if response.status_code == 200:
|
|
13
|
+
if response.text.find("Error</title>") != -1:
|
|
14
|
+
return 1
|
|
15
|
+
else:
|
|
16
|
+
return 0
|
|
17
|
+
return 2
|
|
18
|
+
|
|
19
|
+
return generic_validate(url, process)
|
|
20
|
+
|
|
21
|
+
if __name__ == "__main__":
|
|
22
|
+
user = input ("Username?: ").strip()
|
|
23
|
+
result = validate_steam(user)
|
|
24
|
+
|
|
25
|
+
if result == 1:
|
|
26
|
+
print("Available!")
|
|
27
|
+
elif result == 0:
|
|
28
|
+
print("Unavailable!")
|
|
29
|
+
else:
|
|
30
|
+
print("Error occurred!")
|
user_scanner/social/bluesky.py
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
import httpx
|
|
2
|
-
from httpx import ConnectError, TimeoutException
|
|
3
1
|
import re
|
|
4
|
-
import
|
|
2
|
+
from ..core.orchestrator import generic_validate
|
|
5
3
|
|
|
6
4
|
def validate_bluesky(user):
|
|
7
5
|
handle = user if user.endswith('.bsky.social') else f"{user}.bsky.social"
|
|
@@ -28,12 +26,9 @@ def validate_bluesky(user):
|
|
|
28
26
|
|
|
29
27
|
if not re.fullmatch(r"^[a-zA-Z0-9\.-]{1,64}$", user):
|
|
30
28
|
return 2
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
response
|
|
34
|
-
status = response.status_code
|
|
35
|
-
|
|
36
|
-
if status == 200:
|
|
29
|
+
|
|
30
|
+
def process(response):
|
|
31
|
+
if response.status_code == 200:
|
|
37
32
|
data = response.json()
|
|
38
33
|
result_type = data.get('result', {}).get('$type')
|
|
39
34
|
|
|
@@ -41,18 +36,10 @@ def validate_bluesky(user):
|
|
|
41
36
|
return 1
|
|
42
37
|
elif result_type == "com.atproto.temp.checkHandleAvailability#resultUnavailable":
|
|
43
38
|
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
39
|
return 2
|
|
55
40
|
|
|
41
|
+
return generic_validate(url, process, headers = headers, params = params, timeout = 15.0)
|
|
42
|
+
|
|
56
43
|
if __name__ == "__main__":
|
|
57
44
|
try:
|
|
58
45
|
import httpx
|
user_scanner/social/instagram.py
CHANGED
|
@@ -1,34 +1,19 @@
|
|
|
1
|
-
import
|
|
2
|
-
from httpx import ConnectError, TimeoutException
|
|
1
|
+
from ..core.orchestrator import status_validate
|
|
3
2
|
|
|
4
3
|
def validate_instagram(user):
|
|
5
|
-
|
|
4
|
+
url = f"https://www.instagram.com/api/v1/users/web_profile_info/?username={user}"
|
|
6
5
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
6
|
+
headers = {
|
|
7
|
+
'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",
|
|
8
|
+
'X-IG-App-ID': "936619743392459",
|
|
9
|
+
'Accept': "application/json, text/javascript, */*; q=0.01",
|
|
10
|
+
'Accept-Encoding': "gzip, deflate, br",
|
|
11
|
+
'Accept-Language': "en-US,en;q=0.9",
|
|
12
|
+
'X-Requested-With': "XMLHttpRequest",
|
|
13
|
+
'Referer': f"https://www.instagram.com/{user}/",
|
|
14
|
+
}
|
|
16
15
|
|
|
17
|
-
|
|
18
|
-
response = httpx.get(url, headers=headers, timeout = 3.0)
|
|
19
|
-
status = response.status_code
|
|
20
|
-
|
|
21
|
-
if status == 200:
|
|
22
|
-
return 0
|
|
23
|
-
elif status == 404:
|
|
24
|
-
return 1
|
|
25
|
-
else:
|
|
26
|
-
return 2
|
|
27
|
-
|
|
28
|
-
except (ConnectError, TimeoutException):
|
|
29
|
-
return 2
|
|
30
|
-
except Exception:
|
|
31
|
-
return 2
|
|
16
|
+
return status_validate(url, 404, 200, headers = headers)
|
|
32
17
|
|
|
33
18
|
if __name__ == "__main__":
|
|
34
19
|
user = input ("Username?: ").strip()
|
user_scanner/social/mastodon.py
CHANGED
|
@@ -1,31 +1,9 @@
|
|
|
1
|
-
import
|
|
2
|
-
from httpx import ConnectError, TimeoutException
|
|
1
|
+
from ..core.orchestrator import status_validate
|
|
3
2
|
|
|
4
3
|
def validate_mastodon(user):
|
|
5
4
|
url = f"https://mastodon.social/@{user}"
|
|
6
5
|
|
|
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 = 3.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
|
|
24
|
-
|
|
25
|
-
except (ConnectError, TimeoutException):
|
|
26
|
-
return 2
|
|
27
|
-
except Exception:
|
|
28
|
-
return 2
|
|
6
|
+
return status_validate(url, 404, 200, follow_redirects = True)
|
|
29
7
|
|
|
30
8
|
if __name__ == "__main__":
|
|
31
9
|
try:
|
user_scanner/social/pinterest.py
CHANGED
|
@@ -1,34 +1,18 @@
|
|
|
1
|
-
import
|
|
2
|
-
from httpx import ConnectError, TimeoutException
|
|
1
|
+
from ..core.orchestrator import generic_validate
|
|
3
2
|
|
|
4
3
|
def validate_pinterest(user):
|
|
5
4
|
url = f"https://www.pinterest.com/{user}/"
|
|
6
5
|
|
|
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,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8",
|
|
10
|
-
'Accept-Encoding': "gzip",
|
|
11
|
-
'Accept-Language': "en-US,en;q=0.9",
|
|
12
|
-
'sec-fetch-dest': "document",
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
NOT_FOUND_STRING = "User not found."
|
|
16
|
-
|
|
17
|
-
try:
|
|
18
|
-
response = httpx.get(url, headers=headers, follow_redirects=True, timeout = 3.0)
|
|
19
|
-
|
|
6
|
+
def process(response):
|
|
20
7
|
if response.status_code == 200:
|
|
21
|
-
if
|
|
8
|
+
if "User not found." in response.text:
|
|
22
9
|
return 1
|
|
23
10
|
else:
|
|
24
11
|
return 0
|
|
25
12
|
else:
|
|
26
13
|
return 2
|
|
27
14
|
|
|
28
|
-
|
|
29
|
-
return 2
|
|
30
|
-
except Exception:
|
|
31
|
-
return 2
|
|
15
|
+
return generic_validate(url, process, follow_redirects = True)
|
|
32
16
|
|
|
33
17
|
if __name__ == "__main__":
|
|
34
18
|
user = input ("Username?: ").strip()
|
user_scanner/social/reddit.py
CHANGED
|
@@ -1,34 +1,18 @@
|
|
|
1
|
-
import
|
|
2
|
-
from httpx import ConnectError, TimeoutException
|
|
1
|
+
from ..core.orchestrator import generic_validate
|
|
3
2
|
|
|
4
3
|
def validate_reddit(user):
|
|
5
4
|
url = f"https://www.reddit.com/user/{user}/"
|
|
6
5
|
|
|
7
|
-
|
|
8
|
-
'User-Agent': "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36",
|
|
9
|
-
'Accept': "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8",
|
|
10
|
-
'Accept-Encoding': "gzip, deflate, br",
|
|
11
|
-
'Accept-Language': "en-US,en;q=0.9",
|
|
12
|
-
'sec-fetch-dest': "document",
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
NOT_FOUND_STRING = "Sorry, nobody on Reddit goes by that name."
|
|
16
|
-
|
|
17
|
-
try:
|
|
18
|
-
response = httpx.get(url, headers=headers, follow_redirects=True, timeout = 3.0)
|
|
19
|
-
|
|
6
|
+
def process(response):
|
|
20
7
|
if response.status_code == 200:
|
|
21
|
-
if
|
|
8
|
+
if "Sorry, nobody on Reddit goes by that name." in response.text:
|
|
22
9
|
return 1
|
|
23
10
|
else:
|
|
24
11
|
return 0
|
|
25
12
|
else:
|
|
26
13
|
return 2
|
|
27
14
|
|
|
28
|
-
|
|
29
|
-
return 2
|
|
30
|
-
except Exception:
|
|
31
|
-
return 2
|
|
15
|
+
return generic_validate(url, process, follow_redirects = True)
|
|
32
16
|
|
|
33
17
|
if __name__ == "__main__":
|
|
34
18
|
user = input ("Username?: ").strip()
|
user_scanner/social/snapchat.py
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import
|
|
2
|
-
from httpx import ConnectError, TimeoutException
|
|
1
|
+
from ..core.orchestrator import status_validate
|
|
3
2
|
|
|
4
3
|
def validate_snapchat(user):
|
|
5
|
-
|
|
4
|
+
url = f"https://www.snapchat.com/@{user}"
|
|
6
5
|
|
|
7
|
-
|
|
6
|
+
headers = {
|
|
8
7
|
'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
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",
|
|
10
9
|
'Accept-Encoding': "gzip, deflate, br, zstd",
|
|
@@ -18,23 +17,9 @@ def validate_snapchat(user):
|
|
|
18
17
|
'sec-fetch-dest': "document",
|
|
19
18
|
'accept-language': "en-US,en;q=0.9",
|
|
20
19
|
'priority': "u=0, i"
|
|
21
|
-
|
|
20
|
+
}
|
|
22
21
|
|
|
23
|
-
|
|
24
|
-
response = httpx.get(url, headers=headers, follow_redirects=True, timeout = 3.0)
|
|
25
|
-
status = response.status_code
|
|
26
|
-
|
|
27
|
-
if status == 200:
|
|
28
|
-
return 0
|
|
29
|
-
elif status == 404:
|
|
30
|
-
return 1
|
|
31
|
-
else:
|
|
32
|
-
return 2
|
|
33
|
-
|
|
34
|
-
except (ConnectError, TimeoutException):
|
|
35
|
-
return 2
|
|
36
|
-
except Exception:
|
|
37
|
-
return 2
|
|
22
|
+
return status_validate(url, 404, 200, headers = headers, follow_redirects = True)
|
|
38
23
|
|
|
39
24
|
if __name__ == "__main__":
|
|
40
25
|
user = input ("Username?: ").strip()
|
user_scanner/social/telegram.py
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import httpx
|
|
2
1
|
import re
|
|
2
|
+
from ..core.orchestrator import generic_validate
|
|
3
3
|
|
|
4
4
|
def validate_telegram(user: str) -> int:
|
|
5
5
|
"""
|
|
@@ -7,20 +7,13 @@ def validate_telegram(user: str) -> int:
|
|
|
7
7
|
Returns: 1 -> available, 0 -> taken, 2 -> error
|
|
8
8
|
"""
|
|
9
9
|
url = f"https://t.me/{user}"
|
|
10
|
-
headers = {
|
|
11
|
-
"User-Agent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36"
|
|
12
|
-
}
|
|
13
10
|
|
|
14
|
-
|
|
15
|
-
r = httpx.get(url, headers=headers, follow_redirects=True, timeout=3.0)
|
|
11
|
+
def process(r):
|
|
16
12
|
if r.status_code == 200:
|
|
17
13
|
return 0 if re.search(r'<div[^>]*class="tgme_page_extra"[^>]*>', r.text) else 1
|
|
18
14
|
return 2
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
except Exception:
|
|
22
|
-
return 2
|
|
23
|
-
|
|
15
|
+
|
|
16
|
+
return generic_validate(url, process, follow_redirects = True)
|
|
24
17
|
|
|
25
18
|
if __name__ == "__main__":
|
|
26
19
|
user = input ("Username?: ").strip()
|
user_scanner/social/threads.py
CHANGED
|
@@ -1,34 +1,19 @@
|
|
|
1
|
-
import
|
|
2
|
-
from httpx import ConnectError, TimeoutException
|
|
1
|
+
from ..core.orchestrator import status_validate
|
|
3
2
|
|
|
4
3
|
def validate_instagram(user):
|
|
5
|
-
|
|
4
|
+
url = f"https://www.threads.com/api/v1/users/web_profile_info/?username={user}"
|
|
6
5
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
response = httpx.get(url, headers=headers, timeout = 3.0)
|
|
19
|
-
status = response.status_code
|
|
20
|
-
|
|
21
|
-
if status == 200:
|
|
22
|
-
return 0
|
|
23
|
-
elif status == 404:
|
|
24
|
-
return 1
|
|
25
|
-
else:
|
|
26
|
-
return 2
|
|
27
|
-
|
|
28
|
-
except (ConnectError, TimeoutException):
|
|
29
|
-
return 2
|
|
30
|
-
except Exception:
|
|
31
|
-
return 2
|
|
6
|
+
headers = {
|
|
7
|
+
'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",
|
|
8
|
+
'X-IG-App-ID': "936619743392459",
|
|
9
|
+
'Accept': "application/json, text/javascript, */*; q=0.01",
|
|
10
|
+
'Accept-Encoding': "gzip, deflate, br",
|
|
11
|
+
'Accept-Language': "en-US,en;q=0.9",
|
|
12
|
+
'X-Requested-With': "XMLHttpRequest",
|
|
13
|
+
'Referer': f"https://www.instagram.com/{user}/",
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
return status_validate(url, 404, 200, headers = headers)
|
|
32
17
|
|
|
33
18
|
if __name__ == "__main__":
|
|
34
19
|
user = input ("Username?: ").strip()
|