DNS query: Difference between revisions

m
Line 175:
Set ip=$ListBuild()
// check input and host operating system and input parameters
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.")
}
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