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

Problem with domain_emailhunter.py #266

Open
DocKali opened this issue Aug 28, 2018 · 2 comments
Open

Problem with domain_emailhunter.py #266

DocKali opened this issue Aug 28, 2018 · 2 comments

Comments

@DocKali
Copy link

DocKali commented Aug 28, 2018

Please provide the following details.

Host System

  • OS : Kali 2018.3
  • Python version (python --version) : 2.7.15

Error Description

Please provide the details of the error. Try to provide the output and also steps to reproduce (if possible).
For some domain, I obtain the following Traceback :

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 "/usr/toolz/datasploit/domainOsint.py", line 9, in run
    osint_runner.run("domain", "domain", domain, output)
  File "/usr/toolz/datasploit/osint_runner.py", line 30, in run
    x.output(data, m_input)
  File "/usr/toolz/datasploit/domain/domain_emailhunter.py", line 51, in output
    if type(data) == list and data[1] == "INVALID_API":
IndexError: list index out of range

I don't understand why I have this error for some domains and not for others, how to solve this?

@jx6f
Copy link

jx6f commented Sep 21, 2018

I was in the same boat. Following patch works for me.

diff --git a/domain/domain_emailhunter.py b/domain/domain_emailhunter.py
index ab255fe..c209ea9 100755
--- a/domain/domain_emailhunter.py
+++ b/domain/domain_emailhunter.py
@@ -48,7 +48,7 @@ def main(domain):
 
 
 def output(data, domain=""):
-    if type(data) == list and data[1] == "INVALID_API":
+    if type(data) == list and len(data) >= 2 and data[1] == "INVALID_API":
             print colored(
                 style.BOLD + '\n[-] Emailhunter API key not configured, skipping Email Search.\nPlease refer to http://datasploit.readthedocs.io/en/latest/apiGeneration/.\n' + style.END, 'red')
     else:

@DocKali
Copy link
Author

DocKali commented Oct 3, 2018

Thanks for your patch @jx6f it seems it works well in my case. Now I'm facing a new problem, same as #271
But it's another story!

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

No branches or pull requests

2 participants