-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathapp.py
More file actions
26 lines (19 loc) · 727 Bytes
/
app.py
File metadata and controls
26 lines (19 loc) · 727 Bytes
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
from flask import Flask, render_template, send_from_directory
import os
app = Flask(__name__)
project_folder = os.path.dirname(os.path.abspath(__file__))
@app.route('/')
def serve_index():
return render_template('index.html')
@app.route('/captcha.html')
@app.route('/captcha')
def serve_captcha():
return render_template('captcha.html')
@app.route('/images/<path:filename>')
def serve_image(filename):
return send_from_directory(os.path.join(project_folder, 'images'), filename)
@app.route('/malware/<path:filename>')
def serve_malware(filename):
return send_from_directory(os.path.join(project_folder, 'malware'), filename)
if __name__ == '__main__':
app.run(host='0.0.0.0', port=5000, debug=True)