-
Notifications
You must be signed in to change notification settings - Fork 0
/
app.py
34 lines (27 loc) · 929 Bytes
/
app.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
from flask import Flask, render_template, request
from lib.port_scanner import scanner
from lib.spyder import crawler
app = Flask(__name__)
@app.route('/')
def home():
return render_template('index.html')
@app.route('/portscanner')
def port():
return render_template('ports.html')
@app.route('/port-result',methods = ['POST'])
def port_result():
if request.method == 'POST':
form_data = request.form
opt=scanner(form_data['url'])
return render_template('ports.html',data=opt)
@app.route('/spyder')
def spyder():
return render_template('spyder.html')
@app.route('/spyder-result',methods = ['POST'])
def spyder_result():
if request.method == 'POST':
form_data = request.form
opt=crawler(form_data['url'])
return render_template('spyder.html',data=opt)
if __name__ == '__main__':
app.run()