-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.py
executable file
·195 lines (167 loc) · 4.57 KB
/
index.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
from flask import Flask, render_template, request, make_response, jsonify
import os
import wayback
from wayback import waybackMachine
import s3buckets
from s3buckets import bucketfinder
import clickjack
from clickjack import checkClick
import hsts
from hsts import checkHSTS
import subdomain
from subdomain import findDomain
import portscan
from portscan import portscanner
import emailspoof
from emailspoof import emailspoof_ZT
import testSSL
from testSSL import testssl
import googleDork
from googleDork import dorks
import gitDork
from gitDork import githubDorker
import cms
from cms import cms_scan
import cors
from cors import cors_scan
import nucleiCheck
from nucleiCheck import nuclei_check
import serverInfo
from serverInfo import checkServer
import dirListing
from dirListing import scanDirectory
import xss
from xss import scanXSS
import sql
from sql import checkSqli
app = Flask(__name__)
@app.route('/')
def home():
return render_template("index.html")
@app.route('/active', methods=["POST"])
def active():
response = {}
response['success'] = True
data = request.get_json()
domain = data['domain']
xssUrl = data['xssUrl']
sqlUrl = data['sqlUrl']
# dirb
if(data['dirb']):
res = scanDirectory(domain)
if(res == False):
response['success'] = False
return jsonify(response)
# portscanner
if(data['port']):
res = portscanner(domain)
if(res == False):
response['success'] = False
return jsonify(response)
# subdomain enumeration
if(data['subd']):
res = findDomain(domain)
if(res == False):
response['success'] = False
return jsonify(response)
# check SSL
if(data['ssl']):
res = testssl(domain)
if(res == False):
response['success'] = False
return jsonify(response)
# cms check
if(data['cms']):
res = cms_scan(domain)
if(res == False):
response['success'] = False
return jsonify(response)
if(data['cms']):
res = cms_scan(domain)
if(res == False):
response['success'] = False
return jsonify(response)
# cors check
if(data['cors']):
res = cors_scan(domain)
if(res == False):
response['success'] = False
return jsonify(response)
# server info disclosure
if(data['server']):
res = checkServer(domain)
if(res == False):
response['success'] = False
return jsonify(response)
# xss check
if(data['xss']):
res = scanXSS(xssUrl)
if(res == False):
response['success'] = False
return jsonify(response)
# sqli
if(data['sqli']):
res = checkSqli(sqlUrl)
if(res == False):
response['success'] = False
return jsonify(response)
# nuclei
if(data['nuclei']):
res = nuclei_check(domain)
if(res == False):
response['success'] = False
return jsonify(response)
return jsonify(response)
@app.route('/passive', methods=["POST"])
def passive():
response = {}
response['success'] = True
data = request.get_json()
domain = data['domain']
s3Company = data['s3Company']
# wayback
if(data['wayback']):
res = waybackMachine(domain)
if(res == False):
response['success'] = False
return jsonify(response)
# hsts check
if(data['hsts']):
print("hsts0")
res = checkHSTS(domain)
print("hsts")
if(res == False):
response['success'] = False
return jsonify(response)
# s3 buckets
if(data['s3']):
res = bucketfinder(s3Company)
if(res == False):
response['success'] = False
return jsonify(response)
# clickjack
if(data['clickjack']):
res = checkClick(domain)
if(res == False):
response['success'] = False
return jsonify(response)
# email spoof
if(data['espoof']):
res = emailspoof_ZT(domain)
if(res == False):
response['success'] = False
return jsonify(response)
# google dork
if(data['gdork']):
res = dorks(domain)
if(res == False):
response['success'] = False
return jsonify(response)
# git dork
if(data['gitdork']):
res = githubDorker(domain)
if(res == False):
response['success'] = False
return jsonify(response)
return jsonify(response)
app.run(debug=True)