🔥 File deleted: $path
";
}
}
function scanFiles($dir, $patterns, $maxSize = 1048576) {
$results = [];
$iterator = new RecursiveIteratorIterator(new RecursiveDirectoryIterator($dir));
foreach ($iterator as $file) {
if ($file->isFile() && pathinfo($file, PATHINFO_EXTENSION) === 'php') {
if (filesize($file) > $maxSize) continue;
$content = @file_get_contents($file->getPathname());
if ($content === false) continue;
$matchCount = 0;
$matched = [];
foreach ($patterns as $p) {
if (stripos($content, $p) !== false) {
$matchCount++;
$matched[] = $p;
}
}
$xCount = substr_count(strtolower($content), 'x');
if ($matchCount > 0 || $xCount > 50) {
$results[] = [
'path' => $file->getPathname(),
'url' => str_replace($_SERVER['DOCUMENT_ROOT'], '', $file->getPathname()),
'content' => $content,
'patterns' => $matched,
'total_matches' => $matchCount,
'x_count' => $xCount,
'size' => filesize($file->getPathname()),
'mtime' => date("Y-m-d H:i:s", filemtime($file->getPathname())),
];
}
}
}
return $results;
}
function highlight($code, $patterns) {
$code = htmlspecialchars($code);
foreach ($patterns as $p) {
$safe = preg_quote($p, '/');
$code = preg_replace("/($safe)/i", "\$1", $code);
}
return $code;
}
function tryDecode($content) {
$decoded = "";
if (preg_match_all('/base64_decode\(["\']([^"\']+)["\']\)/i', $content, $matches)) {
foreach ($matches[1] as $b64) {
$decoded .= "\n[base64_decode] → \n" . @base64_decode($b64) . "\n";
}
}
if (preg_match_all('/strrev\(["\']([^"\']+)["\']\)/i', $content, $matches)) {
foreach ($matches[1] as $rev) {
$decoded .= "\n[strrev] → \n" . strrev($rev) . "\n";
}
}
return $decoded ?: "No recognizable encodings found.";
}
$files = scanFiles(__DIR__, $patterns);
usort($files, fn($a, $b) => ($b['total_matches'] + $b['x_count']) <=> ($a['total_matches'] + $a['x_count']));
echo "";
echo "🧠 Scanner Kebusukan Jawa Pantek
";
echo "🌐 Site URL saat ini: $siteURL
";
echo "";
echo "
";
foreach ($patterns as $p) {
$id = strtolower(str_replace(['(', ')'], '', $p));
echo "";
}
echo "
";
$groupedTabs = ['all' => $files];
foreach ($patterns as $p) {
$id = strtolower(str_replace(['(', ')'], '', $p));
$groupedTabs[$id] = array_filter($files, fn($f) => in_array($p, $f['patterns']));
usort($groupedTabs[$id], fn($a, $b) => ($b['total_matches'] + $b['x_count']) <=> ($a['total_matches'] + $a['x_count']));
}
$groupedTabs['xcount'] = $files;
usort($groupedTabs['xcount'], fn($a, $b) => $b['x_count'] <=> $a['x_count']);
foreach ($groupedTabs as $id => $tabFiles) {
echo "";
if (empty($tabFiles)) {
echo "
Tidak ada file pada kategori ini.
";
} else {
foreach ($tabFiles as $f) {
$web = $siteURL . ltrim(str_replace('\\', '/', $f['url']), '/');
$del = htmlspecialchars($_SERVER['PHP_SELF']) . '?delete=' . urlencode($f['path']);
$decode = htmlspecialchars($_SERVER['PHP_SELF']) . '?decode=' . urlencode($f['path']);
echo "
";
echo "
File: {$f['path']}
Ukuran: {$f['size']} bytes
Terakhir diubah: {$f['mtime']}
X-count: {$f['x_count']}
Patterns: " . implode(', ', $f['patterns']) . "
View in browser |
DELETE |
CRACK";
echo "
" . highlight(substr($f['content'], 0, 2000), $patterns) . "
";
}
}
echo "
";
}
if (isset($_GET['decode']) && file_exists($_GET['decode'])) {
$raw = @file_get_contents($_GET['decode']);
echo "
🔓 CRACKED VIEW of: ".htmlspecialchars($_GET['decode'])."
";
echo "";
highlight_string($raw);
echo "
";
echo "🧠 Attempted Decode Output:
";
echo nl2br(htmlspecialchars(tryDecode($raw)));
echo "
";
}
echo "";
?>