自学内容网 自学内容网

kali的tplmap使用报错解决

问题

当我们直接使用kali下的tplmap时报错了。

Tplmap 0.5
    Automatic Server-Side Template Injection Detection and Exploitation Tool

Testing if GET parameter 'name' is injectable
Exiting: module 'collections' has no attribute 'Mapping'

这是因为tplmap要求的版本较低,好像python3以上的都不可以。(没做所有版本测试,但是我用的python2可以。)

解决

一、安装python2

正常来说kali2020版以后的都自带python2的。

查看版本

python2 -V

安装python2

apt-get install python2

二、安装pip2

创建文件夹方便查找

#创建
mkdir ins-pip2

#进入
cd ins-pip2

获取pip2的安装脚本

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

 python2执行,需要root权限

sudo python2 get-pip.py

升级pip2(若是输入的pip2没有变颜色,那就等一等,或者再执行上面那个命令安装)

pip2 install --upgrade pip

三、安装tplmap依赖

进入tplmap目录下

查看依赖

安装依赖

pip2 install -r requirements.txt

 

运行

python2 ./tplmap.py -u http://98318a6c-df45-4ce0-bcba-38975a9a8991.www.polarctf.com:8090/?name=1 --engine=Jinja2 --os-shell


原文地址:https://blog.csdn.net/qq_74263993/article/details/142598529

免责声明:本站文章内容转载自网络资源,如本站内容侵犯了原著者的合法权益,可联系本站删除。更多内容请关注自学内容网(zxcms.com)!