Dashes possible in domain name
This commit is contained in:
@@ -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 );
|
||||
|
||||
Reference in New Issue
Block a user