forked from Yousuf9963/find-website-ip
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathget-website-ip.py
425 lines (287 loc) · 10.6 KB
/
get-website-ip.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
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
# Code is here.
# Prophet Muhammad Peace and Blessing Be Upon Him.
# Alhamdulillah.
# Version 1.9.
# This code is foe Educational and Purpose Only...
import os
import socket
import time
#import time as t
import sys
import pyfiglet
import colorama
from tqdm import tqdm
from colorama import Fore, init, Back
try:
import requests
except ModuleNotFoundError:
os.system("pip install requests")
os.system("pip install colorama")
os.system("pip install pyfiglet")
os.system("pip install socket")
os.system("pip install time")
os.system("pip install tqdm")
# Clear the console screen
os.system("cls" if os.name == "nt" else "clear")
init(autoreset=True)
rd = colorama.Fore.RED
bl = colorama.Fore.BLUE
yl = colorama.Fore.YELLOW
#pl = colorama.Fore.PURPLE
mag = colorama.Fore.MAGENTA
gn = colorama.Fore.GREEN
cy = colorama.Fore.CYAN
# Regular text colors
black = "\033[0;30m" # Black
red = "\033[0;31m" # Red
green = "\033[0;32m" # Green
yellow = "\033[0;33m" # Yellow
blue = "\033[0;34m" # Blue
purple = "\033[0;35m" # Purple
cyan = "\033[0;36m" # Cyan
white = "\033[0;37m" # White
# Bold text colors
b_black = "\033[1;30m" # Bold Black
b_red = "\033[1;31m" # Bold Red
b_green = "\033[1;32m" # Bold Green
b_yellow = "\033[1;33m" # Bold Yellow
b_blue = "\033[1;34m" # Bold Blue
b_purple = "\033[1;35m" # Bold Purple
b_cyan = "\033[1;36m" # Bold Cyan
b_white = "\033[1;37m" # Bold White
# Underline text colors
u_black = "\033[4;30m" # Underline Black
u_red = "\033[4;31m" # Underline Red
u_green = "\033[4;32m" # Underline Green
u_yellow = "\033[4;33m" # Underline Yellow
u_blue = "\033[4;34m" # Underline Blue
u_purple = "\033[4;35m" # Underline Purple
u_cyan = "\033[4;36m" # Underline Cyan
u_white = "\033[4;37m" # Underline White
# Background colors
bg_black = "\033[40m" # Background Black
bg_red = "\033[41m" # Background Red
bg_green = "\033[42m" # Background Green
bg_yellow = "\033[43m" # Background Yellow
bg_blue = "\033[44m" # Background Blue
bg_purple = "\033[45m" # Background Purple
bg_cyan = "\033[46m" # Background Cyan
bg_white = "\033[47m" # Background White
# Reset text color
reset = "\033[0m" # Reset
# ------ colors
r = "\033[1;31m"
g = "\033[1;32m"
y = "\033[1;33m"
b = "\033[1;34m"
d = "\033[2;37m"
R = "\033[1;41m"
Y = "\033[1;43m"
B = "\033[1;44m"
w = "\033[1;37m"
g = "\033[0;90m"
gg = "\033[1;32m"
y = r
# Simulating loading with a progress bar
for _ in tqdm(range(86609), desc=Fore.GREEN+'Accessing to the code server', unit='bytes', ascii=True):
time.sleep(0.00001) # Simulating processing time
# time.sleep(2)
print("\n")
print(Fore.CYAN +"Done, complete!")
time.sleep(1)
os.system('cls' if os.name == 'nt' else 'clear')
time.sleep(1)
# Delay for displaying messages
delay = 1
# Legal disclaimer
print(Fore.BLUE + "[!] Legal Disclaimer : Usage of this Program for attacking targets without prior mutual consent is illegal. It is the end user's responsibility to obey all applicable local, state and federal laws. Developers assume no liability and are not responsible for any misuse or damage caused by this program.")
print("")
print(Fore.BLUE + "[+] I hope for you good future and i am willing that you will come high effort.")
time.sleep(delay)
print("")
# Print ASCII art
fg = pyfiglet.Figlet(font="standard").renderText("Find-website-ip")
print(Fore.CYAN + fg)
print("")
def banner():
print(Fore.LIGHTBLUE_EX + """
___________________________________________________________________________
<Program> Find Website IP </Program>
<Developer> Saif Ullah </Developer>
<GitHub> https://github.com/SCSEA </GitHub>
<Tiktok> tiktok.com/@programmer_boy_2 </Tiktok>
<Telegram> https://t.me/programmerboy1 </Telegram>
___________________________________________________________________________
""")
banner()
def BannerOptions():
clear()
banner()
def backslash():
print('\n')
def clear():
_ = os.system('cls' if os.name == 'nt' else 'clear')
def LoadingScreen(ask):
print(blue + "└─ " + Fore.WHITE + f'{ask} ' + Fore.CYAN, end=" ", flush=True)
for x in range(3):
for frame in r'-\|/-\|/':
print('\b', frame, sep="", end="", flush=True)
time.sleep(0.2)
print('\b')
def LoadingScreen_(ask):
print(blue + "└─ " + Fore.WHITE + f'{ask} ' + Fore.CYAN, end=" ", flush=True)
for x in range(1):
for frame in r'-\|/-\|/':
print('\b', frame, sep="", end="", flush=True)
time.sleep(0.2)
print('\b')
def update():
print(Fore.BLUE + "Updating script from GitHub...")
os.system('git pull')
print(Fore.GREEN + "Update successful. Please restart the script.")
sys.exit(0)
#def about_mee():
# BannerOptions()
# LoadingScreen('Loading Data')
#
# about_mee = Fore.GREEN + """Assalamu Alaikum, I’m @Yousuf Shafii Muhammad, a self-taught Programmer and Ethical Hacker and Developer Profissional in 100 Programming languages."""
#for i in about_mee :
# sys.stdout.write(i)
# sys.stdout.flush()
# time.sleep(0.03)
#time.sleep(0.7)
#backslash()
#BannerOptions()
#def find_ip_address(url):
# # Input target website
# domain = input("Enter Target Website or url or domain (e.g., example.com, https://example.com, http://example.com or www.example.com to find IP Addreswcof that Website ): ")
#for domain in domains:
# if url.startswith("http://") or domain.startswith("https://") or domain.startswith("www."):
# domain = domain.replace("http://", "").replace("https://", "").replace("www.", "")
#else:
# continue
# print("")
# time.sleep(2)
# print(Fore.GREEN + "Getting IP Address attacking........")
# time.sleep(2)
# print(Fore.GREEN + "Getting IP Address 0%")
# time.sleep(2)
# for i in range(10, 110, 10):
# print(Fore.GREEN + f"Getting IP Address {i}%")
# time.sleep(2)
# print(Fore.GREEN + "IP Address Founded Successsfully")
# time.sleep(2)
# try:
# print(Fore.GREEN + "IP Address is:", Fore.GREEN+socket.gethostbyname(url))
# except socket.gaierror:
# print(Fore.RED + f"Failed to resolve the host : {url}")
# print(Fore.RED + "Failed to resolve the host")
# time.sleep(3)
# print("")
#import socket
#import time
#from colorama import Fore
#def find_website_ip_address():
# Input target website
# domain = input("Enter Target Website or URL or Domain (e.g., example.com, https://example.com, http://example.com or www.example.com to find IP Address of that Website): ")
# if "." not in domain:
# print("You entered an invalid domain.\n Please enter a valid domain (e.g., www.example.com, http://example.com, https://example.com, example.com).\nPlease re-un the script python3 get-website-ip.py\n")
# pass
# return
# find_website_ip_address()
#
# if domain.startswith(("http://", "https://", "www.")):
# domain = domain.replace("http://", "").replace("https://", "").replace("www.", "")
#
# print("")
# time.sleep(2)
# print(Fore.GREEN + "Getting IP Address attacking........")
# time.sleep(2)
# print(Fore.GREEN + "Getting IP Address 0%")
# time.sleep(2)
# for i in range(10, 110, 10):
# print(Fore.GREEN + f"Getting IP Address {i}%")
# time.sleep(2)
# print(Fore.GREEN + "IP Address Founded Successfully")
# time.sleep(2)
# try:
# print(Fore.GREEN + "IP Address is:", Fore.GREEN + socket.gethostbyname(domain))
# except socket.gaierror:
# print(Fore.RED + f"Failed to resolve the host : {domain}")
# print("")
# Example usage:
#find_ip_address()
#cont = input(Fore.YELLOW + "Do you wanna continue?[n/y]: ")
#if cont == "Y" or cont == "y":
# banner()
#banner()
#def about_me():
import time
import socket
from colorama import Fore
def timestamp():
# return time.strftime("%b %d %H:%M:%S.%f")
return time.strftime("%b %d %H:%M:%S")
def find_website_ip_address():
# Input target website
domain = input(Fore.CYAN+ "Enter Target Website or URL or Domain (e.g., example.com, https://example.com, http://example.com or www.example.com to find IP Address of that Website): ")
if "." not in domain:
print(Fore.RED+ "You entered an invalid domain.\n Please enter a valid domain (e.g., www.example.com, http://example.com, https://example.com, example.com).\nPlease re-run the script python3 get-website-ip.py\n")
pass
return
find_website_ip_address()
if domain.startswith(("http://", "https://", "www.")):
domain = domain.replace("http://", "").replace("https://", "").replace("www.", "")
print("")
time.sleep(2)
print(Fore.GREEN + timestamp() + " Getting IP Address attacking........")
time.sleep(2)
print(Fore.GREEN + timestamp() + " Getting IP Address 0%")
time.sleep(2)
for i in range(10, 110, 10):
print(Fore.GREEN + timestamp() + f" Getting IP Address {i}%")
time.sleep(2)
print(Fore.GREEN + timestamp() + " IP Address Found Successfully")
time.sleep(2)
try:
print(Fore.GREEN + timestamp() + " IP Address is:", Fore.GREEN + socket.gethostbyname(domain))
except socket.gaierror:
print(Fore.RED + timestamp() + f" Failed to resolve the host : {domain}")
print("")
#find_website_ip_address()
def about_me():
BannerOptions()
LoadingScreen('Loading Data')
BannerOptions()
about_me_text = Fore.GREEN +"""Assalamu Alaikum, I’m @Saif Ullah, Programmer and Ethical Hacker and Developer and Software-engineer. i know more than 100 Programming languages."""
for i in about_me_text:
sys.stdout.write(i)
sys.stdout.flush()
time.sleep(0.03)
time.sleep(0.7)
#about_me = Fore.GREEN + """Assalamu Alaikum, I’m @Yousuf Shafii Muhammad, a self-taught Programmer and Ethical Hacker and Developer Profissional in 100 Programming languages."""
#for i in about_me :
# sys.stdout.write(i)
# sys.stdout.flush()
# time.sleep(0.03)
#time.sleep(0.7)
backslash()
while True:
choice = input(Fore.BLUE + "Choose an option:\n1. Find IP address of a website\n2. Update script\n3. About Me\n4. Exit\nEnter option number: ")
if choice == '1':
find_website_ip_address()
exit()
elif choice == '2':
update()
exit()
elif choice == '3':
about_me()
exit()
elif choice == '4':
sys.exit(0)
else:
print(Fore.RED + "Invalid option. Please try again.")
cont = input(Fore.YELLOW + "Do you want to continue ? [n/y] : ")
if cont == "Y" or cont == "y":
banner()
banner()