update
This commit is contained in:
parent
1f1ad49427
commit
6f050a029e
2496 changed files with 37609 additions and 3031 deletions
|
|
@ -6,14 +6,14 @@ ClassMethod QueryDNS(pHost As %String, Output ip As %List) As %Status
|
|||
// some initialisation
|
||||
Set ip=$ListBuild()
|
||||
|
||||
// check input and host operating system
|
||||
If $Match(pHost, "^([a-zA-Z0-9]([a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,6}$")=0 {
|
||||
Quit $$$ERROR($$$GeneralError, "Invalid host name.")
|
||||
}
|
||||
// check host operating system and input parameters
|
||||
Set os=$Case($ZVersion(1), 1: "vms", 2: "win", 3: "*nx", : "")
|
||||
If (os="vms")||(os="") Quit $$$ERROR($$$GeneralError, "Not implemented.")
|
||||
If os="win" Set cmd="nslookup "_pHost
|
||||
If os="*nx" Set cmd="host "_pHost
|
||||
If $Match(pHost, "^([a-zA-Z0-9]([a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,6}$")=0 {
|
||||
Quit $$$ERROR($$$GeneralError, "Invalid host name.")
|
||||
}
|
||||
|
||||
// enable end-of-file flagging
|
||||
Do $System.Process.SetZEOF(1)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue