-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathdomain.py
138 lines (121 loc) · 3.37 KB
/
domain.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
import socket
from webosint.cmsdetect import CMSdetect
from webosint.nslookup import nsLookup
from webosint.portscan import DefaultPort,Customrange
from webosint.reverseip import ReverseIP
from webosint.subdomain import SubDomain
from webvuln.bruteforce import ssh,ftp
from webvuln.clickjacking import ClickJacking
from webvuln.cors import Cors
from webvuln.hostheader import HostHeader
from webosint.header import header
from webosint.crawler import crawler
from webosint.who.whoami import whoami
host = None
port = None
R = '\033[31m' # red
G = '\033[32m' # green
C = '\033[36m' # cyan
W = '\033[0m' # white
# Checking whether the target host is alive or dead
def CheckTarget():
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
result = s.connect_ex((host, port))
if result == 0:
return True
else:
return False
# Main Method
def domain():
global host
host = input("Enter the Target Host : ")
global port
port = int(input("Enter the Target port : "))
print ( W + '[+]' + G + 'Checking whether the Target is reachable ...' + '\n')
# calling CheckTarget method
if CheckTarget()==True:
print("Target Alive \n")
print("Host : " + host)
print("Port : %s" % port)
Menu()
else:
print("The Host is Unreachable \n")
exit()
NmapFunctions = {
1: DefaultPort,
2: Customrange,
}
def nmaprec(host,port):
Choice = 1
while True:
print("1. Scan Default Ports (22-443)")
print("2. Enter Custom Range")
print("3. Back to Main Menu")
print('')
Choice = int(input(">> "))
if (Choice >= 0) and (Choice < 3):
NmapFunctions[Choice](host, port)
elif Choice == 3:
Menu()
else:
print("Please choose an Appropriate option")
BruteFunctions = {
1: ssh,
2: ftp
}
def BruteForce(host, port):
Selection = 1
while True:
print('')
print("1. SSH")
print("2. FTP")
print("3. Main Menu")
print('')
Selection = int(input("root@osint:~/Domain/BruteForce# "))
print('')
if (Selection >= 0) and (Selection < 3):
BruteFunctions[Selection](host, port)
elif Selection == 3:
Menu()
else:
print("Please choose an Appropriate option")
MainFunctions = {
1: ReverseIP,
2: SubDomain,
3: nsLookup,
4: CMSdetect,
5: nmaprec,
6: BruteForce,
7: ClickJacking,
8: Cors,
9: HostHeader,
10:header,
11:crawler,
12:whoami
}
def Menu():
Selection = 1
while True:
print('')
print(C+"1."+W+" ReverseIP")
print(C+"2."+W+" SubDomain")
print(C+"3."+W+" nsLookup")
print(C+"4."+W+" CMSDetect")
print(C+"5."+W+" PortScan")
print(C+"6."+W+" Bruteforce")
print(C+"7."+W+" ClickJacking")
print(C+"8."+W+" CORS")
print(C+"9."+W+" Host Header Injection")
print(C+"10."+W+" Header")
print(C+"11."+W+" Crawler")
print(C+"12."+W+" Whoami")
print(C+"99."+W+" Exit")
print('')
Selection = int(input(C+"root@osint:"+W+"~/Domain# "))
if (Selection >= 0) and (Selection <=12):
MainFunctions[Selection](host, port)
elif Selection == 99:
exit()
else:
print(R+"Error: Please choose an Appropriate option")
print(W+'')