python-medusa

PyPI - Python Version PyPI - Version PyPI - License PyPI - Format GitHub watchers GitHub forks GitHub Repo stars

简介

python-medusa是一个闻名的爆破工具medusa的python库,可以帮助使用medusa进行端口爆破,希望能为使用者带来益处。如果您也想贡献好的代码片段,请将代码以及描述,通过邮箱( xinkonghan@gmail.com
)发送给我。代码格式是遵循自我主观,如存在不足敬请指出!

链接


在线文档:https://blog.hanxinkong.top/wiki/python-tool-library/python-medusa

PyPi地址:https://pypi.org/project/python-medusa

GitHub地址:https://github.com/hanxinkong/python-medusa


安装

1
pip install python-medusa

支持的协议 (不完全统计)

  • AFP
  • CVS
  • FTP
  • HTTP
  • IMAP
  • MS-SQL
  • MySQL
  • NCP (NetWare)
  • NNTP
  • PcAnywhere
  • POP3
  • PostgreSQL
  • rexec
  • rlogin
  • rsh
  • SMB
  • SMTP (AUTH/VRFY)
  • SNMP
  • SSH
  • SSHv2
  • Telnet
  • VmAuthd
  • VNC

简单使用

✨在使用之前,请确保已安装medusa应用程序

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
from medusa import PortBlaster

mds = PortBlaster()
print("medusa version:", mds.medusa_version)
mds.brute(
hosts='192.168.2.185',
ports='22',
user='root',
password='root',
arguments='-M ssh',
isfile_hosts=False,
isfile_user=False,
isfile_password=False
)
print("medusa command line:", mds.command_line)
print(mds.get_medusa_last_output)
# print('medusa bruteinfo: ', mds.bruteinfo)
# print('medusa brutestats: ', mds.brutestats)

for host in mds.all_hosts:
print("Host: %s (%s)" % (host, mds[host]))

参数说明

字段名 类型 必须 描述
hosts string 主机,可多个(用,号分隔)
ports string 端口,可多个(23,80,666-777)
user string 用户(默认:root)
password string 密码(默认:root)
arguments string 附加参数(详见附加参数说明)
isfile_hosts boolean 主机从文件导入,可多个(每行为一个)
isfile_user boolean 用户从文件导入,可多个(每行为一个)
isfile_password boolean 密码从文件导入,可多个(每行为一个)

附加参数说明

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
-O [FILE]      指定成功后文件日志信息路径
-e [n/s/ns] N意为空密码,S意为密码与用户名相同
-M [TEXT] 模块执行名称
-m [TEXT] 传递参数到模块
-d 显示所有的模块名称
-n [NUM] 使用非默认端口
-s 启用SSL
-r [NUM] 重试间隔时间,默认为3秒
-t [NUM] 设定线程数量
-L 并行化,每个用户使用一个线程
-f 在任何主机上找到第一个账号/密码后,停止破解
-q 显示模块的使用信息
-v [NUM] 详细级别(0-6)
-w [NUM] 错误调试级别(0-10)
-V 显示版本
-Z [TEXT] 继续扫描上一次

依赖

内置依赖

  • re Type Hints for Python.
  • os Type Hints for Python.
  • shlex Type Hints for Python.
  • subprocess Type Hints for Python.
  • sys Type Hints for Python.
  • json Type Hints for Python.

注:依赖顺序排名不分先后

贡献者

许可证

该项目根据 MIT 许可条款获得许可.

免责声明

  1. 若使用者滥用本项目,本人 无需承担 任何法律责任.
  2. 本程序仅供娱乐,源码全部开源,禁止滥用 和二次 贩卖盈利. 禁止用于商业用途.