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

Import errors #41

Open
matreurai opened this issue May 17, 2023 · 2 comments
Open

Import errors #41

matreurai opened this issue May 17, 2023 · 2 comments

Comments

@matreurai
Copy link

matreurai commented May 17, 2023

I've been trying to run the tool for a while now, and it seems I can't manage to run it effectively.

I managed to install the thing with git clone and pip install.

image

But I still can't find a way to run the tool.

──(kali㉿kali)-[/bin/TrustTrees]
└─$ trusttrees -h       
Traceback (most recent call last):
  File "/usr/local/bin/trusttrees", line 5, in <module>
    from trusttrees.__main__ import main
  File "/usr/local/lib/python3.11/dist-packages/trusttrees/__main__.py", line 3, in <module>
    from .dns import enumerate_nameservers
  File "/usr/local/lib/python3.11/dist-packages/trusttrees/dns.py", line 14, in <module>
    from .utils import is_authoritative
  File "/usr/local/lib/python3.11/dist-packages/trusttrees/utils.py", line 9, in <module>
    from .registar_checking import is_domain_available
  File "/usr/local/lib/python3.11/dist-packages/trusttrees/registar_checking.py", line 5, in <module>
    import boto3
  File "/usr/local/lib/python3.11/dist-packages/boto3/__init__.py", line 16, in <module>
    from boto3.session import Session
  File "/usr/local/lib/python3.11/dist-packages/boto3/session.py", line 17, in <module>
    import botocore.session
  File "/usr/local/lib/python3.11/dist-packages/botocore/session.py", line 29, in <module>
    import botocore.configloader
  File "/usr/local/lib/python3.11/dist-packages/botocore/configloader.py", line 19, in <module>
    from botocore.compat import six
  File "/usr/local/lib/python3.11/dist-packages/botocore/compat.py", line 25, in <module>
    from botocore.exceptions import MD5UnavailableError
  File "/usr/local/lib/python3.11/dist-packages/botocore/exceptions.py", line 15, in <module>
    from botocore.vendored import requests
  File "/usr/local/lib/python3.11/dist-packages/botocore/vendored/requests/__init__.py", line 58, in <module>
    from . import utils
  File "/usr/local/lib/python3.11/dist-packages/botocore/vendored/requests/utils.py", line 26, in <module>
    from .compat import parse_http_list as _parse_list_header
  File "/usr/local/lib/python3.11/dist-packages/botocore/vendored/requests/compat.py", line 7, in <module>
    from .packages import chardet
  File "/usr/local/lib/python3.11/dist-packages/botocore/vendored/requests/packages/__init__.py", line 3, in <module>
    from . import urllib3
  File "/usr/local/lib/python3.11/dist-packages/botocore/vendored/requests/packages/urllib3/__init__.py", line 10, in <module>
    from .connectionpool import (
  File "/usr/local/lib/python3.11/dist-packages/botocore/vendored/requests/packages/urllib3/connectionpool.py", line 38, in <module>
    from .response import HTTPResponse
  File "/usr/local/lib/python3.11/dist-packages/botocore/vendored/requests/packages/urllib3/response.py", line 9, in <module>
    from ._collections import HTTPHeaderDict
  File "/usr/local/lib/python3.11/dist-packages/botocore/vendored/requests/packages/urllib3/_collections.py", line 1, in <module>
    from collections import Mapping, MutableMapping
ImportError: cannot import name 'Mapping' from 'collections' (/usr/lib/python3.11/collections/__init__.py)

I do have Python3 installed.

┌──(kali㉿kali)-[/bin/TrustTrees]
└─$ python --version      
Python 3.11.2
┌──(kali㉿kali)-[/bin/TrustTrees]
└─$ trusttrees.py --target example.com
trusttrees.py: command not found
┌──(kali㉿kali)-[/bin/TrustTrees]
└─$ ./trusttrees.py --target example.com
zsh: no such file or directory: ./trusttrees.py

Am I using the right command to run the tool ?
So far, I've tried as guest and as root : trusttrees.py --target example.com, trusttrees --target example.com and ./trusttrees.py --target example.com but none is working...

@time4tea
Copy link

The dependency list is no longer suitable for modern versions of python, you can update it like this (works as of today on Python 3.12)

requirements.txt

boto3==1.34.47
dnsimple==2.0.0
dnspython==2.6.1
pygraphviz==1.12
requests==2.31.0
tldextract==5.1.1
six==1.16.0
urllib3==2.2.1

@Anon-Exploiter
Copy link

Ran into the same issue. Try running the following:

pip3 install TrustTrees

# Upgrading packages to latest stable release
pip3 install requests boto3 botocore pygraphviz --upgrade

# The program should run now
trusttrees --help

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

3 participants