-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathsubduer.py
43 lines (32 loc) · 1.32 KB
/
subduer.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#!/usr/bin/python
import argparse
import asyncio
from sources.crtsh.crtsh_subdomain_client import CrtshSubdomainClient
from sources.dnsdumpster.dnsdumpster_subdomain_client import DnsdumpsterSubdomainClient
from render.logo_render import print_logo
from render.results_render import print_results
from report.results_saver import save_results
from sources.merklemap.merklemap_subdomain_client import MerklemapSubdomainClient
from sources.source_service import get_results
from sources.virustotal.virustotal_subdomain_client import VirusTotalSubdomainClient
async def main():
parser = argparse.ArgumentParser("subduer.py")
parser.add_argument("domain", help="Domain to search", type=str)
parser.add_argument("--report", help="Save .json and .csv report", required=False, action="store_true")
args = parser.parse_args()
domain = args.domain
print_logo()
providers = [
DnsdumpsterSubdomainClient(),
VirusTotalSubdomainClient(),
MerklemapSubdomainClient(),
CrtshSubdomainClient()
]
results = await get_results(domain, providers)
print_results(results, domain)
if args.report:
save_results(results, domain)
if __name__ == "__main__":
loop = asyncio.new_event_loop()
asyncio.set_event_loop(loop)
loop.run_until_complete(main())