arp-spoofing/RSA/server/__init__.py

20 lines
452 B
Python

import ssl
from flask import *
import flask_wtf as wtf
print(ssl.OPENSSL_VERSION)
context = ssl.SSLContext(ssl.PROTOCOL_TLS_SERVER)
context.load_cert_chain(certfile='ssl/CA.crt', keyfile='ssl/CA.key')
app= Flask(__name__)
@app.route("/")
def index():
return render_template("index.html")
@app.route('/data', methods=['POST'])
def receiv():
encrypted_data = request.form['data']
if __name__ == "__main__":
app.run(ssl_context=context)