Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
16
Task/DNS-query/VBScript/dns-query.vb
Normal file
16
Task/DNS-query/VBScript/dns-query.vb
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
Function dns_query(url,ver)
|
||||
Set r = New RegExp
|
||||
r.Pattern = "Pinging.+?\[(.+?)\].+"
|
||||
Set objshell = CreateObject("WScript.Shell")
|
||||
Set objexec = objshell.Exec("%comspec% /c " & "ping -" & ver & " " & url)
|
||||
WScript.StdOut.WriteLine "URL: " & url
|
||||
Do Until objexec.StdOut.AtEndOfStream
|
||||
line = objexec.StdOut.ReadLine
|
||||
If r.Test(line) Then
|
||||
WScript.StdOut.WriteLine "IP Version " &_
|
||||
ver & ": " & r.Replace(line,"$1")
|
||||
End If
|
||||
Loop
|
||||
End Function
|
||||
|
||||
Call dns_query(WScript.Arguments(0),WScript.Arguments(1))
|
||||
Loading…
Add table
Add a link
Reference in a new issue