盈世CoreMail邮件企业通讯录导出脚本

IT资讯
IT资讯
IT资讯
1173
文章
261
评论
2017-11-2703:31:32
评论
7,539 1479字

盈世CoreMail邮件企业通讯录导出脚本

#coding:utf-8
import requests
import re
import sys
'''
coremail邮件系统企业通讯录导出脚本
'''
def login(domain,username,password):
data={'startReferer':'','uid':username,'password':password}
httptou={'User-Agent':'Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.85 Safari/537.36'}
s=requests.session()
httppost=s.post("http://"+domain+"/coremail/login.jsp",data=data,headers=httptou)
getemail=re.findall('\(this\);"\r\n href="(.*?)" hidefocus>',httppost.text,re.S)
tongxunlu= getemail[0]
mailpage="http://"+domain+"/coremail/XJS/"+tongxunlu
httpgetmailpage=s.get(mailpage)
bumens=re.findall(' href="\.\.(.*?)" hidefocus=',httpgetmailpage.text,re.S)
for bumen in bumens:
paa=bumen[51:]
file = open(paa[3:].replace('/','')+'.txt','a+')
getmail=s.get("http://"+domain+"/coremail/XJS"+bumen)
pages=re.findall(' selected>(.*?)',getmail.text,re.S)
allpage=pages[0]
yeshu= allpage[2:]
for i in range(1,int(yeshu)+1):
url="http://"+domain+"/coremail/XJS"+bumen+"&page_no="+str(i)
fanye=s.get(url)
zhengze='&'+paa+'&uid=(.*?)">'
maildizhis=re.findall(zhengze,fanye.text,re.S)
ids=list(set(maildizhis))
for res in ids:
print res
file.write(res+'\n')
file.close()
if __name__ == '__main__':
commands=sys.argv[1:2]
commandss=sys.argv[2:3]
commandsss=sys.argv[3:]
args="".join(commands)
argss="".join(commandss)
argsss="".join(commandsss)
if len(args) < 1:
print "*"*80
print " E.g:python coremail.py mail.baidu.com user pass"
print "*"*80
else:
login(args,argss,argsss)

使用方法:

python  coremail.py  mail.baidu.com  user pass

即可

  • Copyright ©  PC在线云端  版权所有.
  • 转载请务必保留本文链接:https://www.gaofumei.net/software-install/app/1178.html
Orgorg速率最高可达1000Mbps,流畅观看Youtube 4K、TikTok,支持 Windows、Android、iOS、Mac,支持 微信、支付宝 付款!
超高性价比,新用户注册送1元,可直接在商店购买套餐。节点和负载服务器很多,稳定性和速度有保障。有共享流媒体会员。有三端VPN程序。最萌の云 ☁️顶级云服务商,超过50个G口节点,上百台服务器负载加速,稳且快,高峰秒8K。提供网飞等会员共享,超值!限时免费尝鲜!
全球数据中心,多点BGP保证速度,无视晚高峰,全天4K秒开,IPLC专线无惧封锁
全IEPL /青云跨境,高峰时期稳定8K播放,流媒体影视, ChatGPT 解锁保障,客户端无日志保护您的隐私安全,稳定运行5年+
匿名

发表评论

匿名网友 填写信息

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen: