基础资料
- 主题:
- 积分:3815
- 帖子:0
- 金币:
- 精华:
- 关注:
- 粉丝:
|
以下代码是批处理获取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
复制代码
|
|