zhzyker / vulmap

Vulmap 是一款 web 漏洞扫描和验证工具, 可对 webapps 进行漏洞扫描, 并且具备漏洞验证功能
https://github.com/zhzyker/vulmap
GNU General Public License v3.0
3.38k stars 569 forks source link

AttributeError: module 'random' has no attribute 'choices' #42

Open mcam1551 opened 3 years ago

mcam1551 commented 3 years ago

In python 3.5 random.choices() will fail because that method is not available on python 3.5.

Replacing random.choices() with random.sample() on modules/md5.py will work on python 3.5.

Adding a routine to check for python version and use one or the other works as well, for example:

import sys if sys.version_info.major == 3 and sys.version_info.minor < 6:

Etc.

zhzyker commented 3 years ago

In fact vulmap is designed for > python 3.7 At least python 3.6 is also required, but there is a problem with gevent in python 3.6 So it is not compatible with python 3.5

Thanks for your feedback