thewellermangroup's picture
Update app.py
6d73892
raw
history blame
3.11 kB
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/thewellermangroup/passwordinput/<passwordIn>', methods=['GET'])
def password(passwordIn):
PASSWORD = "1234"
securePassword = "$"+PASSWORD
access = checkPassword(passwordIn, securePassword)
data = {}
# Example data (could be fetched or processed dynamically)
if access:
data = {
'PASSWORD': securePassword,
'PASSWORDINPUT': passwordIn,
'ACCESS': access,
'RIGHTCLICK':
'''
var contextMenu = document.querySelector(".wrapperfortheclick");
window.addEventListener("contextmenu", e => {
e.preventDefault();
let x = e.offsetX, y = e.offsetY,
winWidth = document.body.scrollWidth,
winHeight = document.body.scrollHeight,
cmWidth = contextMenu.offsetWidth,
cmHeight = contextMenu.offsetHeight;
x = x > winWidth - cmWidth ? winWidth - cmWidth : x;
y = y > winHeight - cmHeight ? winHeight - cmHeight : y;
contextMenu.style.left = `${x}px`;
contextMenu.style.top = `${y}px`;
contextMenu.style.visibility = "visible";
});
document.addEventListener("click", () => contextMenu.style.visibility = "hidden");
''',
'LINKS': {
'Listen to Wellerman': 'https://cdn.jsdelivr.net/gh/The-Wellerman-Group/v3@latest/assets/wellerman.mp3',
'Jacob Janzen\'s Website': 'https://jacobinathanialpeterson-thiswillgiveyoualotofmalware.static.hf.space',
'Make a Review': 'https://embed-v2.testimonial.to/c/the-wellerman-group-reviews/?theme=light',
'The Wellerman Group AI': {
'Chat GPT': 'https://thewellermangroup-the-wellerman-group-ai.hf.space/',
'Dalle-2': 'https://cyranicus-dalle-3-xl.hf.space',
'3D Thing': 'https://dylanebert-dreamgaussian-mini.hf.space',
'Make Your Own': 'https://veera-ruki-gpt-baker.hf.space'
},
'The Wellerman Group Chatbox': 'https://www3.cbox.ws/box/?boxid=3533881&boxtag=wktuUS'
}
}
f = open('FUNCTIONS_BACKEND.txt', 'r', encoding='utf-8')
FCODE = f.read()
f.close()
exec("data.update({'FUNCTIONS': {"+FCODE+"}})")
else:
data = {
'PASSWORD': 'Access Denied',
'PASSWORDINPUT': passwordIn,
'ACCESS': access,
'RIGHTCLICK': 'Access Denied',
'FUNCTIONS': 'Access Denied',
'LINKS': 'Access Denied'
}
return flask.jsonify(data)
if __name__ == "__main__":
app.run(debug=True,host="0.0.0.0",port=5000)