提示AttributeError: 'module' object has no attribute 'HTTPSHandler'解决方法

时间:2023-03-09 17:49:33
提示AttributeError: 'module' object has no attribute 'HTTPSHandler'解决方法

今天在新机器上安装sqlmap,运行提示AttributeError: 'module' object has no attribute 'HTTPSHandler'

提示AttributeError: 'module' object has no attribute 'HTTPSHandler'解决方法

网上找了找资料,发现一篇文章http://paltman.com/2007/11/15/getting-ssl-support-in-python-251/

输入如下命令:

1
2
3
4
5
6
tar zxf openssl-0.9.8g.tar.gz
cd openssl-0.9.8g
./config  #需要安装perl5
make
make install
   

安装好之后

1
vi Python-2.7.4/Modules/Setup.dist

接下来cd到python安装包的目录

找到以下内容,取消注释(文章说是206-209,不过我这个在210多行,差不多,一般:206回车就能看到了)

提示AttributeError: 'module' object has no attribute 'HTTPSHandler'解决方法

取消注释后重新编译python

1
2
3
4
cd Python-2.7.4
./configure
make
make install
   

以上步骤执行后再./sqlmap.py 搞定

提示AttributeError: 'module' object has no attribute 'HTTPSHandler'解决方法