Unverified 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)) { ...@@ -112,14 +112,23 @@ while ($row = pg_fetch_assoc($result)) {
_debug('Signup Open', $signup); _debug('Signup Open', $signup);
$ip = dns_get_record($_domain, DNS_A)[0]['ip'] ?? null; $iplookupv4 = [];
$ipv6 = dns_get_record($_domain, DNS_AAAA)[0]['ipv6'] ?? null; exec(escapeshellcmd('delv @' . $dnsserver . ' ' . $domain), $iplookupv4);
if ($iplookupv4) {
$iplookup = []; _debug('Iplookupv4', $iplookupv4, true);
exec(escapeshellcmd('delv @' . $dnsserver . ' ' . $domain), $iplookup); $dnssec = in_array('; fully validated', $iplookupv4, true) ?? false;
if ($iplookup) { $getaonly = array_values(preg_grep('/\s+IN\s+A\s+.*/', $iplookupv4));
_debug('Iplookup', $iplookup, true); preg_match('/A\s(.*)/', $getaonly[0], $aversion);
$dnssec = in_array('; fully validated', $iplookup, true) ?? false; $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; $ip || $score -= 2;
......
...@@ -97,7 +97,7 @@ $numrows = pg_num_rows($result); ...@@ -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_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>'; $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>'; 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> </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