-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathIsmailScript.py
156 lines (101 loc) · 3.54 KB
/
IsmailScript.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
#!/usr/bin/python
#!/usr/bin/env python
from bs4 import BeautifulSoup
from termcolor import colored
from urllib.request import urlopen
import os
import time
import socket
import datetime
time.sleep(1)
print(colored("-"*50, "blue"))
print(colored("Starting time... ", "magenta"))
time.sleep(3)
t = datetime.datetime.now()
print(t)
print(colored("-"*50, "blue"))
print("")
print("")
time.sleep(.5)
print(" _______ ")
time.sleep(.5)
print(" / .===. \ ")
time.sleep(.5)
print(" \/ 6 6 \/ ")
time.sleep(.5)
print(" ( \___/ ) ")
time.sleep(.6)
print(" _________________ooo__\_____/_____________________ ")
time.sleep(.5)
print(" / \ ")
time.sleep(.5)
print(colored(" | Hey, Welcome to use IsmailScript! | ", "blue"))
time.sleep(.6)
print(" \______________________________ooo_________________/ ")
time.sleep(.6)
print(" | | | ")
time.sleep(.6)
print(" |_ | _| ")
time.sleep(.5)
print(" | | | ")
time.sleep(.5)
print(" |__|__| ")
time.sleep(.5)
print(" /-'Y'-\ ")
time.sleep(.5)
print(" (__/ \__) ")
time.sleep(.5)
print(colored(" By \ ", "white"))
print(colored("Ismail Ahmed", "red"))
print(colored("V 0.1", "red"))
print(colored("-" * 50, "blue"))
# make a connection between server and host to grab more details
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
server = str(input(colored("Enter the target website :" , "yellow")))
port = 80
server_ip = socket.gethostbyname(server)
print(colored("Website IP address :" , "yellow"))
print(colored( server_ip , "green"))
print(colored("-"*50, "blue"))
socket.setdefaulttimeout(2)
request = "GET / HTTP/1.1\r\nHost: " + server_ip + "\r\n\r\n"
s.connect((server, port))
s.send(request.encode())
result = s.recv(2048)
print(colored("Banner Grabbing ... ","yellow"))
print(result)
s.close()
print(colored("-"*50, "blue"))
# start Reconnaissance !
# DNS server information
print(colored("Show DNS server info... " , "yellow"))
time.sleep(1)
print(os.system("%s %s %s" % ("dig " , server_ip , " ANY")))
print(colored("-"*50, "blue"))
# DNS Zone Transfer
print(colored("Dicover DNS Zone Transfer /","yellow"))
time.sleep(1)
print(os.system("%s %s" % ("nslookup ", server_ip)))
print(colored("-"*50, "blue"))
# Scrapping all URLs of any website
print(colored("Scrapping all URLs of the website... ","yellow"))
time.sleep(1)
print(colored("example...","white"))
print(colored("https://linkedin.com/","white"))
html = urlopen(input("Input the URL of the Website: "))
beautiful = BeautifulSoup(html.read());
for link in beautiful.find_all('a'):
print(link.get('href'))
print(colored("-"*50, "blue"))
# Whois information
print(colored("Whois information...","yellow"))
time.sleep(1)
print(os.system("%s %s " % ("whois " , server_ip )))
print(colored("-"*50, "blue"))
# Scan network ports and service
print(colored(" Scan Website Network Ports and Services... ","yellow"))
print(os.system("%s %s" % ("nmap -sV -sC -A -p 21-1450" , server_ip )))
print(colored("-"*50, "blue"))
# Thanks for reading the code ^_^
# Don't be hesitate if you have any questions !
# esmail19980@gmail.com