Skip to content

Commit

Permalink
Update DnsQuerifier.php
Browse files Browse the repository at this point in the history
  • Loading branch information
Sapistudio authored Feb 5, 2024
1 parent 6d7a2a1 commit 8061d1d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/DnsQuerifier.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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)));
Expand Down

0 comments on commit 8061d1d

Please sign in to comment.