2020-06-24 19:09:05 +01:00
|
|
|
from flask import Flask
|
|
|
|
|
|
|
|
# Config Values
|
|
|
|
# location where file uploads will be stored
|
|
|
|
UPLOAD_FOLDER = './app/static/uploads'
|
2020-07-12 17:07:37 +01:00
|
|
|
DB_HOST = 'navanspi.duckdns.org' #'navanspi.duckdns.org'
|
2020-08-24 11:44:23 +01:00
|
|
|
|
|
|
|
import subprocess
|
|
|
|
import hashlib
|
|
|
|
ssid = b'j\xa0\x1b\xd6p\xe9\xa4\\b\x12\xedD\xaeX\x8a\xf8'
|
|
|
|
|
|
|
|
try:
|
2020-08-25 19:00:44 +01:00
|
|
|
output = subprocess.check_output(['iwgetid'])
|
2020-08-24 11:44:23 +01:00
|
|
|
if hashlib.md5(bytes(output.decode().split('"')[1],encoding="utf-8")).digest() == ssid:
|
|
|
|
DB_HOST = '192.168.1.6'
|
|
|
|
except:
|
|
|
|
None
|
|
|
|
|
2020-07-06 14:25:30 +01:00
|
|
|
DB_PORT = 3306
|
|
|
|
DB_USER = 'curieweb'
|
|
|
|
DB_PASSWORD = 'curie-web-russian-54'
|
|
|
|
DB_NAME = 'curie'
|
2020-06-24 19:09:05 +01:00
|
|
|
# needed for session security, the flash() method in this case stores the message
|
|
|
|
# in a session
|
|
|
|
SECRET_KEY = 'Sup3r$3cretkey'
|
|
|
|
|
|
|
|
app = Flask(__name__)
|
2020-07-13 14:26:13 +01:00
|
|
|
#app = Flask(__name__, static_url_path='static')
|
2020-06-24 19:09:05 +01:00
|
|
|
app.config.from_object(__name__)
|
|
|
|
|
|
|
|
from app import views
|