Dashes possible in domain name

This commit is contained in:
2017-09-21 16:57:41 +02:00
parent 6a46083bec
commit ca7f5f0584

View File

@@ -78,7 +78,7 @@ function show_whois($target) {
echo "<h2>WHOIS</h2>\n";
if(preg_match('/^(?!\-)(?:[a-zA-Z\d\-]{0,62}[a-zA-Z\d]\.){1,126}(?!\d+)[a-zA-Z\d]{1,63}$/', $target)) {
// if domain, skip subdomains
preg_match('/[a-zA-Z\d]+\.[a-zA-Z\d]+$/', $target, $m);
preg_match('/[a-zA-Z\d\-]+\.[a-zA-Z\d]+$/', $target, $m);
$target = $m[0];
}
$whois = shell_exec("whois " . $target );