mirror of
https://github.com/danog/dns.git
synced 2024-11-30 04:29:06 +01:00
parent
6924079756
commit
45ab9b512b
@ -367,10 +367,16 @@ REGEX;
|
||||
if ($nameserver === "") {
|
||||
$subKeys = (yield $reader->listKeys("HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Services\\Tcpip\\Parameters\\Interfaces"));
|
||||
|
||||
while ($nameserver === "" && ($key = array_shift($subKeys))) {
|
||||
try {
|
||||
$nameserver = (yield $reader->read("{$key}\\NameServer"));
|
||||
} catch (KeyNotFoundException $e) { }
|
||||
foreach ($subKeys as $key) {
|
||||
foreach (["NameServer", "DhcpNameServer"] as $property) {
|
||||
try {
|
||||
$nameserver = (yield $reader->read("{$key}\\{$property}"));
|
||||
|
||||
if ($nameserver !== "") {
|
||||
break 2;
|
||||
}
|
||||
} catch (KeyNotFoundException $e) { }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user