mirror of
https://github.com/laramies/theHarvester.git
synced 2025-02-25 23:13:24 +08:00
Rename / remove ambiguous names
This commit is contained in:
parent
11acf9c47c
commit
8a267e7a3c
2 changed files with 9 additions and 8 deletions
|
@ -484,7 +484,6 @@ async def handler(lst):
|
|||
if not analyzed_ranges.count(ip_range):
|
||||
print('[*] Performing reverse lookup in ' + ip_range)
|
||||
a = dnssearch.DnsReverse(ip_range, True)
|
||||
a.list()
|
||||
res = a.process()
|
||||
analyzed_ranges.append(ip_range)
|
||||
else:
|
||||
|
|
|
@ -2,6 +2,8 @@
|
|||
import dns.resolver
|
||||
import dns.reversename
|
||||
|
||||
from typing import List
|
||||
|
||||
# TODO: need big focus on performance and results parsing, now does the basic.
|
||||
|
||||
|
||||
|
@ -69,22 +71,22 @@ def __init__(
|
|||
self.iprange = iprange
|
||||
self.verbose = verbose
|
||||
|
||||
def list(
|
||||
self) -> list:
|
||||
def _list_ips_in_range(
|
||||
self) -> List[str]:
|
||||
"""
|
||||
List all the IPs in the range.
|
||||
They are stored in self.list.
|
||||
|
||||
Parameters
|
||||
----------
|
||||
|
||||
Returns
|
||||
-------
|
||||
out: None.
|
||||
out: list.
|
||||
The list of IPs in the range.
|
||||
"""
|
||||
prefix = '.'.join(
|
||||
self.iprange.split('.')[:-1])
|
||||
self.list = [prefix + '.' + str(i) for i in range(256)]
|
||||
return [prefix + '.' + str(i) for i in range(256)]
|
||||
|
||||
def run(
|
||||
self,
|
||||
|
@ -118,7 +120,7 @@ def run(
|
|||
pass
|
||||
|
||||
def process(
|
||||
self) -> list:
|
||||
self) -> List[str]:
|
||||
"""
|
||||
Reverse all the IPs stored in 'self.list'.
|
||||
|
||||
|
@ -131,7 +133,7 @@ def process(
|
|||
The list of all the found CNAME records.
|
||||
"""
|
||||
results = []
|
||||
for entry in self.list:
|
||||
for entry in self._list_ips_in_range():
|
||||
host = self.run(entry)
|
||||
if host is not None:
|
||||
# print(' : ' + host.split(':')[1])
|
||||
|
|
Loading…
Reference in a new issue