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

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

 更新時間: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

相關文章

最新評論

辽阳县| 定结县| 洛扎县| 济阳县| 吴江市| 阳曲县| 泰宁县| 呼伦贝尔市| 澄城县| 阿拉善右旗| 濮阳县| 祁连县| 霍林郭勒市| 吉林省| 巧家县| 孝义市| 西峡县| 吴旗县| 广州市| 新余市| 察隅县| 怀远县| 绵竹市| 麟游县| 兴隆县| 西和县| 石泉县| 万山特区| 麻城市| 吉木萨尔县| 怀化市| 永宁县| 通河县| 南和县| 仙居县| 始兴县| 柞水县| 沁水县| 社会| 南江县| 客服|