Linux ubuntu 6.8.0-90-generic #91-Ubuntu SMP PREEMPT_DYNAMIC Tue Nov 18 14:14:30 UTC 2025 x86_64
nginx/1.24.0
: 67.217.245.49 | : 216.73.216.153
Cant Read [ /etc/named.conf ]
8.3.6
www-data
Bypass.pw
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
UNLOCK SHELL
HASH IDENTIFIER
Backdoor Scanner
Backdoor Create
Alfa Webshell
CPANEL RESET
CREATE WP USER
README
+ Create Folder
+ Create File
/
var /
www /
html /
jjk /
[ HOME SHELL ]
Name
Size
Permission
Action
BingSiteAuth.xml
85
B
-rw-rw-r--
Modulobg.webp
85.94
KB
-rw-rw-r--
ads.txt
58
B
-rw-rw-r--
animemerch8.php
68.74
KB
-rw-rw-r--
datasource.php
3.09
KB
-rwxrwxrwx
dbhelper.php
29.57
KB
-rwxrwxrwx
dl_ads.php
125
B
-rw-rw-r--
favicon.ico
67.58
KB
-rw-rw-r--
footer.php
6.74
KB
-rw-rw-r--
head.php
434
B
-rw-rw-r--
header.php
9.43
KB
-rw-rw-r--
index.php
24.15
KB
-rwxrwxrwx
log.txt
790
B
-rwxrwxrwx
manga_og.jpg
218.56
KB
-rw-rw-r--
ml_rekomen.jpg
172
KB
-rw-rw-r--
moduloheader.jpg
153.82
KB
-rw-rw-r--
privacy-policy.php
16.26
KB
-rw-rw-r--
read-manga.php
44.41
KB
-rw-rw-r--
reading_1.php
22.97
KB
-rwxrwxrwx
robots.txt
71
B
-rw-rw-r--
script.php
1.42
KB
-rw-rw-r--
sitemap.xml
7.73
KB
-rw-rw-r--
style_css.php
97.62
KB
-rw-rw-r--
terms-of-service.php
12.37
KB
-rw-rw-r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : dbhelper.php
<?php date_default_timezone_set("Asia/Kuching"); class DBHelper { private $db; function __construct() { require_once(__DIR__ . "/datasource.php"); $this->db = new DataSource(); } public function log($message) { $myfile = fopen("./log.txt", "a") or die("Unable to open file!"); $txt = $message . "\n"; fwrite($myfile, $txt); fclose($myfile); } function getUserById($user_id) { $result = $this->db->select("SELECT * FROM users WHERE id=:id", ['id' => $user_id]); return $result; } function getUsersCount() { $result = $this->db->select("SELECT * FROM users"); return sizeof($result); } function getClientIP() { $clientIP = $_SERVER['HTTP_CLIENT_IP'] ?? $_SERVER["HTTP_CF_CONNECTING_IP"] # when behind cloudflare ?? $_SERVER['HTTP_X_FORWARDED'] ?? $_SERVER['HTTP_X_FORWARDED_FOR'] ?? $_SERVER['HTTP_FORWARDED'] ?? $_SERVER['HTTP_FORWARDED_FOR'] ?? $_SERVER['REMOTE_ADDR'] ?? '0.0.0.0'; return $clientIP; } public function processLogin($username, $password) { $query = "select * FROM users WHERE username = :username AND active=1"; $params = ['username' => $username]; $user = $this->db->select($query, $params); if (!empty($user)) { if (!isset($_SESSION)) { session_start(); } if ($user && password_verify($password, $user[0]['password'])) { $_SESSION["userId"] = $user[0]["id"]; $_SESSION["username"] = $user[0]["username"]; $_SESSION["role"] = $user[0]["role"]; return true; } else { $_SESSION["errorMessage"] = 'Invalid User'; return false; } } else { $_SESSION["errorMessage"] = 'Not Active User'; return false; } } public function addUserActionLog($user_id, $action, $ref_table, $ref_id) { $query = "INSERT INTO user_action_logs (user_id, action, ip, ref_table, ref_id, created) VALUE (:user_id, :action, :ip, :ref_table, :ref_id, :created)"; $params = [ 'user_id' => $user_id, 'action' => $action, 'ip' => $this->getClientIP(), 'ref_table' => $ref_table, 'ref_id' => $ref_id, 'created' => date("Y-m-d H:i:s") ]; $this->db->execute($query, $params); } public function signUp($username, $password) { $passwordHash = password_hash($password, PASSWORD_DEFAULT); $query = "INSERT INTO users (username, password, role, created, modified) VALUE (:username, :password, :role, :created, :modified)"; $params = ['username' => $username, 'password' => $passwordHash, 'role' => 'Super Admin', 'created' => date("Y-m-d H:i:s"), 'modified' => date("Y-m-d H:i:s")]; $user = $this->db->execute($query, $params); if (!empty($user)) { return true; } else { return false; } } public function createManga($title, $author, $description, $genres, $attachment) { $path = ''; $ext = ''; if (!empty($attachment)) { $this->log('Have Attachment'); $path = ''; $ext = ''; $filename = $attachment["name"]; $ext = pathinfo($filename, PATHINFO_EXTENSION); $tempname = $attachment["tmp_name"]; $filename = 'main-' . uniqid() . uniqid() . '.' . $ext; $image_root = '/home/mysenter/public_html/mangapiece.mys-enterprise.com'; $folder_name = 'mangas'; $path = $image_root . '/' . $folder_name . '/' . $filename; $upload_dir = $image_root . '/' . $folder_name . '/'; if (file_exists($upload_dir) && is_writable($upload_dir)) { if (move_uploaded_file($tempname, $path)) { $msg = "Image uploaded successfully"; $query = "INSERT INTO mangas (title, author, description, display_image, genres, created, modified) VALUES (:title, :author, :description, :display_image, :genres, :created, :modified)"; $params = [ 'title' => $title, 'author' => $author, 'description' => $description, 'display_image' => 'https://mangapiece.com/' . $folder_name . '/' . $filename, 'genres' => $genres, 'created' => date("Y-m-d H:i:s"), 'modified' => date("Y-m-d H:i:s") ]; try { $result = $this->db->execute($query, $params); return $result; } catch (Exception $e) { $this->db->log($e); } } else { $msg = "Not uploaded because of error #" . $_FILES["file"]["error"]; $this->db->log($msg); return false; } } $msg = "Not writeable folder"; $this->db->log($msg); return false; } else { $this->log('No Attachement'); $query = "INSERT INTO mangas (title, author, description, display_image, genres, created, modified) VALUES (:title, :author, :description, :display_image, :genres, :created, :modified)"; $params = [ 'title' => $title, 'author' => $author, 'description' => $description, 'display_image' => null, 'genres' => $genres, 'created' => date("Y-m-d H:i:s"), 'modified' => date("Y-m-d H:i:s") ]; $this->log(json_encode($params)); try { $result = $this->db->execute($query, $params); return $result; } catch (Exception $e) { $this->db->log($e); } } } public function updateManga($manga_id, $title, $author, $description, $genres, $rating, $attachment) { $path = ''; $ext = ''; if (!empty($attachment['name'])) { $this->log('Have Attachment'); $path = ''; $ext = ''; $filename = $attachment["name"]; $ext = pathinfo($filename, PATHINFO_EXTENSION); $tempname = $attachment["tmp_name"]; $filename = 'main-' . uniqid() . uniqid() . '.' . $ext; $image_root = '/home/mysenter/public_html/mangapiece.mys-enterprise.com'; $folder_name = 'mangas'; $path = $image_root . '/' . $folder_name . '/' . $filename; $upload_dir = $image_root . '/' . $folder_name . '/'; if (file_exists($upload_dir) && is_writable($upload_dir)) { if (move_uploaded_file($tempname, $path)) { $msg = "Image uploaded successfully"; $query = "UPDATE mangas SET title=:title, author=:author, description=:description, display_image=:display_image, genres=:genres, rating=:rating, modified=:modified where id = :id"; $params = [ 'title' => $title, 'author' => $author, 'description' => $description, 'display_image' => 'https://mangapiece.com/' . $folder_name . '/' . $filename, 'genres' => $genres, 'rating' => $rating, 'modified' => date("Y-m-d H:i:s"), 'id' => $manga_id ]; try { $result = $this->db->execute($query, $params); return $result; } catch (Exception $e) { $this->db->log($e); } } else { $msg = "Not uploaded because of error #" . $_FILES["file"]["error"]; $this->db->log($msg); return false; } } $msg = "Not writeable folder"; $this->db->log($msg); return false; } else { $query = "UPDATE mangas SET title=:title, author=:author, description=:description, genres=:genres, rating=:rating, modified=:modified where id = :id"; $params = [ 'title' => $title, 'author' => $author, 'description' => $description, 'genres' => $genres, 'rating' => $rating, 'modified' => date("Y-m-d H:i:s"), 'id' => $manga_id ]; try { $result = $this->db->execute($query, $params); return $result; } catch (Exception $e) { $this->db->log($e); } } } function uploadToMangaPiece($transfer_type, $files) { $url = 'https://mangapiece.com/mangabo/transfer_image.php?rnd=' . time(); $curl = curl_init(); $params = (object)array(); $params->transfer_type = $transfer_type; $this->db->log('Attachment TMP : ' . $files['tmp_name']); if (function_exists('curl_file_create')) { $params->attachment = curl_file_create($files['tmp_name'], $files['type'], $files['name']); } else { $params->attachment = '@' . $files['tmp_name']; } curl_setopt_array($curl, array( CURLOPT_URL => $url, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => '', CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => 'POST', CURLOPT_POSTFIELDS => $params )); $this->db->log('Params : ' . json_encode($params)); $response = curl_exec($curl); $this->db->log('Reponse : ' . json_encode($response)); curl_close($curl); return $response; } function getAllMangas() { //$query = "SELECT m.*, (select name from chapters where manga_id = m.id order by id desc limit 1) as latest_chapter, (select id from chapters where manga_id = m.id order by id desc limit 1) as latest_chapter_id FROM `mangas` as m"; $query = "select k.* from (select m.*, count(r.id) as total_rating, (sum(r.rating) / count(r.id)) as average_rating, (select name from chapters where manga_id = m.id order by id desc limit 1) as latest_chapter, (select id from chapters where manga_id = m.id order by id desc limit 1) as latest_chapter_id FROM ratings as r join mangas as m on (m.id = r.manga_id) group by r.manga_id) as k ORDER BY `k`.`average_rating` DESC limit 10"; return $this->db->select($query); } function getManga($id) { $query = "select m.*, sum(c.view) as chapter_view from mangas as m join chapters as c on (c.manga_id = m.id) where m.id = :id"; $params = ['id' => $id]; return $this->db->select($query, $params); } function getMangaByTitle($title) { $query = "select m.*, sum(c.view) as chapter_view from mangas as m join chapters as c on (c.manga_id = m.id) where REGEXP_REPLACE(REPLACE(LOWER(m.title), ' ', '-'), '[^a-z0-9-]', '') = :title"; $params = ['title' => $title]; return $this->db->select($query, $params); } function getMangaChapters($id) { $query = "select * FROM chapters where manga_id = :id order by id desc"; $params = ['id' => $id]; return $this->db->select($query, $params); } function addMangaChapter($manga_id, $chapter_name, $attachments) { $query = "INSERT INTO chapters (manga_id, name, created, modified) VALUES (:manga_id, :name, :created, :modified)"; $params = [ 'manga_id' => $manga_id, 'name' => $chapter_name, 'created' => date("Y-m-d H:i:s"), 'modified' => date("Y-m-d H:i:s") ]; try { $chapter_id = $this->db->executeReturnID($query, $params); $total = count($attachments['name']); for ($i = 0; $i < $total; $i++) { $tmpFilePath = $attachments['tmp_name'][$i]; $filename = $attachments['name'][$i]; $this->addMangaChapterImage($manga_id, $chapter_id, $filename, $tmpFilePath); } return true; } catch (Exception $e) { $this->db->log($e); } } function updateMangaImages($chapter_id, $chapter_name, $attachments) { $query = "UPDATE chapters SET name=:name, modified=:modified where id=:id"; $params = [ 'id' => $chapter_id, 'name' => $chapter_name, 'modified' => date("Y-m-d H:i:s") ]; try { $result = $this->db->execute($query, $params); $total = count($attachments['name']); for ($i = 0; $i < $total; $i++) { $tmpFilePath = $attachments['tmp_name'][$i]; $filename = $attachments['name'][$i]; $this->addMangaChapterImage($result[0]['manga_id'], $chapter_id, $filename, $tmpFilePath); } return true; } catch (Exception $e) { $this->db->log($e); return false; } } function addMangaChapterImage($manga_id, $chapter_id, $filename, $tempname) { $ext = pathinfo($filename, PATHINFO_EXTENSION); //$filename = 'chap-' . uniqid() . uniqid() . '.' . $ext; $image_root = '/home/mysenter/public_html/mangapiece.mys-enterprise.com'; $folder_name = 'mangas/' . $manga_id . '/' . $chapter_id; $path = $image_root . '/' . $folder_name . '/' . $filename; $upload_dir = $image_root . '/' . $folder_name . '/'; if (!file_exists($upload_dir)) { mkdir($upload_dir, 0777, true); } if (file_exists($upload_dir) && is_writable($upload_dir)) { if (move_uploaded_file($tempname, $path)) { $query = "INSERT INTO chapter_images (chapter_id, path, filename, created, modified) VALUES (:chapter_id, :path, :filename, :created, :modified)"; $params = [ 'chapter_id' => $chapter_id, 'path' => 'https://mangapiece.com/' . $folder_name . '/' . $filename, 'filename' => $filename, 'created' => date("Y-m-d H:i:s"), 'modified' => date("Y-m-d H:i:s") ]; try { $result = $this->db->execute($query, $params); return $result; } catch (Exception $e) { $this->db->log($e); } } } } function getMangaInfoByChapterId($id) { $query = "select m.* FROM chapters as c join mangas as m on (m.id = c.manga_id) where c.id = :id"; $params = ['id' => $id]; return $this->db->select($query, $params); } function getChapterInfo($id) { $query = "select * FROM chapters where id = :id"; $params = ['id' => $id]; return $this->db->select($query, $params); } function getMangaChapterImages($id) { $this->updateMangaChapterView($id); $this->updateMangaChapterViewLog($id); $query = "select * FROM chapter_images where chapter_id = :id"; $params = ['id' => $id]; return $this->db->select($query, $params); } function updateMangaChapterView($id) { $query = "Update chapters set view=view+1 where id = :id"; $params = ['id' => $id]; return $this->db->execute($query, $params); } function updateMangaChapterViewLog($id) { $chapter = $this->getChapterInfo($id)[0]; $manga = $this->getMangaInfoByChapterId($id)[0]; $query = "INSERT INTO chapter_views (manga_id, chapter_id, ip, created, modified) VALUES (:manga_id, :chapter_id, :ip, :created, :modified)"; $params = [ 'manga_id' => $manga['id'], 'chapter_id' => $id, 'ip' => $this->getClientIP(), 'created' => date("Y-m-d H:i:s"), 'modified' => date("Y-m-d H:i:s") ]; try { return $this->db->execute($query, $params); } catch (Exception $e) { $this->db->log($e); } } function deleteChapterImage($id) { $query = "DELETE FROM chapter_images where id = :id"; $params = ['id' => $id]; return $this->db->execute($query, $params); } function deleteChapter($id) { $query = "DELETE FROM chapters where id = :id"; $params = ['id' => $id]; return $this->db->execute($query, $params); } function deleteManga($id) { $query = "DELETE FROM mangas where id = :id"; $params = ['id' => $id]; return $this->db->execute($query, $params); } function getGenres() { $query = "select * FROM genres order by name"; return $this->db->select($query); } function getActiveGenres() { $query = "select * from ( SELECT g.name, ( SELECT COUNT(m.id) FROM mangas AS m WHERE m.genres LIKE CONCAT('%', g.name, '%') ) AS total FROM genres AS g) as k where k.total > 0 order by name"; return $this->db->select($query); } function getGenreMangas($keyword) { $query = "select k.* from (select m.*, (select name from chapters where manga_id = m.id order by id desc limit 1) as latest_chapter, (select id from chapters where manga_id = m.id order by id desc limit 1) as latest_chapter_id FROM mangas as m where genres like '%" . $keyword . "%') as k where latest_chapter_id > 0"; return $this->db->select($query); } function getKeywordMangas($keyword) { $query = "select k.* from (select m.*, (select name from chapters where manga_id = m.id order by id desc limit 1) as latest_chapter, (select id from chapters where manga_id = m.id order by id desc limit 1) as latest_chapter_id FROM mangas as m where m.title like '%" . $keyword . "%') as k where latest_chapter_id > 0"; return $this->db->select($query); } function addGenre($name) { $query = "INSERT INTO genres (name, created, modified) VALUES (:name, :created, :modified)"; $params = [ 'name' => $name, 'created' => date("Y-m-d H:i:s"), 'modified' => date("Y-m-d H:i:s") ]; try { $result = $this->db->execute($query, $params); return $result; } catch (Exception $e) { $this->db->log($e); } } function deleteGenre($id) { $query = "DELETE FROM genres where id = :id"; $params = ['id' => $id]; return $this->db->execute($query, $params); } function getLatestUpdateChapter() { $query = "select max(c.id) as chapter_id, m.* from chapters as c join mangas as m on (m.id = c.manga_id) group by m.id order by chapter_id desc limit 10"; return $this->db->select($query); } function getLatestChapter($id) { $query = "select * FROM chapters where manga_id = :id order by created desc limit 3;"; $params = ['id' => $id]; return $this->db->select($query, $params); } function getRelatedMangas($id) { $target = $this->getManga($id)[0]; $genres = explode(", ", $target['genres']); $filter = ''; $counter = 0; if (sizeof($genres) > 0) { $filter = "AND ("; foreach ($genres as $g) { if ($counter == 0) { $filter .= "genres like '%" . $g . "%'"; } else { $filter .= " OR genres like '%" . $g . "%'"; } $counter += 1; } $filter .= ")"; } $query = "select m.*, (select name from chapters where manga_id = m.id order by id desc limit 1) as latest_chapter, (select id from chapters where manga_id = m.id order by id desc limit 1) as latest_chapter_id FROM mangas as m where m.id !=:id " . $filter . " ORDER BY RAND() limit 10"; $params = ['id' => $id]; return $this->db->select($query, $params); } function getMangaComments($id) { $query = "select * FROM comments where manga_id = :id order by created desc;"; $params = ['id' => $id]; return $this->db->select($query, $params); } function addMangaComments($manga_id, $comment) { $query = "INSERT INTO comments (manga_id, comment, ip, name, created, modified) VALUES (:manga_id, :comment, :ip, :name, :created, :modified)"; $params = [ 'manga_id' => $manga_id, 'comment' => $comment, 'ip' => $this->getClientIP(), 'name' => uniqid(), 'created' => date("Y-m-d H:i:s"), 'modified' => date("Y-m-d H:i:s") ]; try { return $this->db->select($query, $params); } catch (Exception $e) { $this->db->log($e); } } function addMangaRating($manga_id, $rating) { $query = "INSERT INTO ratings (manga_id, rating, ip, created, modified) VALUES (:manga_id, :rating, :ip, :created, :modified)"; $params = [ 'manga_id' => $manga_id, 'rating' => $rating, 'ip' => $this->getClientIP(), 'created' => date("Y-m-d H:i:s"), 'modified' => date("Y-m-d H:i:s") ]; try { return $this->db->select($query, $params); } catch (Exception $e) { $this->db->log($e); } } function getMangaRatings($id) { $query = "select count(id) as total_rating, (sum(rating) / count(id)) as average_rating FROM ratings where manga_id = :id order by created desc;"; $params = ['id' => $id]; return $this->db->select($query, $params); } function getAllTimeMangaViewRanking() { $query = "SELECT sum(view) as total_view, m.* FROM chapters as c join mangas as m on (m.id = c.manga_id) group by manga_id ORDER BY sum(view) DESC"; return $this->db->select($query); } function getMangaGenreMostView($id) { $target = $this->getManga($id)[0]; $genres = explode(", ", $target['genres']); $filter = ''; $counter = 0; if (sizeof($genres) > 0) { $filter = "AND ("; foreach ($genres as $g) { if ($counter == 0) { $filter .= "m.genres like '%" . $g . "%'"; } else { $filter .= " OR m.genres like '%" . $g . "%'"; } $counter += 1; } $filter .= ")"; } $query = "SELECT sum(view) as total_view, m.* FROM chapters as c join mangas as m on (m.id = c.manga_id) " . $filter . " group by manga_id ORDER BY sum(view) DESC"; return $this->db->select($query); } function getMangaGenreMostViewByTitle($title) { $target = $this->getMangaByTitle($title)[0]; $genres = explode(", ", $target['genres']); $filter = ''; $counter = 0; if (sizeof($genres) > 0) { $filter = "AND ("; foreach ($genres as $g) { if ($counter == 0) { $filter .= "m.genres like '%" . $g . "%'"; } else { $filter .= " OR m.genres like '%" . $g . "%'"; } $counter += 1; } $filter .= ")"; } $query = "SELECT sum(view) as total_view, m.* FROM chapters as c join mangas as m on (m.id = c.manga_id) " . $filter . " group by manga_id ORDER BY sum(view) DESC"; return $this->db->select($query); } function getGenreMostView($keyword) { $query = "SELECT sum(view) as total_view, m.* FROM chapters as c join mangas as m on (m.id = c.manga_id) where m.genres like '%" . $keyword . "%' group by manga_id ORDER BY sum(view) DESC"; return $this->db->select($query); } function addMangaRequest($title, $reference_link, $description) { $query = "INSERT INTO request_inboxs (title, reference_link, description, ip, created, modified) VALUES (:title, :reference_link, :description, :ip, :created, :modified)"; $params = [ 'title' => $title, 'reference_link' => $reference_link, 'description' => $description, 'ip' => $this->getClientIP(), 'created' => date("Y-m-d H:i:s"), 'modified' => date("Y-m-d H:i:s") ]; try { return $this->db->select($query, $params); } catch (Exception $e) { $this->db->log($e); } } function getLatestWeekNewManga() { $query = "SELECT sum(view) as total_view, m.* FROM chapters as c join mangas as m on (m.id = c.manga_id) WHERE DATE(m.created) >= CURDATE() - INTERVAL WEEKDAY(CURDATE()) DAY AND DATE(m.created) < CURDATE() - INTERVAL WEEKDAY(CURDATE()) - 7 DAY group by manga_id ORDER BY m.created desc"; return $this->db->select($query); } function getLatestWeekHotManga() { $query = "SELECT count(cv.id) as total_view, m.* FROM chapter_views as cv join mangas as m on (m.id = cv.manga_id) WHERE DATE(cv.created) >= CURDATE() - INTERVAL WEEKDAY(CURDATE()) DAY AND DATE(cv.created) < CURDATE() - INTERVAL WEEKDAY(CURDATE()) - 7 DAY group by m.id order by total_view desc"; return $this->db->select($query); } function getMangaLatestChapterImages($chapter_id) { $query = "SELECT * FROM chapter_images WHERE chapter_id = " . $chapter_id; return $this->db->select($query); } public function getDirectlinkUrl(string $placement): string { $query = " SELECT direct_url FROM ads_scripts WHERE placement = :p AND is_active = 1 AND ad_type = 'direct' AND direct_url IS NOT NULL AND direct_url <> '' ORDER BY sort_order ASC, id DESC LIMIT 1 "; $row = $this->db->select($query, ['p' => $placement]); if (!$row) return ''; return (string)($row[0]['direct_url'] ?? ''); } }
Close