im writed simple flask server-client app. and put it on dedicated server, but flask starts gives empty responses after 1 min. But in logs all is ok and gives 200 code.
and there is it response: server response
here is server code:
@app.route('/login', methods=['POST'])
def login():
if request.remote_addr not in blocked_ips:
data = request.json
password = data['password']
hwid = data['hwid']
hashed_input_password = hash_builder(password)
try:
with db.connection.cursor() as cursor:
sql = "SELECT hwid FROM users WHERE license = %s"
cursor.execute(sql, (hashed_input_password,))
result = cursor.fetchone()
if result:
db_hwid = result['hwid']
if db_hwid is None:
return jsonify({'status': 'success', 'message': 'HWID not set', 'hwid': hwid})
elif db_hwid == hwid:
return jsonify({'status': 'success', 'message': 'Login successful'})
else:
return jsonify({'status': 'failure', 'message': 'Invalid hardware ID'})
else:
return jsonify({'status': 'failure', 'message': 'Invalid key'})
except Exception as e:
return jsonify({'status': 'error', 'message': str(e)})
But server is still running after that without errors. Client is made with requests and just checking server responses so i dont think its needed
idk what can i do, i just want that this server script runs forever without that shit 🙁