From 8061d1d70964a24120308e44a2a304f4cde79c1b Mon Sep 17 00:00:00 2001 From: laur sandu Date: Mon, 5 Feb 2024 23:27:08 +0200 Subject: [PATCH] Update DnsQuerifier.php --- src/DnsQuerifier.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/DnsQuerifier.php b/src/DnsQuerifier.php index b9bc347..dcedc25 100644 --- a/src/DnsQuerifier.php +++ b/src/DnsQuerifier.php @@ -60,7 +60,7 @@ public static function blacklistLookup($adressToCheck = null,$rbls = [],$blackli return false; $ipBlacklisted = false; foreach($rblsUris as $key => $rblUrl){ - $blacklisted = (new Dig($adressToCheck.'.'.$rblUrl))->setQueryServer($blacklist_dns_server)->loadDnsRecords(self::$TXT); + $blacklisted = (new Dig($adressToCheck.'.'.$rblUrl))->setQueryServer($blacklist_dns_server)->loadDnsRecords([self::$TXT,self::$A]); if($blacklisted->getEntries(self::$A)){ $listed = 'listed'; $ipBlacklisted = true; @@ -200,7 +200,7 @@ public function loadDnsRecords($type = null) { if(!$this->hostname) throw new \InvalidArgumentException('A domain name is required'); - $dnsRecordTypes = ($type) ? [$type] : array_keys($this->dnsRecordTypes); + $dnsRecordTypes = ($type) ? (!is_array($type)) ? [$type] : $type : array_keys($this->dnsRecordTypes); $this->rawDnsRecords = []; foreach($dnsRecordTypes as $dnstype){ $this->rawDnsRecords = array_merge($this->rawDnsRecords,$this->queryDns(strtoupper($dnstype)));