欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  IT编程

飞云防CC攻击ASP程序代码插件

程序员文章站 2022-10-27 19:09:39
<% '================== '飞云防cc攻击asp程序插件 '建议除必须修改的参数内容外不要修改其他内容 '如果需要反馈错误或提交意见,可以到落伍(...
<%
'==================
'飞云防cc攻击asp程序插件
'建议除必须修改的参数内容外不要修改其他内容
'如果需要反馈错误或提交意见,可以到落伍(im286.com)联系 “正版飞云”
'==================

dim fycc_19,fycc_20,fycc_21,fycc_05
dim fycc_18

fycc_05=""
'cclog.txt存放的路径文件夹!需要手动创建!建议留空
'如果输入,请在前面加上符号"/"

fycc_18=1 
'防刷新cc攻击关闭与启动,1为启动0为关闭

fycc_17=1
'防刷新禁止ip功能关闭与启动,1为启动0为关闭

fycc_19=10 
'每分钟刷新次数,将会出现提示

fycc_20="http://www.163.com"
'被封ip后自动转入的页面,建议输入存放病毒的网址!!!

fycc_21=21
'恶意刷新几次将禁止ip

dim realip,proxy
realip = request.servervariables("http_x_forwarded_for")
proxy = request.servervariables("remote_addr")
if realip = "" then
getip = proxy
else
getip = realip
end if

sub fycc_03()
set fsoobject = server.createobject("scripting.filesystemobject") 
file = server.mappath(""&fycc_05&"/cclog.txt") 
if not fsoobject.fileexists(file) then 
fsoobject.createtextfile file,true,false 
end if
set tsobject = fsoobject.opentextfile(file,8) 
tsobject.writeline " "&getip&"" 
set tsobject = nothing 
set fsoobject = nothing 
end sub

if fycc_18<>0 then
if fycc_17<>0 then
if minute(now())>-1 and minute(now())<4 then
set objfso = server.createobject("scripting.filesystemobject")
set objcountfile=objfso.createtextfile(server.mappath(""&fycc_05&"/cclog.txt"),true)
objcountfile.write " "
objcountfile.close
set objcountfile=nothing
set objfso = nothing
end if
set fsoobject = server.createobject("scripting.filesystemobject") 
file = server.mappath(""&fycc_05&"/cclog.txt") 
if not fsoobject.fileexists(file) then 
fsoobject.createtextfile file,true,false 
if err.number<>0 then
response.write "您的空间不支持fso,请同您的空间商联系,或者查看相关权限设置"
response.end
end if
end if
set objcountfile = fsoobject.opentextfile(server.mappath(""&fycc_05&"/cclog.txt"),1,true)
if not objcountfile.atendofstream then fdata = objcountfile.readall
set objcountfile = nothing 
if instr(fdata,""&getip&"")>0  then
response.write "您的ip["&getip&"]已经被禁止!如需要解封,请联系本站管理员或在下一个小时的前3分钟内再访问本站"
response.end
end if
set fsoobject = nothing 
end if

if session("fycc_01")>fycc_19 and minute(now())<>session("fycc_02") then
session("fycc_01")=1
session("fycc_02")=minute(now())
elseif session("fycc_01")>fycc_21-1 and minute(now())=session("fycc_02") then
if fycc_17<>0 and session("fycc_01")>fycc_21-1 then
call fycc_03()
end if
response.redirect ""&fycc_20&"" '建议输入存放病毒的网址!!!
response.end
elseif session("fycc_01")>fycc_19 and minute(now())=session("fycc_02") then
response.write "本站启动防刷新功能,1分钟内只能翻"&fycc_19&"页,请在下一分钟再刷新本页面"
session("fycc_01")=session("fycc_01")+1
response.end
else
if session("fycc_01")="" then
session("fycc_01")=1
session("fycc_02")=minute(now())
else
if minute(now())<>session("fycc_02") then
session("fycc_01")=1
session("fycc_02")=minute(now())
else
session("fycc_01")=session("fycc_01")+1
end if
end if
end if
end if
%>
使用方法

1,把fycc.asp文件放置到你网站的根目录(要与网站首页同目录)
3,打开网站默认访问文件(一般是index.asp),然后插入<!--#include file="fycc.asp"-->
4,打开fycc.asp修改顶部10-30行的设置参数
5,两个文件保存上传