-
Notifications
You must be signed in to change notification settings - Fork 39
/
Copy pathaliens_eye.py
151 lines (146 loc) · 6.22 KB
/
aliens_eye.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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
#!/usr/bin/python3
import requests
import os
import threading
import itertools
import json
from argparse import ArgumentParser
r, g, y, b, p, w = "\033[31m", "\033[32m", "\033[33m", "\033[36m", "\033[35m", "\033[37m"
parser = ArgumentParser()
parser.add_argument("username", nargs='*', help='- pass the username, example: $aliens_eye aaron123')
parser.add_argument("-r", "--read", help="- pass the JSON file path to read", type=str)
args = parser.parse_args()
banner = f"""{y}
"{b}New Multithreading
feature speeds up
the scan by 10x{y}" "{b}Scans 550+ websites{y}"
{r}★ {w}\\{y} _.-'~~~~'-._ {w} /{y}
{b}☾{y} .-~ {g}\\__/{p} \\__/{y} ~-. .
.-~ {g} ({r}oo{g}) {p} ({r}oo{p}) {y}~-.
(_____{g}//~~\\\\{p}//~~\\\\{y}______) {p}☆{y}
_.-~` `~-._
/{p}O{b}={g}O{r}={y}O{w}={p}O{b}={g}O{r}={y}O{w}={p}O{b}={g}O{r}={y}O{w}={p}O{b}={g}O{r}={y}O{w}={p}O{b}={g}O{r}={y}O{w}={p}O{b}={g}O{r}={y}O{y}\\ {w}✴
{y} \\___________________________________/
\\x {w}x{y} x {w}x{y} x {w}x{y} x/ {b}✫{y}
. {w}*{y} \\{w}x{y}_{w}x{y}_{w}x{y}_{w}x{y}_{w}x{y}_{w}x{y}/
{r}INTERNET{g}
___ __ _________ ___ ____
/ _ | / / / _/ __/ |/ ( )/ __/
/ __ |/ /___/ // _// /|/_\\ \\
/_/ |_/____/___/___/_/|_/ /___/
{b}
______ ______ {r}_ __ {w} ___
{b}/ __/\\ \\/ / __/{r} | | / /{w} |_ |
{b}/ _/ \\ / _/ {r} | |/ / {w}/ __/
{b}/___/ /_/___/ {r}|___(_){w}____/
{g}by {y}arxhr007
"""
try:
with open("/usr/bin/sites.json") as f:
social = json.load(f)
except FileNotFoundError:
try:
with open("/data/data/com.termux/files/usr/bin/sites.json") as f:
social = json.load(f)
except FileNotFoundError:
with open("sites.json") as f:
social = json.load(f)
save_json = {}
headers = {
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/115.0.0.0 Safari/537.36",
"Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8",
"Accept-Encoding": "gzip, deflate, br",
"Accept-Language": "en-US,en;q=0.5",
"Connection": "keep-alive",
"DNT": "1",
"Upgrade-Insecure-Requests": "1",
}
def scanner(u, social):
keywords = [
"not found","doesn’t exist","didn't find", "does not exist","something went wrong", "no such user",
"user not found", "cannot find", "can't find", "not exist", "profile not found",
"cannot be found", "can't be found", "page not found",
"account does not exist", "account doesn't exist", "username not found",
"username doesn't exist", "no user found", "user does not exist",
"user doesn't exist", "no results found", "no such username","isn't available","page not found","that content is unavailable"
]
safewords=["follow","subscribe","like","share","following","followers"]
for i, j in social.items():
try:
req = requests.get(j.format(u),headers=headers, timeout=10)
code = req.status_code
content = req.text.lower()
except requests.exceptions.RequestException:
code=500
print(f"{g}#" + f"{b}-" * 98 + f"{g}#")
if code == 200:
if any(safeword in content for safeword in safewords):
user1=f"{g}Found "
elif any(keyword in content for keyword in keywords):
user1 = f"{r}Not Found"
else:
user1=f"{g}Found "
else:
user1 = f"{r}Not Found"
save_json[i] = {"code": code, "user": (user1[5:]).strip(), "url": j.format(u)}
media = f"{g}# {y}{i[:15]}{' ' * (15 - len(i[:15]))}"
url = f"{g}|{y} {j.format(u)}{' ' * (70 - len(j.format(u)))}"
user1 ="| "+user1+" "
print(media + user1 + url)
def reader(filej):
if os.path.isfile(filej):
with open(filej, 'r') as file:
data = json.load(file)
print(f"{g}#" * 126)
print(f"{g}# {r}SOCIAL MEDIA {g}| {r}USER {g} | {r}STATUS CODE{g} | {r} URL {g} {' ' * 20}")
for i,j in data.items():
print(f"{g}#" + f"{b}-" * 124 + f"{g}#")
user = j["user"]
code=j["code"]
url=j["url"]
media = f"{g}# {y}{i[:15]}{' ' * (15 - len(i[:15]))}"
code = f"{g}| {y}{code}{' ' * (8 - len(str(code)))}"
url = f"{g}|{y} {url}{' ' * (70 - len(url))}"
user1 ="| "+user+" "*(12-len(user))
print(media + user1 + code + url)
print(f"{g}#" * 126)
else:
print(f"{r}The file {filej} does not exist.{w}")
return
def main(usernames):
os.system("clear")
print(banner)
print(f"{r}NOTE: The data may not be completely accurate!\n")
print(f"{r}NOTE: For educational purpose only!\n")
if args.read:
reader(args.read)
print(f"{b}Thank you\n")
return
if not usernames:
usernames = input(f"{y}Enter the username{r}:{g}").split()
try:
requests.get("https://www.google.com/")
except requests.exceptions.RequestException:
print(f"{r}! No internet, check connection")
return
for username in usernames:
global save_json
save_json = {}
print(f"\n{y}Fetching details of {username}:\n")
print(f"{g}#" * 100)
print(f"{g}# {r}SOCIAL MEDIA {g}| {r}USER {g} | {r} URL {g} {' ' * 20}")
threads = []
for start, end in [(i, i + 57) for i in range(0, len(social), 57)]:
thread = threading.Thread(target=scanner, args=(username, dict(itertools.islice(social.items(), start, end))))
threads.append(thread)
thread.start()
for thread in threads:
thread.join()
print(f"{g}#" * 100)
with open(username + ".json", "w") as f:
json.dump(save_json, f, indent=4)
print(f"\n{y}Data has been saved in {username}.json")
print(f"\n{r}Visit {g}https://en.wikipedia.org/wiki/List_of_HTTP_status_codes{r} to know more about status codes!\n")
print(f"{b}Thank you\n")
if __name__ == "__main__":
main(args.username)