资源简介
Python写的通用邮箱批量验证程序,支持国内QQ,163,263,126,E邮,新浪,全球的gmail,谷歌企业邮箱,微软,雅虎等等各种邮箱。多线程可以指定线程数。
使用格式:
./mailAuth.py [start_line_number]
email_list_file是存放的邮箱列表,里面的邮箱和密码用英文半角逗号隔开。
最后一个参数可选,是从第几行开始。
菜鸟作品,功能少代码量大……潶阔大牛们懂的。
代码片段和文件信息
#!/usr/bin/python
import sys
import os
import time
import getpasspoplibimaplibsmtplib
import re
import linecache
import threading
import thread
import dns.resolver
import string
import base64
class AuthEmail(threading.Thread):
def __init__(selffileInput):
threading.Thread.__init__(self)
self.filehandle = fileInput
def highlight(selfs):
return “%s[30;2m%s%s[1m“%(chr(27) s chr(27))
def inRed(selfs):
return self.highlight(‘‘) + “%s[31;2m%s%s[0m“%(chr(27) s chr(27))
def inGreen(selfs):
return self.highlight(‘‘) + “%s[32;2m%s%s[0m“%(chr(27) s chr(27))
def run(self):
global mutex
global currentline
while True:
#print line;
mutex.acquire()
line = linecache.getline(self.filehandlecurrentline)
if len(line)<1:
break
currentline += 1
mutex.release()
content=line.split(‘‘)
if(len(content)==2) :
email=content[0]
password=content[1]
if password[-1]==‘\n‘:
password = password[0:-1]
print “[Line:%s]now test: “ % (currentline-1) +email+“--“+password
if(self.isValidEmail(email.strip() password.strip())):
SS = content[0] + “ login success!!!“
print self.inGreen(SS)
mutex.acquire()
self.writeResultFile(‘s‘line)
mutex.release()
else:
FF = content[0] + “ login fail...“
print self.inRed(FF)
mutex.acquire()
self.writeResultFile(‘f‘line)
mutex.release()
else:
print “Ignore an error line...“
def getPopMail(selfmailDomain ):
if( mailDomain == ‘163‘ ):
mail = poplib.POP3(‘pop.163.com‘timeout = 5 );
elif( mailDomain == ‘gmail‘ ):
mail = poplib.POP3_SSL(‘pop.gmail.com‘);
elif( mailDomain == ‘126‘ ):
mail = poplib.POP3(‘pop.126.com‘timeout = 5 );
elif ( mailDomain == ‘hotmail‘ ):
mail = poplib.POP3_SSL(‘pop3.live.com‘);
elif ( mailDomain == ‘yahoo‘ ):
mail = ““;
elif ( mailDomain == ‘sina‘ ):
print “Sina Email Can‘t be Vertified!“;
return mail
def isValidEmail(selfemailpassword):
emailparts = email.split(‘@‘)
regmail = re.compile(‘gmail‘)
re163 = re.compile(‘163‘)
reyahoo = re.compile(‘yahoo‘)
re126 = re.compile(‘126‘)
resina = re.compile(‘sina‘)
rehotmail = re.compile(‘outlook|hotmail|live‘)
subDomain = ““
if( len( emailparts ) != 2 ):
print “Email Fomat Error “
return 0
if( regmail.match( str(emailparts[1]))):
subDomain = ‘gmail‘;
elif( re163.match( str(emailparts[1]))):
subDomain = ‘163‘;
elif( reyahoo.match( str(emailparts[1]))):
subDomain = ‘yahoo‘;
ret = “
相关资源
- python实现SGBM图像匹配算法
- python实现灰度直方图均衡化
- scrapy_qunar_one
- Python学习全系列教程永久可用
- python简明教程.chm
- 抽奖大转盘python的图形化界面
- 双边滤波器实验报告及代码python
- python +MYSQL+HTML实现21蛋糕网上商城
- Python-直播答题助手自动检测出题搜索
- OpenCV入门教程+OpenCV官方教程中文版
- Python 串口工具源码+.exe文件
- Python开发的全栈股票系统.zip
- Python操作Excel表格并将其中部分数据写
- python书籍 PDF
- 利用python绘制散点图
- python+labview+No1.vi
- 老男孩python项目实战
- python源码制作whl文件.rar
- python3.5可用的scipy
- PYTHON3 经典50案例.pptx
- 计算机科学导论-python.pdf
- python模拟鼠标点击屏幕
- windows鼠标自动点击py脚本
- 鱼c小甲鱼零基础学python全套课后题和
- Python 练习题100道
- Practical Programming 2nd Edition
- wxPython Application Development Cookbook
- python 3.6
- Python 3.5.2 中文文档 互联网唯一CHM版本
- python3.5.2.chm官方文档
评论
共有 条评论