-
Notifications
You must be signed in to change notification settings - Fork 0
/
ezOSINT.py
150 lines (127 loc) · 10.8 KB
/
ezOSINT.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
# Disclaimer:
# This code/script/application/program is solely for educational and learning purposes.
# All information, datasets, images, code, and materials are presented in good faith and
# intended for instructive use. However, noarche make no representation or warranty,
# express or implied, regarding the accuracy, adequacy, validity, reliability, availability,
# or completeness of any data or associated materials.
# Under no circumstance shall noarche have any liability to you for any loss, damage, or
# misinterpretation arising due to the use of or reliance on the provided data. Your utilization
# of the code and your interpretations thereof are undertaken at your own discretion and risk.
#
# By executing script/code/application, the user acknowledges and agrees that they have read,
# understood, and accepted the terms and conditions (or any other relevant documentation or
#policy) as provided by noarche.
#
#Visit https://github.com/noarche for more information.
#
# _.··._.·°°°·.°·..·°¯°·._.··._.·°¯°·.·° .·°°°°·.·°·._.··._
# ███╗ ██╗ ██████╗ █████╗ ██████╗ ██████╗██╗ ██╗███████╗
# ████╗ ██║██╔═══██╗██╔══██╗██╔══██╗██╔════╝██║ ██║██╔════╝
# ██╔██╗ ██║██║ ██║███████║██████╔╝██║ ███████║█████╗
# ██║╚██╗██║██║ ██║██╔══██║██╔══██╗██║ ██╔══██║██╔══╝
# ██║ ╚████║╚██████╔╝██║ ██║██║ ██║╚██████╗██║ ██║███████╗
# ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝╚═╝ ╚═╝ ╚═════╝╚═╝ ╚═╝╚══════╝
# °°°·._.··._.·°°°·.°·..·°¯°··°¯°·.·°.·°°°°·.·°·._.··._.·°°°
import configparser
import requests
import os
from colorama import Fore, Style, init
from datetime import datetime
import time
main_logo = '''
[91m_[0m [93m_[0m
[92m_[0m[96m_[0m[94m_[0m [95m_[0m[91m_[0m[93m_[0m[92m_[0m[96m_[0m[94m_[0m[95m_[0m [91m_[0m[93m_[0m[92m_[0m[96m([0m[94m_[0m[95m)[0m[91m_[0m [93m_[0m[92m_[0m [96m|[0m [94m|[0m[95m_[0m
[91m/[0m [93m_[0m [92m\[0m[96m_[0m [94m/[0m [95m_[0m [91m\[0m[93m/[0m [92m_[0m[96m_[0m[94m|[0m [95m|[0m [91m'[0m[93m_[0m [92m\[0m[96m|[0m [94m_[0m[95m_[0m[91m|[0m
[93m|[0m [92m_[0m[96m_[0m[94m/[0m[95m/[0m [91m/[0m [93m([0m[92m_[0m[96m)[0m [94m\[0m[95m_[0m[91m_[0m [93m\[0m [92m|[0m [96m|[0m [94m|[0m [95m|[0m [91m|[0m[93m_[0m
[92m\[0m[96m_[0m[94m_[0m[95m_[0m[91m/[0m[93m_[0m[92m_[0m[96m_[0m[94m\[0m[95m_[0m[91m_[0m[93m_[0m[92m/[0m[96m|[0m[94m_[0m[95m_[0m[91m_[0m[93m/[0m[92m_[0m[96m|[0m[94m_[0m[95m|[0m [91m|[0m[93m_[0m[92m|[0m[96m\[0m[94m_[0m[95m_[0m[91m|[0m
\033[95m ****************************\033[0m
\033[96m github.com/noarche/ezOSINT \033[0m
\033[94m Username Recon \033[0m
\033[95m ****************************\033[0m
'''
print(main_logo)
exitnote = '''
[91m_[0m[93m_[0m[92m_[0m[96m_[0m[94m_[0m[95m_[0m[91m_[0m [93m_[0m[92m_[0m[96m_[0m[94m_[0m[95m_[0m[91m_[0m[93m_[0m [92m_[0m[96m_[0m[94m_[0m[95m_[0m[91m_[0m[93m_[0m[92m_[0m [96m_[0m[94m_[0m[95m_[0m[91m_[0m[93m_[0m[92m_[0m [96m_[0m[94m_[0m[95m_[0m[91m_[0m[93m_[0m[92m_[0m [96m_[0m[94m_[0m[95m_[0m[91m_[0m[93m_[0m[92m_[0m[96m_[0m
[94m([0m [95m_[0m[91m_[0m[93m_[0m[92m_[0m [96m\[0m[94m([0m [95m_[0m[91m_[0m[93m_[0m [92m)[0m[96m([0m [94m_[0m[95m_[0m[91m_[0m [93m)[0m[92m([0m [96m_[0m[94m_[0m [95m\[0m [91m([0m [93m_[0m[92m_[0m[96m_[0m [94m\[0m [95m|[0m[91m\[0m [93m/[0m[92m|[0m[96m([0m [94m_[0m[95m_[0m[91m_[0m[93m_[0m [92m\[0m
[96m|[0m [94m([0m [95m\[0m[91m/[0m[93m|[0m [92m([0m [96m)[0m [94m|[0m[95m|[0m [91m([0m [93m)[0m [92m|[0m[96m|[0m [94m([0m [95m\[0m [91m)[0m [93m|[0m [92m([0m [96m)[0m [94m)[0m[95m([0m [91m\[0m [93m/[0m [92m)[0m[96m|[0m [94m([0m [95m\[0m[91m/[0m
[93m|[0m [92m|[0m [96m|[0m [94m|[0m [95m|[0m [91m|[0m[93m|[0m [92m|[0m [96m|[0m [94m|[0m[95m|[0m [91m|[0m [93m)[0m [92m|[0m [96m|[0m [94m([0m[95m_[0m[91m_[0m[93m/[0m [92m/[0m [96m\[0m [94m([0m[95m_[0m[91m)[0m [93m/[0m [92m|[0m [96m([0m[94m_[0m[95m_[0m
[91m|[0m [93m|[0m [92m_[0m[96m_[0m[94m_[0m[95m_[0m [91m|[0m [93m|[0m [92m|[0m [96m|[0m[94m|[0m [95m|[0m [91m|[0m [93m|[0m[92m|[0m [96m|[0m [94m|[0m [95m|[0m [91m|[0m [93m_[0m[92m_[0m [96m([0m [94m\[0m [95m/[0m [91m|[0m [93m_[0m[92m_[0m[96m)[0m
[94m|[0m [95m|[0m [91m\[0m[93m_[0m [92m)[0m[96m|[0m [94m|[0m [95m|[0m [91m|[0m[93m|[0m [92m|[0m [96m|[0m [94m|[0m[95m|[0m [91m|[0m [93m)[0m [92m|[0m [96m|[0m [94m([0m [95m\[0m [91m\[0m [93m)[0m [92m([0m [96m|[0m [94m([0m
[95m|[0m [91m([0m[93m_[0m[92m_[0m[96m_[0m[94m)[0m [95m|[0m[91m|[0m [93m([0m[92m_[0m[96m_[0m[94m_[0m[95m)[0m [91m|[0m[93m|[0m [92m([0m[96m_[0m[94m_[0m[95m_[0m[91m)[0m [93m|[0m[92m|[0m [96m([0m[94m_[0m[95m_[0m[91m/[0m [93m)[0m [92m|[0m [96m)[0m[94m_[0m[95m_[0m[91m_[0m[93m)[0m [92m)[0m [96m|[0m [94m|[0m [95m|[0m [91m([0m[93m_[0m[92m_[0m[96m_[0m[94m_[0m[95m/[0m[91m\[0m
[93m([0m[92m_[0m[96m_[0m[94m_[0m[95m_[0m[91m_[0m[93m_[0m[92m_[0m[96m)[0m[94m([0m[95m_[0m[91m_[0m[93m_[0m[92m_[0m[96m_[0m[94m_[0m[95m_[0m[91m)[0m[93m([0m[92m_[0m[96m_[0m[94m_[0m[95m_[0m[91m_[0m[93m_[0m[92m_[0m[96m)[0m[94m([0m[95m_[0m[91m_[0m[93m_[0m[92m_[0m[96m_[0m[94m_[0m[95m/[0m [91m|[0m[93m/[0m [92m\[0m[96m_[0m[94m_[0m[95m_[0m[91m/[0m [93m\[0m[92m_[0m[96m/[0m [94m([0m[95m_[0m[91m_[0m[93m_[0m[92m_[0m[96m_[0m[94m_[0m[95m_[0m[91m/[0m
'''
init(autoreset=True)
def read_config():
config = configparser.ConfigParser(interpolation=None)
config.read('config.ini')
links_with_valid_strings = []
for section in config.sections():
url = config.get(section, 'url')
valid_strings = config.get(section, 'valid_string').split(';')
links_with_valid_strings.append((url, valid_strings))
return links_with_valid_strings
def fetch_content(url):
try:
response = requests.get(url, timeout=3)
if response.status_code in (404, 403, 405, 410, 406, 503):
return ""
response.raise_for_status()
return response.text
except requests.RequestException:
return ""
def check_validity(content, valid_strings):
for valid_string in valid_strings:
if valid_string in content:
return True
return False
def log_result(user, url, valid_strings):
with open("results.txt", "a") as file:
timestamp = datetime.now().strftime("%Y-%m-%d %H:%M:%S")
file.write(f"{timestamp} | {user} | {url}\n")
def process_url(url, valid_strings, user):
formatted_url = url.format(USER=user)
content = fetch_content(formatted_url)
if check_validity(content, valid_strings):
print(Fore.GREEN + f"\nValid content found at {formatted_url}")
log_result(user, formatted_url, valid_strings)
else:
print(Fore.CYAN + f"\rChecking {formatted_url}... ", end="")
def main():
links_with_valid_strings = read_config()
users = input(Fore.CYAN + "Input Target USERNAMES (separated by commas): ")
user_list = [user.strip() for user in users.split(',')]
for user in user_list:
for url, valid_strings in links_with_valid_strings:
process_url(url, valid_strings, user)
print(Fore.RESET + "\nAll tasks completed.")
rerun = input(Fore.RED + "\nWould you like to run again? (yes/no): ").strip().lower()
if rerun == 'yes':
main()
else:
print(exitnote)
if __name__ == "__main__":
main()
# Disclaimer:
# This code/script/application/program is solely for educational and learning purposes.
# All information, datasets, images, code, and materials are presented in good faith and
# intended for instructive use. However, noarche make no representation or warranty,
# express or implied, regarding the accuracy, adequacy, validity, reliability, availability,
# or completeness of any data or associated materials.
# Under no circumstance shall noarche have any liability to you for any loss, damage, or
# misinterpretation arising due to the use of or reliance on the provided data. Your utilization
# of the code and your interpretations thereof are undertaken at your own discretion and risk.
#
# By executing script/code/application, the user acknowledges and agrees that they have read,
# understood, and accepted the terms and conditions (or any other relevant documentation or
#policy) as provided by noarche.
#
#Visit https://github.com/noarche for more information.
#
# _.··._.·°°°·.°·..·°¯°·._.··._.·°¯°·.·° .·°°°°·.·°·._.··._
# ███╗ ██╗ ██████╗ █████╗ ██████╗ ██████╗██╗ ██╗███████╗
# ████╗ ██║██╔═══██╗██╔══██╗██╔══██╗██╔════╝██║ ██║██╔════╝
# ██╔██╗ ██║██║ ██║███████║██████╔╝██║ ███████║█████╗
# ██║╚██╗██║██║ ██║██╔══██║██╔══██╗██║ ██╔══██║██╔══╝
# ██║ ╚████║╚██████╔╝██║ ██║██║ ██║╚██████╗██║ ██║███████╗
# ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝╚═╝ ╚═╝ ╚═════╝╚═╝ ╚═╝╚══════╝
# °°°·._.··._.·°°°·.°·..·°¯°··°¯°·.·°.·°°°°·.·°·._.··._.·°°°