- @echo off
- more +9 "%~f0" >GetUrlText.vbs
- type nul >2.txt
- for /f %%a in (1.txt) do (
- echo 正在检测:%%a
- cscript //nologo GetUrlText.vbs http://%%a/123.asp | findstr "<title>你好你好</title>" && >>2.txt echo,%%a
- )
- goto :eof
-
- strURL=WScript.Arguments(0)
- WScript.Echo strURL
- Set objXmlHttp = CreateObject("Microsoft.XMLHTTP")
- objXmlHttp.Open "GET",strURL,0
- objXmlHttp.Send()
- Set objStream = CreateObject("ADODB.Stream")
- objStream.Mode = 3
- objStream.Type = 1
- objStream.Open()
- objStream.Write(objXmlHttp.responsebody)
- objStream.Position = 0
- objStream.Type = 2
- objStream.Charset = "utf-8"
- strText = objStream.Readtext
- WScript.Echo strText
复制代码 可能有些站没反映,或者被卡死的,他就会卡在那不动了,想让他5秒钟没反映跳到下一个去检测 |