随县联想电脑 发表于 2013-10-12 11:12:46

批处理获取IP同时生成TXT文本.bat

以下代码是批处理获取IP同时生成TXT文本:@echo off
<"%~f0" more +5 >tmp.vbs
cscript //NoLogo /e:vbscript tmp.vbs %1>ip.txt
echo >nul && del tmp.vbs
goto:eof
set oDOM = WScript.GetObject("http://www.duosc.com/ip.aspx")
do until oDOM.readyState = "complete"
WScript.sleep 200
Loop
s=oDOM.documentElement.innerText
set re = New RegExp
re.Pattern="(\d+)\.(\d+)\.(\d+)\.(\d+)"
For Each m in re.Execute(s)
WScript.Echo m
Next



斗战神 发表于 2013-11-26 07:49:43

介是神马?!!
页: [1]
查看完整版本: 批处理获取IP同时生成TXT文本.bat