本帖最后由 pcl_test 于 2017-6-15 19:42 编辑
- @echo off
- more /e +12 %0 >"%temp%\down.vbs"
- wscript //b "%temp%\down.vbs" "http://1212.ip138.com/ic.asp" "%temp%\ip.txt"
- if not errorlevel 99 echo vbs错误 & goto end
- FOR /F "usebackq tokens=2 delims=[]" %%i in ("%temp%\ip.txt") do (if "%%i"=="" (set "ip=ip138.com源码已变更。") else (set ip=%%i))
- for /f "usebackq tokens=2 delims=]" %%a in ("%temp%\ip.txt") do (for /f "delims=<" %%b in ("%%a") do set "ad=%%b")
- echo.%ad% %ip%
- del /q "%temp%\ip.txt"
- :end
- del /q "%temp%\down.vbs"
- pause&exit
-
- With CreateObject("msxml2.Serverxmlhttp")
- .open "get",WScript.Arguments.Item(0),False
- .send
- temp = .responseBody
- End With
- With CreateObject("adodb.stream")
- .Type = 1:.Mode = 3
- .Open()
- .Write(temp)
- .SaveToFile WScript.Arguments.Item(1),2
- .Close
- End With
- Wscript.Quit (99)
复制代码
|