-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathmodules.py
65 lines (53 loc) · 3.55 KB
/
modules.py
1
2
3
4
5
6
7
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
from requests_html import HTMLSession
from typing import NoReturn
banner = """
███████╗███████╗ █████╗ ██████╗ ██████╗██╗ ██╗███╗ ███╗██╗ ██╗███╗ ██╗ █████╗ ███╗ ███╗███████╗
██╔════╝██╔════╝██╔══██╗██╔══██╗██╔════╝██║ ██║████╗ ████║╚██╗ ██╔╝████╗ ██║██╔══██╗████╗ ████║██╔════╝
███████╗█████╗ ███████║██████╔╝██║ ███████║██╔████╔██║ ╚████╔╝ ██╔██╗ ██║███████║██╔████╔██║█████╗
╚════██║██╔══╝ ██╔══██║██╔══██╗██║ ██╔══██║██║╚██╔╝██║ ╚██╔╝ ██║╚██╗██║██╔══██║██║╚██╔╝██║██╔══╝
███████║███████╗██║ ██║██║ ██║╚██████╗██║ ██║██║ ╚═╝ ██║ ██║ ██║ ╚████║██║ ██║██║ ╚═╝ ██║███████╗
╚══════╝╚══════╝╚═╝ ╚═╝╚═╝ ╚═╝ ╚═════╝╚═╝ ╚═╝╚═╝ ╚═╝ ╚═╝ ╚═╝ ╚═══╝╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝"""
def popular_services(username: str) -> str:
service = {
"telegram": "https://t.me/",
"youtube": "https://youtube.com/@",
"steam": "https://steamcommunity.com/id/",
}
session = HTMLSession()
def telegram(username: str) -> NoReturn:
response = session.get(service["telegram"] + username)
result = response.html.find(".tgme_page_extra", first=True)
if result:
title: str = response.html.find("title", first=True)
print(
f"[+] Found: {response.url} [{title.text}]"
if title and len(title.text) < 120
else f"[+] Found: {response.url}"
)
def youtube(username: str) -> NoReturn:
response = session.get(service["youtube"] + username)
if response.status_code == 200:
title: str = response.html.find("title", first=True)
print(
f"[+] Found: {response.url} [{title.text}]"
if title and len(title.text) < 120
else f"[+] Found: {response.url}"
)
def steam(username: str) -> NoReturn:
response = session.get(service["steam"] + username)
result = response.html.find(".profile_header_badgeinfo", first=True)
if result:
title: str = response.html.find("title", first=True)
print(
f"[+] Found: {response.url} [{title.text}]"
if title and len(title.text) < 120
else f"[+] Found: {response.url}"
)
return telegram(username), youtube(username), steam(username)
def singleton(class_: object):
instances = {}
def get_instance(*args, **kwargs):
if class_ not in instances:
instances[class_] = class_(*args, **kwargs)
return instances[class_]
return get_instance