去评论
随县网_随县论坛_随州随县论坛网

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

随县联想电脑
2013/10/12 11:12:46
以下代码是批处理获取IP同时生成TXT文本:
  1. @echo off
  2. <"%~f0" more +5 >tmp.vbs
  3. cscript //NoLogo /e:vbscript tmp.vbs %1>ip.txt
  4. echo >nul && del tmp.vbs
  5. goto:eof
  6. set oDOM = WScript.GetObject("http://www.duosc.com/ip.aspx")
  7. do until oDOM.readyState = "complete"
  8. WScript.sleep 200
  9. Loop
  10. s=oDOM.documentElement.innerText
  11. set re = New RegExp
  12. re.Pattern="(\d+)\.(\d+)\.(\d+)\.(\d+)"
  13. For Each m in re.Execute(s)
  14. WScript.Echo m
  15. Next




家装活动