Rename 'nameserver' to 'nameservers' for consistency

Updated variable naming from 'nameserver' to 'nameservers' across dnssearch and hostchecker modules to ensure consistency and clarity. This change aligns the naming convention with its pluralized usage, improving code readability.
This commit is contained in:
L1ghtn1ng
2025-05-26 23:58:10 +01:00
parent 7e68c0ffd1
commit e71041f0dc
2 changed files with 5 additions and 5 deletions
+1 -1
View File
@@ -39,7 +39,7 @@ class DnsForce:
async def run(self):
print(f'Starting DNS brute forcing with {len(self.list)} words')
checker = hostchecker.Checker(self.list, nameserver=self.dnsserver)
checker = hostchecker.Checker(self.list, nameservers=self.dnsserver)
resolved_pair, hosts, ips = await checker.check()
return resolved_pair, hosts, ips
+4 -4
View File
@@ -15,11 +15,11 @@ import aiodns
class Checker:
def __init__(self, hosts: list, nameserver: list) -> None:
def __init__(self, hosts: list, nameservers: list) -> None:
self.hosts = hosts
self.realhosts: list = []
self.addresses: set = set()
self.nameserver = nameserver
self.nameservers = nameservers
# @staticmethod
# async def query(host, resolver) -> Tuple[str, Any]:
@@ -64,8 +64,8 @@ class Checker:
loop = asyncio.get_event_loop()
resolver = (
aiodns.DNSResolver(loop=loop, timeout=8)
if len(self.nameserver) == 0
else aiodns.DNSResolver(loop=loop, timeout=8, nameservers=self.nameserver)
if len(self.nameservers) == 0
else aiodns.DNSResolver(loop=loop, timeout=8, nameservers=self.nameservers)
)
all_results = set()
for chunk in self.chunks(self.hosts, 50):