Skip to content

Commit

Permalink
laramies#1383 fix takeover.py
Browse files Browse the repository at this point in the history
  • Loading branch information
yoonthegoon committed Jul 24, 2023
1 parent 31bacdf commit fef8396
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions theHarvester/discovery/takeover.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ def __init__(self, hosts) -> None:
# NOTE THIS MODULE IS ACTIVE RECON
self.hosts = hosts
self.proxy = False
self.fingerprints = dict()
self.fingerprints: dict[str, str] = dict()
# https://stackoverflow.com/questions/33080869/python-how-to-create-a-dict-of-dict-of-list-with-defaultdict
self.results = defaultdict(list)
self.results: defaultdict[str, list] = defaultdict()

async def populate_fingerprints(self):
# Thank you to https://github.com/EdOverflow/can-i-take-over-xyz for these fingerprints
Expand Down Expand Up @@ -96,7 +96,7 @@ async def do_take(self) -> None:
tup_resps = await AsyncFetcher.fetch_all(
all_hosts, takeover=True, proxy=self.proxy
)
tup_resps = [tup for tup in tup_resps if len(tup[1]) >= 1]
tup_resps = *(tup for tup in tup_resps if len(tup[1]) >= 1),

This comment has been minimized.

Copy link
@yoonthegoon

yoonthegoon Jul 24, 2023

Author Owner

Error: Incompatible types in assignment (expression has type "list[Any]", variable has type "tuple[Any, ...]") [assignment]
tup_resps needs to either remain a tuple or be a list from the start.
I didn't feel like renaming anything, so I went with the former.

Explanation:

*Iterable,

* unpacks the Iterable.
, creates a tuple from the parenthesized expression.

for url, resp in tup_resps:
await self.check(url, resp)
else:
Expand Down

0 comments on commit fef8396

Please sign in to comment.