<%
'==================
'梦幻星空防CC攻击ASP程序插件
'建议除必须修改的参数内容外不要修改其他内容
'如果需要反馈错误或提交意见,可以QQ:56255099 联系“梦幻星空”

'注意：如果想修改设置，请将fangCC_Index.asp文件上传后按提示进行设置！！
'==================
dim DJCC_(10),DJCC_SZ_(10)
%>
<!--#include file="DJCC_config.asp"-->
<%
'====检查设置项开始======
If DJCC_(6)>DJCC_(4) Then
Call head()
Call SAYCARDD("警告")
response.write "“DJ防CC攻击插件”设置错误！<br><b>DJCC_(4)</b>(目前：<b>"&DJCC_(4)&"</b>)值必须大于或等于<b>DJCC_(6)</b>(目前：<b>"&DJCC_(6)&"</b>的数值！)"
Call head1()
Response.End
End if
'====检查设置项结束======

DJCC_SZ_(1) = Request.ServerVariables("HTTP_X_FORWARDED_FOR")
DJCC_SZ_(2) = Request.ServerVariables("REMOTE_ADDR")
If DJCC_SZ_(1)<>"" and DJCC_(3)=1 then 
Call head()
Call SAYCARDD("警告")
response.write "对不起，本站禁止代理IP访问!"
Call head1()
Response.End
end if
if DJCC_SZ_(1) = "" then
DJCC_SZ_(0) = DJCC_SZ_(2)
else
DJCC_SZ_(0) = DJCC_SZ_(1)
end if

Sub DJCC_X()
Set DJCC_SZ_(5) = Server.CreateObject("Scripting.FileSystemObject") 
DJCC_SZ_(6) = server.mappath(""&DJCC_(10)&"/CCLog.txt") 
if not DJCC_SZ_(5).fileexists(DJCC_SZ_(6)) then 
DJCC_SZ_(5).createtextfile DJCC_SZ_(6),true,false 
end if
set DJCC_SZ_(9) = DJCC_SZ_(5).OpenTextFile(DJCC_SZ_(6),8) 
DJCC_SZ_(9).Writeline "||"&DJCC_SZ_(0)&"||" 
Set DJCC_SZ_(9) = Nothing 
Set DJCC_SZ_(5) = Nothing 
End Sub

if DJCC_(7)<>0 then
if DJCC_(8)<>0 then
if minute(now())>-1 and minute(now())<4 then
Set DJCC_SZ_(10) = Server.CreateObject("Scripting.FileSystemObject")
Set DJCC_SZ_(4)=DJCC_SZ_(10).CreateTextFile(Server.MapPath(""&DJCC_(10)&"/CCLog.txt"),True)
DJCC_SZ_(4).Write " "
DJCC_SZ_(4).Close
Set DJCC_SZ_(4)=Nothing
Set DJCC_SZ_(10) = Nothing
end if
Set DJCC_SZ_(5) = Server.CreateObject("Scripting.FileSystemObject") 
DJCC_SZ_(6) = server.mappath(""&DJCC_(10)&"/CCLog.txt") 
if not DJCC_SZ_(5).fileexists(DJCC_SZ_(6)) then 
DJCC_SZ_(5).createtextfile DJCC_SZ_(6),true,false 
if err.number<>0 Then
Call head()
Call SAYCARDD("警告")
response.write "您的空间不支持FSO，请同您的空间商联系，或者查看相关权限设置"
Call head1()
response.end
end if
end if
Set DJCC_SZ_(4) = DJCC_SZ_(5).OpenTextFile(Server.MapPath(""&DJCC_(10)&"/CCLog.txt"),1,True)
If Not DJCC_SZ_(4).AtEndOfStream Then DJCC_SZ_(3) = DJCC_SZ_(4).ReadAll
Set DJCC_SZ_(4) = Nothing 
if instr(DJCC_SZ_(3),DJCC_SZ_(0))>0  Then
Call head()
Call SAYCARDD("警告")
response.write "警告：你的IP["&DJCC_SZ_(0)&"]已经被禁止!如需要解封,请联系本站管理员或在下一个小时的前3分钟内再访问本站！提示：犯法事，不要做！"
if ubound(split(DJCC_SZ_(3),"||"))-1>DJCC_(9)*2 and DJCC_(9)>0 and DJCC_(3)=0 then
Set DJCC_SZ_(8)=Server.CreateObject("Scripting.FileSystemObject")
Set DJCC_SZ_(7) = DJCC_SZ_(8).CreateTextFile(Server.MapPath("DJCC_config.asp"), True)
DJCC_SZ_(7).writeline "<"&chr(37)
DJCC_SZ_(7).writeline "DJCC_(10)="&chr(34)&""&replace(DJCC_(10),"""","""""")&""&chr(34)&""
DJCC_SZ_(7).writeline "DJCC_(5)="&chr(34)&""&replace(DJCC_(5),"""","""""")&""&chr(34)&""
DJCC_SZ_(7).writeline "DJCC_(7)="&replace(DJCC_(7),"""","""""")&""
DJCC_SZ_(7).writeline "DJCC_(8)="&replace(DJCC_(8),"""","""""")&""
DJCC_SZ_(7).writeline "DJCC_(6)="&replace(DJCC_(6),"""","""""")&""
DJCC_SZ_(7).writeline "DJCC_(4)="&replace(DJCC_(4),"""","""""")&""
DJCC_SZ_(7).writeline "DJCC_(9)="&replace(DJCC_(9),"""","""""")&""
DJCC_SZ_(7).writeline "DJCC_(3)=1"
DJCC_SZ_(7).writeline chr(37)&">"
Set DJCC_SZ_(7)=Nothing
Set DJCC_SZ_(8)=nothing
end If
Call head1()
response.end
end if
Set DJCC_SZ_(5) = Nothing 
end if

if Session("DJCC_Session_1")>DJCC_(6) and minute(now())<>Session("DJCC_Session_2") then
Session("DJCC_Session_1")=1
Session("DJCC_Session_2")=minute(now())
elseif Session("DJCC_Session_1")>DJCC_(4)-1 and minute(now())=Session("DJCC_Session_2") then
if DJCC_(8)<>0 and Session("DJCC_Session_1")>DJCC_(4)-1 then
Call DJCC_X()
end if
response.redirect DJCC_(5)
response.end
elseif Session("DJCC_Session_1")>DJCC_(6) and minute(now())=Session("DJCC_Session_2") Then
Call head()
Call SAYCARDD("警告")
response.write "本站启动防刷新功能,1分钟内只能翻"&DJCC_(6)&"页,请在下一分钟再刷新本页面"
Session("DJCC_Session_1")=Session("DJCC_Session_1")+1
Call head1()
response.end
else
if Session("DJCC_Session_1")="" then
Session("DJCC_Session_1")=1
Session("DJCC_Session_2")=minute(now())
else
if minute(now())<>Session("DJCC_Session_2") then
Session("DJCC_Session_1")=1
Session("DJCC_Session_2")=minute(now())
else
Session("DJCC_Session_1")=Session("DJCC_Session_1")+1
end if
end if
End if
end If

%>