最新国产好看的视频,伊人天堂AV在线,国产Aaaaaa视频,蜜臀视频在线观看一区,人妻av色图,密臀久久久精品影片,青青视频免费观看毛片,久草在线观看视,国产三级精品色情在线

清空iis log 中自己登錄ip的vbs

 更新時(shí)間:2006年10月28日 00:00:00   作者:  
Option Explicit

Dim sourcefile,ipaddress,objargs

const destfile="tempfile"
Const ForWriting = 2

Dim Text
Dim fso,objNet,ServiceObj
Dim txtStream, txtStreamOut

Set objArgs = WScript.Arguments
If objArgs.Count = 2 Then
sourcefile=objArgs(0)
ipaddress=objargs(1)
Else
wscript.echo "Parameter Error"+ vbcrlf
wscript.Echo "USAGE:KillLog.vbs LogFileName YourIP."
wscript.Quit 1
End If


Set fso = CreateObject("Scripting.FileSystemObject")
if fso.FileExists (sourcefile) then
Set objNet = WScript.CreateObject( "WScript.Network" )
Set ServiceObj = GetObject("WinNT://" & objNet.ComputerName & "/w3svc")
Set objNet=nothing
ServiceObj.stop
wscript.sleep 6000
Set txtStream = fso.OpenTextFile(sourcefile)
Set txtStreamOut = fso.OpenTextFile(destfile, ForWriting, True)
Do While Not (txtStream.atEndOfStream)
Text = txtStream.ReadLine
if instr(Text,ipaddress)=0 then
txtStreamOut.WriteLine Text
end if
Loop

Set txtStream = Nothing
Set txtStreamOut = Nothing

WScript.Echo "The log file-- " & sourcefile &" has cleaned your IP!"
Else
WScript.Echo "The Log file-- " & sourcefile & " has not found!"
Wscript.quit
End If
fso.Copyfile destfile, sourcefile
fso.deletefile destfile
Set fso=Nothing
ServiceObj.start
Set ServiceObj = Nothing

相關(guān)文章

最新評(píng)論

湖口县| 洛宁县| 本溪| 时尚| 当阳市| 顺平县| 济南市| 阿拉尔市| 镇平县| 信宜市| 两当县| 大田县| 桑日县| 南安市| 南丰县| 凤庆县| 翼城县| 阿拉善盟| 滨海县| 陵水| 孝感市| 鄢陵县| 咸宁市| 仙游县| 健康| 易门县| 永川市| 玉林市| 敖汉旗| 洛川县| 乐陵市| 柞水县| 金沙县| 丰顺县| 和龙市| 普陀区| 来宾市| 句容市| 五华县| 都匀市| 河津市|