Linux 45-56-67-123 5.14.0-503.16.1.el9_5.x86_64 #1 SMP PREEMPT_DYNAMIC Fri Dec 13 01:47:05 EST 2024 x86_64
Apache/2.4.62 (AlmaLinux) OpenSSL/3.2.2
: 45.56.67.123 | : 52.15.253.72
Cant Read [ /etc/named.conf ]
8.3.15
apache
www.github.com/MadExploits
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
UNLOCK SHELL
HASH IDENTIFIER
CPANEL RESET
CREATE WP USER
README
+ Create Folder
+ Create File
/
var /
www /
afra /
py-maracar.afaa.website /
[ HOME SHELL ]
Name
Size
Permission
Action
__pycache__
[ DIR ]
drwxr-xr-x
email-template
[ DIR ]
drwxr-xr-x
logs
[ DIR ]
drwxr-xr-x
venv
[ DIR ]
drwxr-xr-x
.env
380
B
-rwxr-xr-x
.htaccess
459
B
-rwxr-xr-x
Booking.py
10.46
KB
-rwxr-xr-x
Booking_env_3.py
12.6
KB
-rwxr-xr-x
api_env_2_routes.py
2.92
KB
-rwxr-xr-x
api_env_3_routes.py
9.31
KB
-rwxr-xr-x
booking_delete.py
2.6
KB
-rwxr-xr-x
booking_delete_env_3.py
2.65
KB
-rwxr-xr-x
bookingdetail.py
16.94
KB
-rwxr-xr-x
bookingdetail_env_3.py
23.36
KB
-rwxr-xr-x
branch_env_3.py
6.16
KB
-rwxr-xr-x
change_password.py
2.09
KB
-rwxr-xr-x
check.py
4.36
KB
-rwxr-xr-x
check_env_2.py
3.82
KB
-rwxr-xr-x
check_env_3.py
3.82
KB
-rwxr-xr-x
check_tel.py
4.37
KB
-rwxr-xr-x
checkout.py
2.01
KB
-rwxr-xr-x
config.py
547
B
-rwxr-xr-x
connec_data.py
2.18
KB
-rwxr-xr-x
createkeysecret.py
304
B
-rwxr-xr-x
database.py
1.49
KB
-rwxr-xr-x
decorator.py
3.57
KB
-rwxr-xr-x
forgot.py
2.34
KB
-rwxr-xr-x
gen_uuid.py
4.17
KB
-rwxr-xr-x
image_conn_data.py
1.79
KB
-rwxr-xr-x
image_conn_data3.py
2.02
KB
-rwxr-xr-x
image_urls.py
7.49
KB
-rwxr-xr-x
image_urls_env_3.py
7.71
KB
-rwxr-xr-x
index.html
7.81
KB
-rwxr-xr-x
jangwat_thai.py
8.06
KB
-rwxr-xr-x
maracar.py
14.46
KB
-rwxr-xr-x
maracar.wsgi
379
B
-rwxr-xr-x
maracar_test.py
114
B
-rwxr-xr-x
matching_user_env_2.py
13.19
KB
-rwxr-xr-x
order_send_email_env_3.py
6.6
KB
-rwxr-xr-x
order_send_email_smtpgo.py
7.85
KB
-rw-r--r--
payments.py
9.07
KB
-rwxr-xr-x
payments_env_3.py
12.6
KB
-rwxr-xr-x
payments_payzen.py
14.1
KB
-rwxr-xr-x
payments_test_env_3.py
4.62
KB
-rwxr-xr-x
plot_cpu_usage.py
1.42
KB
-rwxr-xr-x
position_set.py
1.51
KB
-rwxr-xr-x
positions_list.py
987
B
-rwxr-xr-x
price_create.py
13.63
KB
-rwxr-xr-x
price_create3.py
21.56
KB
-rwxr-xr-x
promotion_items.py
4.9
KB
-rwxr-xr-x
promotions.py
8.44
KB
-rwxr-xr-x
queues.py
8.58
KB
-rwxr-xr-x
queues_env_3.py
11.28
KB
-rwxr-xr-x
register.py
5.11
KB
-rwxr-xr-x
register_edit.py
3
KB
-rwxr-xr-x
register_edit_env_2.py
3.14
KB
-rwxr-xr-x
register_edit_env_3.py
3.71
KB
-rwxr-xr-x
register_env_2.py
5.19
KB
-rwxr-xr-x
register_env_3.py
4.44
KB
-rwxr-xr-x
report_bookingoverview.py
9.86
KB
-rwxr-xr-x
report_bookingoverview_env_3.p...
12.93
KB
-rwxr-xr-x
requirements.txt
457
B
-rwxr-xr-x
reviews.py
9.42
KB
-rwxr-xr-x
reviews_env_3.py
12.91
KB
-rwxr-xr-x
service.py
5.87
KB
-rwxr-xr-x
service3.py
7.87
KB
-rwxr-xr-x
sms_octopush.py
1.71
KB
-rwxr-xr-x
sms_thsms3.py
2.09
KB
-rwxr-xr-x
specificinsert_env_2.py
3.63
KB
-rwxr-xr-x
status_list.py
960
B
-rwxr-xr-x
types_create.py
4.6
KB
-rwxr-xr-x
types_create3.py
8.91
KB
-rwxr-xr-x
update_status.py
2.52
KB
-rwxr-xr-x
user.py
4.02
KB
-rwxr-xr-x
user3.py
4.78
KB
-rwxr-xr-x
user_all.py
3.88
KB
-rwxr-xr-x
user_all_env_2.py
5.81
KB
-rwxr-xr-x
user_all_env_3.py
8.44
KB
-rwxr-xr-x
user_all_mlm.py
9.18
KB
-rwxr-xr-x
user_all_mlm_env_2.py
9.26
KB
-rwxr-xr-x
user_env_2.py
4.1
KB
-rwxr-xr-x
user_mlm.py
10.47
KB
-rwxr-xr-x
user_mlm_env_2.py
10.49
KB
-rwxr-xr-x
user_mlm_env_3.py
18.45
KB
-rw-r--r--
user_routes.py
1.28
KB
-rwxr-xr-x
website1.env
12
B
-rwxr-xr-x
website2.env
12
B
-rwxr-xr-x
website3.env
12
B
-rwxr-xr-x
website4.env
12
B
-rwxr-xr-x
website5.env
12
B
-rwxr-xr-x
Delete
Unzip
Zip
${this.title}
Close
Code Editor : service.py
# /var/www/website2024/py-maracar.afaa.website/service.py #python3 service.py import logging from flask import Flask, request, jsonify from flask_cors import CORS from database import modify_db, query_db from config import SECRET_KEY from decorator import token_required app = Flask(__name__) CORS(app, resources={r"/*": {"origins": "*"}}) app.config['SECRET_KEY'] = SECRET_KEY @app.route('/services/api/create', methods=['POST']) @token_required def create_service(): data = request.json if isinstance(data, list): for item in data: insert_service(item) else: insert_service(data) return jsonify({'message': 'Services created successfully'}), 201 def insert_service(data): query = '''INSERT INTO services (ServiceName, Description, ImageURL, CategoryID, Info, status, user_ID, uuid) VALUES (%s, %s, %s, %s, %s, %s, %s, %s)''' # เพิ่ม %s สำหรับ uuid ในคิวรี values = ( data['ServiceName'], data['Description'], data.get('ImageURL', ''), data['CategoryID'], data.get('Info', ''), data['status'], data['user_ID'], data['uuid'] # เพิ่ม uuid ในค่าที่จะแทรก ) try: modify_db(query, values) except Exception as e: app.logger.error(f"Failed to create service: {e}") @app.route('/services/api/edit', methods=['PUT']) @token_required def edit_service(): data = request.json if isinstance(data, list): for item in data: update_service(item) else: update_service(data) return jsonify({'message': 'Services updated successfully'}), 200 def update_service(data): query = '''UPDATE services SET ServiceName=%s, Description=%s, ImageURL=%s, CategoryID=%s, Info=%s, status=%s, uuid=%s WHERE ServiceID=%s AND user_ID=%s''' values = ( data['ServiceName'], data['Description'], data.get('ImageURL', ''), data['CategoryID'], data.get('Info', ''), data['status'], data['uuid'], # Include uuid in the values tuple data['ServiceID'], data['user_ID'] ) try: # Print or log the query and values for debugging #print("Executing SQL Query:", query) #print("With Values:", values) modify_db(query, values) except Exception as e: app.logger.error(f"Failed to update service: {e}") @app.route('/services/api/delete', methods=['DELETE']) @token_required def delete_service(): data = request.json if isinstance(data, list): for service_id in data: remove_service(service_id) else: remove_service(data) return jsonify({'message': 'Services deleted successfully'}), 200 def remove_service(service_id): query = 'DELETE FROM services WHERE ServiceID=%s' values = (service_id,) try: modify_db(query, values) except Exception as e: app.logger.error(f"Failed to delete service: {e}") @app.route('/services/api/view', methods=['GET']) def view_services(): try: # รับพารามิเตอร์จากการร้องขอ service_id = request.args.get('ServiceID') category_id = request.args.get('CategoryID') user_id = request.args.get('user_ID') status = request.args.get('status') uuid_value = request.args.get('uuid') # เพิ่มการรับค่า uuid # สร้าง SQL query พื้นฐาน query = '''SELECT s.ServiceID, s.ServiceName, s.Description, s.ImageURL, s.CategoryID, s.Info, s.status, s.user_ID, s.uuid, st.ServiceTypes_Name, sts.name AS StatusName FROM services s INNER JOIN service_types st ON s.CategoryID = st.ServiceTypes_ID INNER JOIN status sts ON s.status = sts.id''' conditions = [] values = [] # เพิ่มเงื่อนไขตามพารามิเตอร์ที่ได้รับ if service_id: conditions.append("s.ServiceID = %s") values.append(service_id) if category_id: conditions.append("st.ServiceTypes_ID = %s") values.append(category_id) if user_id: conditions.append("s.user_ID = %s") values.append(user_id) if status: conditions.append("s.status = %s") values.append(status) if uuid_value: # เพิ่มเงื่อนไขสำหรับค่า uuid conditions.append("s.uuid = %s") values.append(uuid_value) # รวมเงื่อนไขเพิ่มเติมใน SQL query if conditions: query += " WHERE " + " AND ".join(conditions) + " AND s.websiteID = 1" else: query += " WHERE s.websiteID = 1" # ถ้าไม่มีเงื่อนไข ให้ใช้เฉพาะ websiteID = 1 # ดึงข้อมูลจากฐานข้อมูล services = query_db(query, tuple(values)) return jsonify(services), 200 except Exception as e: logging.error(f"Error viewing services: {e}") return jsonify({'error': 'Internal server error'}), 500 if __name__ == '__main__': app.run(debug=True, host='0.0.0.0', port=427) from logging.handlers import RotatingFileHandler import os # ตั้งค่า logging log_dir = '/var/log/python' if not os.path.exists(log_dir): os.makedirs(log_dir) file_handler = RotatingFileHandler(os.path.join(log_dir, 'flask_app.log'), maxBytes=100000, backupCount=10) file_handler.setFormatter(logging.Formatter('%(asctime)s %(levelname)s: %(message)s [in %(pathname)s:%(lineno)d]')) file_handler.setLevel(logging.INFO) app.logger.addHandler(file_handler) app.logger.setLevel(logging.INFO)
Close