Advertisement
Guest User

Untitled

a guest
Jan 29th, 2017
243
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. dim o_msxml3 : set o_msxml3 = CreateObject("MSXML2.XMLHTTP.3.0")
  2. a_addresses = Array( "127.0.0.1:44", "http://192.168.0.1:444", "192.168.1.3:80", "192.168.1.2:44")
  3.  
  4. for each address in a_addresses
  5.   wscript.echo address & " - " & Test(address)
  6. next
  7.  
  8. Function Test(s_address)
  9.  
  10.     on error resume next
  11.    
  12.     o_msxml3.open "GET", s_address, false
  13.     o_msxml3.send
  14.    
  15.     if err.Number <> 0 then
  16.       Test = "No Reply"
  17.       exit function
  18.     end if
  19.        
  20.     select case o_msxml3.status
  21.       case "200"
  22.         Test = "200:OK"
  23.       case "301"
  24.         Test = "301:OK"
  25.       case else
  26.         Test = o_msxml3.status & ":No Reply"
  27.     end select
  28.    
  29. end function
  30.  
  31. set o_msxml3 = nothing
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement