ssh brute forcer工具和库,使用python的asyncio>=3.4
ktcal2的Python项目详细描述
这个项目是什么?
此项目旨在执行库/工具进行ssh暴力密码攻击,您可以使用作为库作为命令行工具。
ktcal2的目标是使用新的非阻塞i/o异步框架,包括python 3.4。
一些链接:
- Documentation:http://ktcal2.readthedocs.org (currently not working).
- AsyncSSH: This project use AsyncSSH library internally.
许可证
这个项目是bsd…复制它!如果你还记得的话,请在信用卡中提到我:)
如何安装
PIP
sudo python3.4 -m pip install PyCrypto sudo python3.4 -m pip install ktcal2 kt-cal2 -h
手动
sudo python3.4 -m pip install PyCrypto
git clone https://github.com/cr0hn/ktcal2.git ktcal2
cd ktcal2
sudo python3.4 -m pip -r requirements.txt install
python3.4 kt-cal2.py -h
怎么用?
可以在命令行工具中使用此项目,也可以在python项目中将其用作库。
作为工具
您可以使用wordlist或brute forcer密码生成来测试ssh密码。
使用wordlist
基本用法:
python3.4 ktcal2.py --password-wordlist my_password_list.txt -u root 127.0.0.1
使用用户名字表:
python3.4 ktcal2.py --password-wordlist my_password_list.txt --user-wordlist user_names.txt 127.0.0.1
使用密码单词列表暴力
ktcal2可以根据规则生成wordlist的所有组合。
如果要生成所有组合,其中4个字的长度(–max length 4)仅使用数字(-n),0000-9999:
python3.4 ktcal2.py -u root --max-length 4 -N 127.0.0.1
所有组合。2最大和最小长度,仅数字00-99:
python3.4 ktcal2.py -u root -N --max-length 2 --min-length 2127.0.0.1
所有组合。2最大和最小长度。使用数字、小写和大写字母(00..aa..aa):
python3.4 ktcal2.py -u root -N -c -C --max-length 2 --min-length 2127.0.0.1
作为图书馆
fromktcal2.apiimportrunfromktcal2.lib.dataimportGlobalParameters,PasswordConfigdefcustom_display(message):"""Displays debug info in a custom way"""print("----->>> %s <<<-----"%message)if__name__=="__main__":# Configure password generator, for brute forcer mode.password_config=PasswordConfig(low_chars=True,numbers=True,special=True,min_len=4,max_len=5)config=GlobalParameters(target=dst,verbosity=2,# If we wan to display infodisplay_function=custom_display,# Net optionsconcurrency=20,# Credentialsusername_list=("root"forxinrange(1)),password_config=password_config)run(config)