现在的站长痛经的事情,应该是服务器被DDOS攻击了,我一朋友管理的某政府网站,也遭殃了DDos攻击求助,这个黑客胆子够肥的。
服务器IIS日志都有1G多,HTTPERR日志几十G,把硬盘爆棚了!
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\HTTP\Parameters]
在右边 点鼠标右键 新建dword值 EnableErrorLogging 重新启动服务器就可以了
"EnableErrorLogging"=dword:00000000
targeturl = "/index.html" '受攻击网站的URL地址。
logfilepath = "C:\WINDOWS\system32\LogFiles\W3SVC1\ex120526.log" '受攻击网站的日志路径。
On Error Resume Next
Set fileobj = CreateObject("scripting.filesystemobject")
Set fileobj2 = CreateObject("scripting.filesystemobject")
Set myfile = fileobj2.opentextfile(logfilepath, 1, False)
myline = myfile.readline()
myline2 = Split(myline, " ")
newip = myline2(9)
myurl = myline2(5)
If targeturl = myurl Then
writelog newip
End If
Loop
Set fileobj2 = Nothing
Msgbox "结束."
ipfilename = "ip.txt"
Set logfile = fileobj.opentextfile(ipfilename, 8, True)
logfile.writeline errmes
logfile.Close
Set logfile = Nothing
End Sub
'代码结束
@net start PolicyAgent
@for /f %%i in (ip.txt) do (ipseccmd -w REG -p "DDosStop" -r "%%i" -f %%i/255.255.255.255=0/255.255.255.255:: -n BLOCK -x)








