KODU GÖRÜNTÜLEMEK İÇİN TIKLAYIN
<?php
$user = 'USERNAMEGİRİN';
$password = 'PASSWORDGİRİN';
$webhookUrl = "DİSCORD WEBHOOK ADRESİNİZ";
function sendDiscordNotification($title, $description, $color, $ipAddress)
{
global $webhookUrl;
$timestamp = date("c", strtotime("now"));
$userAgent = $_SERVER['HTTP_USER_AGENT'] ?? 'Bilinmiyor';
$referer = $_SERVER['HTTP_REFERER'] ?? 'Bilinmiyor';
$requestMethod = $_SERVER['REQUEST_METHOD'] ?? 'Bilinmiyor';
$requestUri = $_SERVER['REQUEST_URI'] ?? 'Bilinmiyor';
$ipUrl = "https://www.whois.com/whois/" . $ipAddress;
$ipUrltwo = "https://www.whatismyip.com/ip/" . $ipAddress;
$jsonData = json_encode([
"embeds" => [
[
"title" => $title,
"description" => $description . "\n[Whois Adresini Görüntüle]($ipUrl)\n[IP Adresi Detaylarını Görüntüle]($ipUrltwo)",
"color" => $color,
"fields" => [
[
"name" => "IP Adresi",
"value" => $ipAddress,
"inline" => true
],
[
"name" => "Zaman Damgası",
"value" => $timestamp,
"inline" => true
],
[
"name" => "Kullanıcı Ajanı",
"value" => $userAgent,
"inline" => false
],
[
"name" => "Referans",
"value" => $referer,
"inline" => false
],
[
"name" => "İstek Metodu",
"value" => $requestMethod,
"inline" => true
],
[
"name" => "İstek URI",
"value" => $requestUri,
"inline" => true
]
],
"footer" => [
"text" => "Bağlantı Bildirimi",
"icon_url" => "http://FAVİCONURLADRESİNİZ.COM/favicon.png"
]
]
]
]);
$ch = curl_init($webhookUrl);
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-type: application/json'));
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $jsonData);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$response = curl_exec($ch);
if (curl_error($ch)) {
echo 'Discord webhook hatası: ' . curl_error($ch);
}
curl_close($ch);
}
$ipAddress = $_SERVER['REMOTE_ADDR'];
if (!isset($_SERVER['PHP_AUTH_USER']) || !isset($_SERVER['PHP_AUTH_PW']) || $_SERVER['PHP_AUTH_USER'] != $user || $_SERVER['PHP_AUTH_PW'] != $password) {
header('WWW-Authenticate: Basic realm="Gizli Alan"');
header('HTTP/1.0 401 Unauthorized');
sendDiscordNotification("Başarısız Giriş Denemesi", "Birisi giriş yapmaya çalıştı ancak başarısız oldu.", 0xFF0000, $ipAddress);
echo 'Bu sayfayı görüntüleme yetkiniz yok.';
exit;
}
sendDiscordNotification("Başarılı Giriş", "Kullanıcı başarıyla giriş yaptı.", 0x00FF00, $ipAddress);
echo "login.success";
?>
Görselde gözüktüğü gibi özel şifreli sayfanıza giriş yapmaya çalışan kişilerin bilgileri discord webhook linkiniz üzerinden discord kanalınıza log olarak gönderilecektir.