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/Jacob Janzen\'s Website', 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 ChatGPT(): return 'Access Denied' @app.route('/ACCESS/The Wellerman Group AI/Dalle-2', methods=['GET']) def Dalle2(): return 'Access Denied' @app.route('/ACCESS/The Wellerman Group AI/3D Thing', methods=['GET']) def ThreeDimensionalThing(): return 'Access Denied' @app.route('/ACCESS/The Wellerman Group AI/Make Your Own', methods=['GET']) def MakeYourOwn(): 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)