infosec-au / altdns

Generates permutations, alterations and mutations of subdomains and then resolves them
Apache License 2.0
2.26k stars 446 forks source link

problem in altdns.py #24

Closed shadihh9 closed 4 years ago

shadihh9 commented 4 years ago

when install tools and dont display altdns.py i cant find it and when use commond dont work

0xspade commented 4 years ago

how you install it?

You can install it by python -m pip install py-altdns && export PATH=$PATH:~/.local/bin

and try executing altdns -h

shadihh9 commented 4 years ago

i see this message Traceback (most recent call last): File "/usr/local/bin/altdns", line 6, in from altdns.main import main File "/usr/local/lib/python3.7/dist-packages/altdns/main.py", line 10, in from Queue import Queue as Queue ModuleNotFoundError: No module named 'Queue'

0xspade commented 4 years ago

Do this

python -m pip install py-altdns && export PATH=$PATH:~/.local/bin

shadihh9 commented 4 years ago

i do but the same problem

shadihh9 commented 4 years ago

Traceback (most recent call last): File "/usr/local/bin/altdns", line 6, in from altdns.main import main File "/usr/local/lib/python3.7/dist-packages/altdns/main.py", line 10, in from Queue import Queue as Queue ModuleNotFoundError: No module named 'Queue'

0xspade commented 4 years ago

hmm.. can you try this..

python3 -m pip uninstall py-altdns

shadihh9 commented 4 years ago

after that

shadihh9 commented 4 years ago

i think problem python 2.7 on kali linux

harleo commented 4 years ago

@shadihh9 and anyone running into the same problem, do this:

  1. Goto /usr/local/lib/python3.7/site-packages/altdns/
  2. Open __main__.py
  3. Change from Queue import Queue as Queue to from queue import Queue as Queue

That should resolve it.

m4xx101 commented 4 years ago

After doing the changes in main.py file

Change from Queue import Queue as Queue to from queue import Queue as Queue

I got following issue (In windows running Python 3.7.4 )

c:\users\91986\appdata\local\programs\python\python38\lib\site-packages\altdns\__main__.py:45: SyntaxWarning: "is not" with a literal. Did you mean "!="?
  if actual_sub[-1:] is not ".":
c:\users\91986\appdata\local\programs\python\python38\lib\site-packages\altdns\__main__.py:102: SyntaxWarning: "is not" with a literal. Did you mean "!="?
  if len(current_sub[0]) > 0 and actual_sub[:1] is not "-":
c:\users\91986\appdata\local\programs\python\python38\lib\site-packages\altdns\__main__.py:112: SyntaxWarning: "is not" with a literal. Did you mean "!="?
  if actual_sub[-1:] is not "-":
c:\users\91986\appdata\local\programs\python\python38\lib\site-packages\altdns\__main__.py:175: SyntaxWarning: "is" with a literal. Did you mean "=="?
  if len(result) is 1:
usage: altdns [-h] -i INPUT -o OUTPUT [-w WORDLIST] [-r] [-n] [-e] [-d DNSSERVER] [-s SAVE] [-t THREADS]

optional arguments:
  -h, --help            show this help message and exit
  -i INPUT, --input INPUT
                        List of subdomains input
  -o OUTPUT, --output OUTPUT
                        Output location for altered subdomains
  -w WORDLIST, --wordlist WORDLIST
                        List of words to alter the subdomains with
  -r, --resolve         Resolve all altered subdomains
  -n, --add-number-suffix
                        Add number suffix to every domain (0-9)
  -e, --ignore-existing
                        Ignore existing domains in file
  -d DNSSERVER, --dnsserver DNSSERVER
                        IP address of resolver to use (overrides system default)
  -s SAVE, --save SAVE  File to save resolved altered subdomains to
  -t THREADS, --threads THREADS
                        Amount of threads to run simultaneously
infosec-au commented 4 years ago

I've merged in a PR that resolves this. Thanks for all the help here.

ghost commented 4 years ago

++ replacing from queue import Queue as Queue to from multiprocessing import Queue in Pyton 3 (Kali) also works with this error

shabbadont commented 3 years ago

I've merged in a PR that resolves this. Thanks for all the help here.

Doesn't work. Syntax error messages

yahaya1002 commented 1 year ago

i dont why is show that when i try to run th software: Traceback (most recent call last): File "/usr/bin/altdns", line 33, in sys.exit(load_entry_point('py-altdns==1.0.2', 'console_scripts', 'altdns')()) File "/usr/bin/altdns", line 25, in importlib_load_entry_point return next(matches).load() File "/usr/lib/python3.10/importlib/metadata/init.py", line 171, in load module = import_module(match.group('module')) File "/usr/lib/python3.10/importlib/init.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 1050, in _gcd_import File "", line 1027, in _find_and_load File "", line 1006, in _find_and_load_unlocked File "", line 688, in _load_unlocked File "", line 883, in exec_module File "", line 241, in _call_with_frames_removed File "/home/yahaya/.local/lib/python3.10/site-packages/altdns/main.py", line 15, in import tldextract File "/usr/lib/python3/dist-packages/tldextract/init.py", line 3, in from .tldextract import extract, TLDExtract File "/usr/lib/python3/dist-packages/tldextract/tldextract.py", line 61, in from .suffix_list import get_suffix_lists File "/usr/lib/python3/dist-packages/tldextract/suffix_list.py", line 7, in import requests File "/home/yahaya/.local/lib/python3.10/site-packages/requests/init.py", line 64, in from . import utils File "/home/yahaya/.local/lib/python3.10/site-packages/requests/utils.py", line 28, in from .cookies import RequestsCookieJar, cookiejar_from_dict File "/home/yahaya/.local/lib/python3.10/site-packages/requests/cookies.py", line 164, in class RequestsCookieJar(cookielib.CookieJar, collections.MutableMapping): AttributeError: module 'collections' has no attribute 'MutableMapping'