This is a quick note to get tplmap working again!

Previously on HTB: Doctor, this tool was worked fine with python2, but when I tried to use it again on HTB: Nunchucks, it threw these error messages.

→ kali@kali «tplmap» «» git:(master) ✗ 
$ python 
Traceback (most recent call last):
  File "/opt/tplmap-venv/tplmap/./", line 2, in <module>
    from utils import cliparser
  File "/opt/tplmap-venv/tplmap/utils/", line 163, in <module>
    parser.formatter.format_option_strings = type(parser.formatter.format_option_strings)(_, parser, type(parser))
TypeError: method expected 2 arguments, got 3

Here’s how I resolve it.

$ python2 -m pip install --upgrade setuptools
$ python2 -m pip install virtualenv 
$ git clone
$ cd ./tplmap/
$ python2 -m virtualenv tplmap-venv
$ source ./tplmap-venv/bin/activate
(tplmap-venv) $ python2 -m pip install -r requirements.txt 

All the requirements should be listed now.

(tplmap-venv) → $ python2 -m pip list                                                      
--[snip annoying deprecated message]--
Package    Version
---------- ----------
certifi    2018.10.15
chardet    3.0.4
idna       2.8
pip        20.3.4
PyYAML     5.1.2
requests   2.22.0
setuptools 44.1.1
urllib3    1.24.1
wheel      0.37.0

It’s working fine now.

(tplmap-venv) → kali@kali «tplmap» «» git:(master) 
$ python2 
[+] Tplmap 0.5
    Automatic Server-Side Template Injection Detection and Exploitation Tool

Usage: python [options] error: URL is required. Run with -h for help.

I’m not sure about this, but on my other Kali, these commands (without venv) could get tplmap working again.

$ python2 install --upgrade setuptools
$ python2 -m pip install -r requirements.txt