function BruteForce ( $VeriDatasiSay, $Say )
{
if ( $Say = -1 )
{
$_SESSION[$VeriDatasiSay] = 0;
return 1;
}
if ( isset ( $_SESSION[$VeriDatasiSay] ) == TRUE && is_numeric ( $_SESSION[$VeriDatasiSay] ) == TRUE )
{
$_SESSION[$VeriDatasiSay] = intval ( $_SESSION[$VeriDatasiSay] ) + 1;
}
else
{
$_SESSION[$VeriDatasiSay] = 0;
}
if ( intval ( $_SESSION[$VeriDatasiSay] ) > intval ( $Say ) )
{
return 2; // 3 adet denemenin üzerinde deneme yaptı engelle
}
else
{
return 1; // henüz deneme limitini geçmedi problem yok
}
}
if ( BruteForce ( "login", 3 ) == 2 )
{
echo "Invalid password. You will not be able to login for an hour because you have made too many incorrect password attempts.";
exit();
}
Categories: PHP language
7 Comments
essentials fear of god · 13/02/2025 at 01:27
… [Trackback]
[…] Find More here to that Topic: durukanbal.com/2022/04/15/php-session-brute-force-defense/ […]
ของพรีเมี่ยม · 15/02/2025 at 03:53
… [Trackback]
[…] Find More to that Topic: durukanbal.com/2022/04/15/php-session-brute-force-defense/ […]
บาคาร่าเกาหลี · 20/02/2025 at 13:20
… [Trackback]
[…] Here you can find 82777 additional Information on that Topic: durukanbal.com/2022/04/15/php-session-brute-force-defense/ […]
kc9 · 03/03/2025 at 02:46
… [Trackback]
[…] Find More here to that Topic: durukanbal.com/2022/04/15/php-session-brute-force-defense/ […]
789bet · 03/03/2025 at 03:16
… [Trackback]
[…] Read More on that Topic: durukanbal.com/2022/04/15/php-session-brute-force-defense/ […]
https://old.jamiyyathsalaf.com/torgovlja-s-pocket-option-vse-chto-vam-nuzhno-znat/ · 11/03/2025 at 17:21
… [Trackback]
[…] Find More here to that Topic: durukanbal.com/2022/04/15/php-session-brute-force-defense/ […]
fox888 · 13/03/2025 at 14:20
… [Trackback]
[…] Find More on that Topic: durukanbal.com/2022/04/15/php-session-brute-force-defense/ […]