forked from laramies/theHarvester
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add new fullhunt module (laramies#894)
- Loading branch information
Showing
5 changed files
with
49 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,6 +9,9 @@ apikeys: | |
id: | ||
secret: | ||
|
||
fullhunt: | ||
key: | ||
|
||
github: | ||
key: | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
from theHarvester.discovery.constants import * | ||
from theHarvester.lib.core import * | ||
|
||
|
||
class SearchFullHunt: | ||
|
||
def __init__(self, word): | ||
self.word = word | ||
self.key = Core.fullhunt_key() | ||
if self.key is None: | ||
raise MissingKey('fullhunt') | ||
self.total_results = None | ||
self.proxy = False | ||
|
||
async def do_search(self): | ||
url = f'https://fullhunt.io/api/v1/domain/{self.word}/subdomains' | ||
response = await AsyncFetcher.fetch_all([url], json=True, headers={'User-Agent': Core.get_user_agent(), | ||
'X-API-KEY': self.key}, | ||
proxy=self.proxy) | ||
self.total_results = response[0]['hosts'] | ||
|
||
async def get_hostnames(self) -> set: | ||
return self.total_results | ||
|
||
async def process(self, proxy=False): | ||
self.proxy = proxy | ||
await self.do_search() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters