-
Notifications
You must be signed in to change notification settings - Fork 7
/
app.py
34 lines (26 loc) · 958 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,request
from flask import render_template,url_for
from sender import hideFunc
from receiver import revealFunc
app = Flask(__name__)
@app.route("/")
def index():
return render_template("homepage.html")
@app.route("/hide",methods=['POST','GET'])
def hide():
if request.method == 'POST':
formInfo=request.form
result=hideFunc(formInfo['sec_msg'],formInfo['psw'],formInfo['cvr_msg'])
return render_template("homepage.html",result=result)
return render_template("homepage.html")
@app.route("/reveal",methods=['POST','GET'])
def reveal():
if request.method == 'POST':
formInfo=request.form
result_reveal=revealFunc(formInfo['steg_msg'],formInfo['psw_rev'])
return render_template("homepage.html",result_reveal=result_reveal)
return render_template("homepage.html")
if __name__=='__main__':
app.run(debug=True)
# set FLASK_ENV=development
# set FLASK_APP=app.py