1.安装wheel库
py -3 -m pip install wheel
2.下载gmpy2库,可以在github上找到
链接:https://github.com/aleaxit/gmpy/releases/tag/gmpy2-2.1.0a1
选择合适的版本,嗯不支持python3.7,换python2.7
核对一下python版本
3.下载gmpy2对应python 2.7 的安装包
安装(步骤如1,2)
py -2 -m pip install wheel
py -2 -m pip install gmpy2-2.1.0a1-cp27-cp27m-win_amd64.whl
4.调试一下
运行低加密指数攻击脚步,libnum报错
Traceback (most recent call last):
File "aaaaa.py", line 17, in <module>
print libnum.n2s(res)
File "E:\Python27\lib\site-packages\libnum\strings.py", line 20, in n2s
return str(codecs.decode(s, 'hex'), 'utf-8')
TypeError: str() takes at most 1 argument (2 given)
解决办法:
链接:https://github.com/hellman/libnum
下载安装
py -2 setup.py install
运行发现,还是报错,应该是没有卸载之前的libnum的原因
py -2 -m pip uninstall libnum