Commit a22762f8 authored by dmorley's avatar dmorley

back to old ip lookup, use delv for both.

parent 7b233d54
......@@ -112,14 +112,23 @@ while ($row = pg_fetch_assoc($result)) {
_debug('Signup Open', $signup);
$ip = dns_get_record($_domain, DNS_A)[0]['ip'] ?? null;
$ipv6 = dns_get_record($_domain, DNS_AAAA)[0]['ipv6'] ?? null;
$iplookup = [];
exec(escapeshellcmd('delv @' . $dnsserver . ' ' . $domain), $iplookup);
if ($iplookup) {
_debug('Iplookup', $iplookup, true);
$dnssec = in_array('; fully validated', $iplookup, true) ?? false;
$iplookupv4 = [];
exec(escapeshellcmd('delv @' . $dnsserver . ' ' . $domain), $iplookupv4);
if ($iplookupv4) {
_debug('Iplookupv4', $iplookupv4, true);
$dnssec = in_array('; fully validated', $iplookupv4, true) ?? false;
$getaonly = array_values(preg_grep('/\s+IN\s+A\s+.*/', $iplookupv4));
preg_match('/A\s(.*)/', $getaonly[0], $aversion);
$ip = trim($aversion[1]);
}
$iplookupv6 = [];
exec(escapeshellcmd('delv @' . $dnsserver . ' ' . $domain . ' AAAA '), $iplookupv6);
if ($iplookupv6) {
_debug('Iplookupv6', $iplookupv6, true);
$dnssec = in_array('; fully validated', $iplookupv6, true) ?? false;
$getaaaaonly = array_values(preg_grep('/\s+IN\s+AAAA\s+.*/', $iplookupv6));
preg_match('/A\s(.*)/', $getaaaaonly[0], $aaaaversion);
$ipv6 = trim($aaaaversion[1]);
}
$ip || $score -= 2;
......
......@@ -97,7 +97,7 @@ $numrows = pg_num_rows($result);
$row['service_wordpress'] === 't' && print '<div class="smlogo smlogo-wordpress" title="Publish to WordPress"></div>';
$row['service_xmpp'] === 't' && print '<div class="smlogo smlogo-xmpp"><img src="/images/icon-xmpp.png" width="16" height="16" title="XMPP chat server" alt="XMPP chat server"></div>';
echo '</td>';
$row['terms'] === 't' ? print '<td><a href="https://' . $row['domain'] . $row['terms'] . '">&#128279;</a></td></tr>' : print '<td></td></tr>';
echo '<td>' . ($row['terms'] ? '<a href="https://' . $row['domain'] . $row['terms'] . '">&#128279;</a>' : '&nbsp;') . '</td>';
}
?>
</tbody>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment