Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add empty subdomains if there is no result key #219

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

xyzkab
Copy link

@xyzkab xyzkab commented Dec 29, 2017

 [+] Extracting subdomains from DNSTrails

Traceback (most recent call last):
  File "datasploit.py", line 112, in <module>
    main(sys.argv[1:])
  File "datasploit.py", line 68, in main
    auto_select_target(single_input, output)
  File "datasploit.py", line 104, in auto_select_target
    domainOsint.run(target, output)
  File "/l33t/tools/datasploit/domainOsint.py", line 9, in run
    osint_runner.run("domain", "domain", domain, output)
  File "/l33t/tools/datasploit/osint_runner.py", line 28, in run
    data = x.main(m_input)
  File "/l33t/tools/datasploit/domain/domain_subdomains.py", line 181, in main
    subdomain_list = subdomains_from_dnstrails(domain, subdomain_list)
  File "/l33t/tools/datasploit/domain/domain_subdomains.py", line 160, in subdomains_from_dnstrails
    if 'subdomains' in data['result'] and len(data['result']['subdomains']) != 0:
KeyError: 'result'

the error occur when running with input single target python datasploit.py -i targetdomain it seems like when dnstrails cannot find any sub-domains in the target, the result key in data variable is not exist so it fails when checking subdomains key

Copy link

@Chan9390 Chan9390 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. But have to change it in the future if some other functionality is using contents of data.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants