飛云防CC攻擊ASP程序代碼插件
更新時(shí)間:2007年08月14日 16:09:19 作者:
<%
'==================
'飛云防CC攻擊ASP程序插件
'建議除必須修改的參數(shù)內(nèi)容外不要修改其他內(nèi)容
'如果需要反饋錯(cuò)誤或提交意見(jiàn),可以到落伍(IM286.COM)聯(lián)系 “正版飛云”
'==================
dim FYCC_19,FYCC_20,FYCC_21,FYCC_05
dim FYCC_18
FYCC_05=""
'CCLog.txt存放的路徑文件夾!需要手動(dòng)創(chuàng)建!建議留空
'如果輸入,請(qǐng)?jiān)谇懊婕由戏?hào)"/"
FYCC_18=1
'防刷新CC攻擊關(guān)閉與啟動(dòng),1為啟動(dòng)0為關(guān)閉
FYCC_17=1
'防刷新禁止IP功能關(guān)閉與啟動(dòng),1為啟動(dòng)0為關(guān)閉
FYCC_19=10
'每分鐘刷新次數(shù),將會(huì)出現(xiàn)提示
FYCC_20="http://www.163.com"
'被封IP后自動(dòng)轉(zhuǎn)入的頁(yè)面,建議輸入存放病毒的網(wǎng)址!!!
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,請(qǐng)同您的空間商聯(lián)系,或者查看相關(guān)權(quán)限設(shè)置"
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&"]已經(jīng)被禁止!如需要解封,請(qǐng)聯(lián)系本站管理員或在下一個(gè)小時(shí)的前3分鐘內(nèi)再訪問(wèn)本站"
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&"" '建議輸入存放病毒的網(wǎng)址!!!
response.end
elseif Session("FYCC_01")>FYCC_19 and minute(now())=Session("FYCC_02") then
response.write "本站啟動(dòng)防刷新功能,1分鐘內(nèi)只能翻"&FYCC_19&"頁(yè),請(qǐng)?jiān)谙乱环昼娫偎⑿卤卷?yè)面"
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文件放置到你網(wǎng)站的根目錄(要與網(wǎng)站首頁(yè)同目錄)
3,打開(kāi)網(wǎng)站默認(rèn)訪問(wèn)文件(一般是index.asp),然后插入<!--#include file="FYCC.asp"-->
4,打開(kāi)FYCC.asp修改頂部10-30行的設(shè)置參數(shù)
5,兩個(gè)文件保存上傳
'==================
'飛云防CC攻擊ASP程序插件
'建議除必須修改的參數(shù)內(nèi)容外不要修改其他內(nèi)容
'如果需要反饋錯(cuò)誤或提交意見(jiàn),可以到落伍(IM286.COM)聯(lián)系 “正版飛云”
'==================
dim FYCC_19,FYCC_20,FYCC_21,FYCC_05
dim FYCC_18
FYCC_05=""
'CCLog.txt存放的路徑文件夾!需要手動(dòng)創(chuàng)建!建議留空
'如果輸入,請(qǐng)?jiān)谇懊婕由戏?hào)"/"
FYCC_18=1
'防刷新CC攻擊關(guān)閉與啟動(dòng),1為啟動(dòng)0為關(guān)閉
FYCC_17=1
'防刷新禁止IP功能關(guān)閉與啟動(dòng),1為啟動(dòng)0為關(guān)閉
FYCC_19=10
'每分鐘刷新次數(shù),將會(huì)出現(xiàn)提示
FYCC_20="http://www.163.com"
'被封IP后自動(dòng)轉(zhuǎn)入的頁(yè)面,建議輸入存放病毒的網(wǎng)址!!!
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,請(qǐng)同您的空間商聯(lián)系,或者查看相關(guān)權(quán)限設(shè)置"
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&"]已經(jīng)被禁止!如需要解封,請(qǐng)聯(lián)系本站管理員或在下一個(gè)小時(shí)的前3分鐘內(nèi)再訪問(wèn)本站"
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&"" '建議輸入存放病毒的網(wǎng)址!!!
response.end
elseif Session("FYCC_01")>FYCC_19 and minute(now())=Session("FYCC_02") then
response.write "本站啟動(dòng)防刷新功能,1分鐘內(nèi)只能翻"&FYCC_19&"頁(yè),請(qǐng)?jiān)谙乱环昼娫偎⑿卤卷?yè)面"
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文件放置到你網(wǎng)站的根目錄(要與網(wǎng)站首頁(yè)同目錄)
3,打開(kāi)網(wǎng)站默認(rèn)訪問(wèn)文件(一般是index.asp),然后插入<!--#include file="FYCC.asp"-->
4,打開(kāi)FYCC.asp修改頂部10-30行的設(shè)置參數(shù)
5,兩個(gè)文件保存上傳
您可能感興趣的文章:
相關(guān)文章
asp中記錄集對(duì)象的getrows和getstring用法分析
asp中記錄集對(duì)象的getrows和getstring用法分析,需要的朋友可以參考下2012-03-03
asp在IE瀏覽器中下載服務(wù)端上的各類文件的實(shí)現(xiàn)方法
asp在IE瀏覽器中下載服務(wù)端上的各類文件的實(shí)現(xiàn)方法...2007-11-11
Session.TimeOut的最大取值是1440,超出會(huì)報(bào)錯(cuò)
Session.TimeOut的取值以分鐘為單位,最大取值是1440分鐘,也就是24個(gè)小時(shí),如果給它賦一個(gè)更大的值2009-06-06
asp下利用fso實(shí)現(xiàn)文件夾或文件移動(dòng)改名等操作函數(shù)
以后利用fso來(lái)操作文件和文件夾就方便了2008-01-01
asp長(zhǎng)文章用分頁(yè)符來(lái)分頁(yè)顯示
照正常的文章系統(tǒng)一路做下去,后臺(tái)的文章添加,文章的檢索,和文章的詳細(xì)頁(yè),都是常規(guī)方式操作,這里不加描述,請(qǐng)參閱相關(guān)帖子。2008-11-11

