<%
'==================
dim FYCC_(15),FYCC_SZ_(15)
%>
<!--#include file="CC_config.asp"-->
<%
'====检查设置项开始======
If FYCC_(6)>FYCC_(4) then
response.write "“防CC攻击ASP程序插件”设置错误！<br><b>FYCC_(4)</b>(目前：<b>"&FYCC_(4)&"</b>)值必须大于或等于<b>FYCC_(6)</b>(目前：<b>"&FYCC_(6)&"</b>的数值！)"
Response.End
End if
if FYCC_(12)="" or FYCC_(12)=0 then
response.write "您的插件安装并没有完成，请先在浏览器上打开<a href=""FYCC_Index.asp"">FYCC_Index.asp</a>文件进行安装<br>"
Response.End
end if
'====检查设置项结束======

FYCC_SZ_(1) = Request.ServerVariables("HTTP_X_FORWARDED_FOR")
FYCC_SZ_(2) = Request.ServerVariables("REMOTE_ADDR")
If FYCC_SZ_(1)<>"" and FYCC_(3)=1 then 
response.write "对不起，本站禁止代理IP访问!"
Response.End
end if
if FYCC_SZ_(1) = "" then
FYCC_SZ_(0) = FYCC_SZ_(2)
else
FYCC_SZ_(0) = FYCC_SZ_(1)
end if

Sub FYCC_X()
Set FYCC_SZ_(5) = Server.CreateObject("Scripting.FileSystemObject") 
FYCC_SZ_(6) = server.mappath(""&FYCC_(10)&"/CCLog_"&FYCC_(12)&".txt") 
if not FYCC_SZ_(5).fileexists(FYCC_SZ_(6)) then 
FYCC_SZ_(5).createtextfile FYCC_SZ_(6),true,false 
end if
set FYCC_SZ_(9) = FYCC_SZ_(5).OpenTextFile(FYCC_SZ_(6),8) 
FYCC_SZ_(9).Writeline " ||"&FYCC_SZ_(0)&"|| " 
Set FYCC_SZ_(9) = Nothing 
Set FYCC_SZ_(5) = Nothing 
session("FYCC_TXT")="FY"
End Sub

Sub FYCC_C()
Set FYCC_SZ_(10) = Server.CreateObject("Scripting.FileSystemObject")
Set FYCC_SZ_(4)=FYCC_SZ_(10).CreateTextFile(Server.MapPath(""&FYCC_(10)&"/CCLog_"&FYCC_(12)&".txt"),True)
FYCC_SZ_(4).Write " "
FYCC_SZ_(4).Close
Set FYCC_SZ_(4)=Nothing
Set FYCC_SZ_(10) = Nothing
session("FYCC_TXT")="FY"
End Sub

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

if Session("FYCC_Session_1")>FYCC_(6) and minute(now())<>Session("FYCC_Session_2") then
Session("FYCC_Session_1")=1
Session("FYCC_Session_2")=minute(now())
elseif Session("FYCC_Session_1")>FYCC_(4)-1 and minute(now())=Session("FYCC_Session_2") then
if FYCC_(8)<>0 and Session("FYCC_Session_1")>FYCC_(4)-1 then
Call FYCC_X()
end if
response.redirect FYCC_(5)
response.end
elseif Session("FYCC_Session_1")>FYCC_(6) and minute(now())=Session("FYCC_Session_2") then
response.write "本站启动防刷新功能,1分钟内只能翻"&FYCC_(6)&"页,请在下一分钟再刷新本页面"
Session("FYCC_Session_1")=Session("FYCC_Session_1")+1
response.end
else
if Session("FYCC_Session_1")="" then
Session("FYCC_Session_1")=1
Session("FYCC_Session_2")=minute(now())
else
if minute(now())<>Session("FYCC_Session_2") then
Session("FYCC_Session_1")=1
Session("FYCC_Session_2")=minute(now())
else
Session("FYCC_Session_1")=Session("FYCC_Session_1")+1
end if
end if
End if
end if
%>