File size: 3,164 Bytes
ccdb867 71d8030 d12b8d2 ccdb867 71d8030 60e1f9f ccdb867 ae7980e 18ccce6 ccdb867 5fd1844 ee09a16 5fd1844 ed967ad b6e63ce 06aa6df 7300bc2 ab5b179 7f1d006 e7832dd ecb94a6 21b89ef ecb94a6 5fd1844 ab5b179 ccdb867 e619beb ecb94a6 28ba278 ecb94a6 ccdb867 e448c9d 8c46058 1d26f79 e448c9d 2dcf838 e448c9d 2dcf838 c5ec071 e448c9d 2dcf838 c5ec071 e448c9d 2dcf838 1d26f79 ccdb867 |
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 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 |
import flask
import flask_cors
import os
def checkPassword(passwordInput, password):
if (str(passwordInput) == str(password)):
return True
else:
return False
# sets up the app
app = flask.Flask(__name__)
flask_cors.CORS(app)
# creates a API endpoint for the password input
@app.route('/api/passwordinput', methods=['POST'])
def password():
PASSWORD = os.environ.get('PASSWORD')
securePassword = "$"+PASSWORD
passwordIn = flask.request.get_json()['passwordInput']
access = checkPassword(passwordIn, securePassword)
data = {}
# Example data (could be fetched or processed dynamically)
if access:
data = {
'PASSWORD': securePassword,
'PASSWORDINPUT': passwordIn,
'ACCESS': access,
}
f = open('/FUNCTIONS/FUNCTIONS_BACKEND.txt', 'r', encoding='utf-8')
FUNCTIONS_BACKEND = eval('{'+f.read()+'}')
f.close()
f = open('/FUNCTIONS/FUNCTIONS_FRONTEND.txt', 'r', encoding='utf-8')
FUNCTIONS_FRONTEND = f.read()
f.close()
f = open('/LINKS/LINKS.txt', 'r', encoding='utf-8')
LINKS = eval('{'+f.read()+'}')
f.close()
f = open('/RIGHTCLICK/RIGHTCLICK.txt', 'r', encoding='utf-8')
RIGHTCLICK = f.read()
f.close()
data.update({'DATA': {}})
data['DATA'].update({'LINKS': LINKS})
data['DATA'].update({'CODE': {}})
data['DATA']['CODE'].update({'FUNCTIONS': {'BACKEND': FUNCTIONS_BACKEND, 'FRONTEND': FUNCTIONS_FRONTEND}})
data['DATA']['CODE'].update({'RIGHTCLICK': RIGHTCLICK})
else:
data = {
'PASSWORD': 'Access Denied',
'PASSWORDINPUT': passwordIn,
'ACCESS': access,
'DATA': {
'CODE': {
'FUNCTIONS': 'Access Denied',
'RIGHTCLICK': 'Access Denied'
},
'LINKS': 'Access Denied'
}
}
return flask.jsonify(data)
@app.route('/ACCESS/Listen to Wellerman', methods=['GET'])
def ListenToWellerman():
return 'Access Denied'
@app.route('/ACCESS/A Lot of Games', methods=['GET'])
def ALotOfGames():
return 'Access Denied'
@app.route('/ACCESS/Make a Review', methods=['GET'])
def MakeAReview():
return 'Access Denied'
@app.route('/ACCESS/The Wellerman Group AI', methods=['GET'])
def TheWellermanGroupAI():
return 'Access Denied'
@app.route('/ACCESS/The Wellerman Group AI/Chat GPT', methods=['GET'])
def TheWellermanGroupAI():
return 'Access Denied'
@app.route('/ACCESS/The Wellerman Group AI/Dalle-2', methods=['GET'])
def TheWellermanGroupAI():
return 'Access Denied'
@app.route('/ACCESS/The Wellerman Group AI/3D Thing', methods=['GET'])
def TheWellermanGroupAI():
return 'Access Denied'
@app.route('/ACCESS/The Wellerman Group AI/Make Your Own', methods=['GET'])
def TheWellermanGroupAI():
return 'Access Denied'
@app.route('/ACCESS/The Wellerman Group Chatbox', methods=['GET'])
def TheWellermanGroupChatbox():
return 'Access Denied'
if __name__ == "__main__":
app.run(debug=True,host="0.0.0.0",port=5000) |