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

i was trying to run tplmap i got this error #64

Closed
GENES6UFOMZY opened this issue May 8, 2020 · 15 comments
Closed

i was trying to run tplmap i got this error #64

GENES6UFOMZY opened this issue May 8, 2020 · 15 comments

Comments

@GENES6UFOMZY
Copy link

running the command below I got the error below, please how do I go about resolving this

./tplmap.py -u 'http://X.X.X.X/login?next='

Traceback (most recent call last):
File "./tplmap.py", line 3, in
from core import checks
File "/home/kali/tplmap/core/checks.py", line 1, in
from plugins.engines.mako import Mako
File "/home/kali/tplmap/plugins/engines/mako.py", line 1, in
from plugins.languages import python
File "/home/kali/tplmap/plugins/languages/python.py", line 2, in
from core.plugin import Plugin
File "/home/kali/tplmap/core/plugin.py", line 3, in
from utils.loggers import log
File "/home/kali/tplmap/utils/loggers.py", line 4, in
import utils.config
File "/home/kali/tplmap/utils/config.py", line 3, in
import yaml
ImportError: No module named yaml

@epinna
Copy link
Owner

epinna commented May 10, 2020

You have to install the requirements, run

pip install -r requirements.txt

@epinna epinna closed this as completed May 10, 2020
@EricoCartmanez
Copy link

EricoCartmanez commented Jul 7, 2020

Hi, requirements are installed but yet:

root@kali:~/tplmap# ./tplmap.py 

Traceback (most recent call last):
  File "./tplmap.py", line 3, in <module>
    from core import checks
  File "/tplmap/core/checks.py", line 1, in <module>
    from plugins.engines.mako import Mako
  File "/tplmap/plugins/engines/mako.py", line 1, in <module>
    from plugins.languages import python
  File "/tplmap/plugins/languages/python.py", line 2, in <module>
    from core.plugin import Plugin
  File "/tplmap/core/plugin.py", line 3, in <module>
    from utils.loggers import log
  File "/tplmap/utils/loggers.py", line 4, in <module>
    import utils.config
  File "/tplmap/utils/config.py", line 3, in <module>
    import yaml
ImportError: No module named yaml

Actually removed one requirement (wsgiref) from the list which wouldn't install correctly. After googling I considered it as already installed by default, but maybe I was wrong..

collecting wsgiref==0.1.2
  Using cached wsgiref-0.1.2.zip (37 kB)
    ERROR: Command errored out with exit status 1:
     command: /usr/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-2wio6dov/wsgiref/setup.py'"'"'; __file__='"'"'/tmp/pip-install-2wio6dov/wsgiref/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-o9_x0mzi
         cwd: /tmp/pip-install-2wio6dov/wsgiref/
    Complete output (8 lines):
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-install-2wio6dov/wsgiref/setup.py", line 5, in <module>
        import ez_setup
      File "/tmp/pip-install-2wio6dov/wsgiref/ez_setup/__init__.py", line 170
        print "Setuptools version",version,"or greater has been installed."
              ^
    SyntaxError: Missing parentheses in call to 'print'. Did you mean print("Setuptools version",version,"or greater has been installed.")?
    ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

@m0lmk
Copy link

m0lmk commented Jul 17, 2020

I'm also having this issue.

kali@kali:~/tplmap$ python3 -m pip install -r requirements.txt 
Collecting PyYAML==5.1.2
  Using cached PyYAML-5.1.2.tar.gz (265 kB)
Collecting certifi==2018.10.15
  Using cached certifi-2018.10.15-py2.py3-none-any.whl (146 kB)
Requirement already satisfied: chardet==3.0.4 in /usr/lib/python3/dist-packages (from -r requirements.txt (line 3)) (3.0.4)
Collecting idna==2.8
  Using cached idna-2.8-py2.py3-none-any.whl (58 kB)
Collecting requests==2.22.0
  Using cached requests-2.22.0-py2.py3-none-any.whl (57 kB)
Collecting urllib3==1.24.1
  Using cached urllib3-1.24.1-py2.py3-none-any.whl (118 kB)
Collecting wsgiref==0.1.2
  Using cached wsgiref-0.1.2.zip (37 kB)
    ERROR: Command errored out with exit status 1:
     command: /usr/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-gkzt50qx/wsgiref/setup.py'"'"'; __file__='"'"'/tmp/pip-install-gkzt50qx/wsgiref/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-install-gkzt50qx/wsgiref/pip-egg-info                                                                                                                                       
         cwd: /tmp/pip-install-gkzt50qx/wsgiref/                                                                                                                                           
    Complete output (8 lines):                                                                                                                                                             
    Traceback (most recent call last):                                                                                                                                                     
      File "<string>", line 1, in <module>                                                                                                                                                 
      File "/tmp/pip-install-gkzt50qx/wsgiref/setup.py", line 5, in <module>                                                                                                               
        import ez_setup                                                                                                                                                                    
      File "/tmp/pip-install-gkzt50qx/wsgiref/ez_setup/__init__.py", line 170                                                                                                              
        print "Setuptools version",version,"or greater has been installed."                                                                                                                
              ^                                                                                                                                                                            
    SyntaxError: Missing parentheses in call to 'print'. Did you mean print("Setuptools version",version,"or greater has been installed.")?                                                
    ----------------------------------------                                                                                                                                               
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
kali@kali:~/tplmap$

Any suggestions?

@shadihh9
Copy link

shadihh9 commented Sep 1, 2020

me too

@epinna
Copy link
Owner

epinna commented Sep 1, 2020

You're using python3, while tplmap runs on Python version 2.

@AzhariRamadhan
Copy link

first make sure you create venv using this command
$virtualenv -p python2.7 env

@ashiroodi
Copy link

Same issue again, and I've done the things that you guys have recommended but still getting the same error

@MageyT
Copy link

MageyT commented Sep 7, 2021

Same :(

@Festivalsau
Copy link

You always have to use python2. First you have to run

python2 -m pip install -r requirements.txt

then run the programm using

python2 tplmap.py [options]

Worked for me this way.

@lemosnlmb
Copy link

You always have to use python2. First you have to run

python2 -m pip install -r requirements.txt

then run the programm using

python2 tplmap.py [options]

Worked for me this way.

It shows me this: python2 -m pip install -r requirements.txt
/usr/local/bin/python2: No module named pip

What python2 version are you using? Mine is Python 2.7.18

@Festivalsau
Copy link

Festivalsau commented Oct 18, 2021

It shows me this: python2 -m pip install -r requirements.txt /usr/local/bin/python2: No module named pip

What python2 version are you using? Mine is Python 2.7.18

I did this on an AttackBox on tryhackme.com, so I don't know which version it was at that time. As of today it runs version 2.7.17.

Are you sure pip is installed? Check by running

pip --version

If not you can try running:

sudo apt install python-pip

@bakassarinad
Copy link

It shows me this: python2 -m pip install -r requirements.txt /usr/local/bin/python2: No module named pip
What python2 version are you using? Mine is Python 2.7.18

I did this on an AttackBox on tryhackme.com, so I don't know which version it was at that time. As of today it runs version 2.7.17.

Are you sure pip is installed? Check by running

pip --version

If not you can try running:

sudo apt install python-pip

sorry, Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Package python-pip is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
However the following packages replace it:
python3-pip

E: Package 'python-pip' has no installation candidate
is an error, what should we do?

@Levijovanatan
Copy link

use this command

$ curl https://bootstrap.pypa.io/pip/2.7/get-pip.py -o get-pip.py

and then,
$ python2 get-pip.py

repeat install requirements:
$ python2 -m pip install -r requirements.txt

now u can use tplmap :
$ python2 tplmap.py -u target

@ethicalsumit
Copy link

Here is the final solution...
$ wget https://bootstrap.pypa.io/pip/2.7/get-pip.py
$ sudo python2.7 get-pip.py
$ sudo python -m pip install pyyaml

You can enjoy tplmap now :)

@krishna760629
Copy link

krishna760629 commented Dec 21, 2022

└─$ pip -V
pip 22.3.1 from /usr/local/lib/python3.10/dist-packages/pip (python 3.10)

└─$ pip3 -V
pip 22.3.1 from /usr/local/lib/python3.10/dist-packages/pip (python 3.10)

when i ran
└─$ sudo python get-pip.py
DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. pip 21.0 will drop support for Python 2.7 in January 2021. More details about Python 2 support in pip can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support pip 21.0 will remove support for this functionality.
WARNING: pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.",)': /simple/pip/
WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.",)': /simple/pip/
WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.",)': /simple/pip/
WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.",)': /simple/pip/
WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.",)': /simple/pip/
Could not fetch URL https://pypi.org/simple/pip/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/pip/ (Caused by SSLError("Can't connect to HTTPS URL because the SSL module is not available.",)) - skipping
ERROR: Could not find a version that satisfies the requirement pip<21.0 (from versions: none)
ERROR: No matching distribution found for pip<21.0

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