国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 編程 > VBScript > 正文

ipclear.vbs源代碼

2019-10-26 17:57:57
字體:
來源:轉載
供稿:網友
復制代碼 代碼如下:

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


發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表

圖片精選

主站蜘蛛池模板: 扎囊县| 宣武区| 任丘市| 台北市| 江华| 安徽省| 双峰县| 陵水| 米脂县| 泾川县| 鸡泽县| 麻城市| 城步| 革吉县| 泊头市| 吉木萨尔县| 张北县| 海口市| 六盘水市| 济阳县| 海安县| 永嘉县| 遂川县| 寿光市| 岳西县| 镇巴县| 来宾市| 濉溪县| 荥经县| 兴化市| 昂仁县| 印江| 广德县| 枣庄市| 康乐县| 张北县| 常州市| 四子王旗| 浙江省| 阳原县| 华坪县|