Asp - Php - Cgi - Perl
Siteme Saldırı Var ASP İle IP Adreslerini Engellemem Gerek
Siteme Saldırı Var ASP İle IP Adreslerini Engellemem Gerek
-
Merhaba
Siteme saldırı var 5-6 tane ip adresinin girişini engellemek istiyorum.
<%
Dim sBlockedIP
sBlockedIP = Request.ServerVariables("REMOTE_ADDR")
'check if the IP is the one that is blocked
If sBlockedIP = "32.454.42.12" Then
'if IP address is banned then redirect to no_access.asp
Response.Redirect "no_access.asp"
End If
%>Böyle bir kod buldum fakat bunu 5-6 ip adresini engelleyecek şekilde düzenlemem gerek. Yukardaki kod tek ip için düzgün çalışıyor.
-
If sBlockedIP = "32.454.42.12" or sBlockedIP = "32.454.42.12" or sBlockedIP = "32.454.42.12" or sBlockedIP = "32.454.42.12" Then
OR ile birden fazla veriyordun sanırım aspde
-
or ile 2 tane yapabiliyoruz ama 2 den fazlası da olur mu?
-
2 tane limiti olamaz hocam yazabildiğin kadardır o tekrar dene yada kodu buraya yaz
-
If SESSION("DDos" )="" Then
SESSION("DDos" )=0
Session("DosTarih")=Now()
Else
if session("DosTarih")<=dateadd("s",+10,now()) then
SESSION("DDos")=SESSION("DDos" )+1
end if
End If
If CInt(SESSION("DDos"))> 100 Then
Response.Redirect "hata.asp"
Response.End
End If
f5 tuşuna basılı tut test etmek için :) Bütün sayfalara include et bunu hocam.
EnableTurk tarafından 07/May/15 18:44 tarihinde düzenlenmiştir