Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- let lookupNS hostname =
- let procInfo = ProcessStartInfo("nslookup",
- sprintf "-querytype=NS %s" hostname,
- RedirectStandardOutput=true,
- RedirectStandardError=true,
- UseShellExecute=false)
- let result = Process.Start(procInfo).StandardOutput.ReadToEnd()
- Regex.Matches(result, "nameserver\s+=\s+(?<ns>[\w-\.]*)")
- |> Seq.cast<Match>
- |> Seq.map(fun m -> m.Groups.Item("ns").Value)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement