吾爱破解 - LCG - LSG |安卓破解|病毒分析|www.52pojie.cn

 找回密码
 注册[Register]

QQ登录

只需一步,快速开始

查看: 7365|回复: 24
收起左侧

[其他原创] 【原创源码】QQ空间访客监控

[复制链接]
Lcys 发表于 2015-11-24 16:21
本帖最后由 Lcys 于 2017-8-9 15:55 编辑

无聊写的..
[Python] 纯文本查看 复制代码
#coding:utf-8
import urllib2
from json import *
import smtplib  
from email.mime.text import MIMEText  
import time
  

def send_mail(rev):
        sender = '[url=mailto:root@phpinfo.me]root@phpinfo.me[/url]'  #发送者邮箱
        receiver = rev  
        subject = '你来了'  #邮件标题
        smtpserver = 'smtp.qq.com'  #smtp服务器地址
        username = '[url=mailto:root@phpinfo.me]root@phpinfo.me[/url]'  #邮箱账号
        password = ''  #这里改成你的邮箱密码
        msg = MIMEText('<html><h1>你好,欢迎访问我的空间</h1></html>','html','utf-8')  
        msg['Subject'] = subject
        msg['From'] = "Lcy<[url=mailto:root@phpinfo.me]root@phpinfo.me[/url]>" #发送者
        try:
                smtp = smtplib.SMTP()  
                smtp.connect(smtpserver)  
                smtp.login(username, password)  
                smtp.sendmail(sender, receiver, msg.as_string())  
                smtp.quit()
                return True  
        except Exception, e:  
                print str(e)  
                return False 
def getLastQQ():
        try:
                sid = ""#这里填你获取到的qq sid,怎么获取请百度
                qq = "1141056911" #这里改成你的qq号
                url = 'http://m.qzone.com/mqz_get_visitor?g_tk=692305309&res_mode=0&res_uin='+ qq +'&offset=0&count=100&page=1&format=json&t=1441091004488&sid=' + sid
                response = urllib2.urlopen(url, timeout=1)
                json_str = response.read()
                #print json_str
                d = JSONDecoder().decode(json_str)
                lastqq = d['data']['list'][0]['uin']
        except  Exception,e:
                print e
                return False
        return str(lastqq)

if __name__ == '__main__' :
        while True:
                qq = getLastQQ()
                if not qq:
                        print u'超时'
                        continue
                qq_mail = getLastQQ() + "@qq.com"
                f = open("db.txt","r")
                db = f.read()
                f.close()
                if qq_mail in db:
                        print u"跳过"
                else:
                        f = open("db.txt","a")
                        f.write(qq_mail + "\r\n")
                        f.close()
                        print u"发送邮件:" + qq_mail
                        if send_mail(qq_mail):
                                print u"发送成功"
                        else:
                                print u"发送失败"
                time.sleep(2)

当有人访问你空间时就会自动给他发邮件



点评

能不能她偷看我空间 可以给我发邮件 哈哈哈哈哈哈  发表于 2015-11-24 22:15

免费评分

参与人数 7热心值 +7 收起 理由
吾爱赚赚 + 1 python 表示还不会!
gdf + 1 我很赞同!
hpwy1662 + 1 偷窥女神是不是看了你空间?其实她只是随手.
ldark + 1 我很赞同!
zcytelove2014 + 1 鼓励转贴优秀软件安全工具和文档!
Ramenta + 1 请务必告诉我怎么用
Dicker + 1 欢迎分析讨论交流,吾爱破解论坛有你更精彩.

查看全部评分

发帖前要善用论坛搜索功能,那里可能会有你要找的答案或者已经有人发布过相同内容了,请勿重复发帖。

隔壁小王 发表于 2015-11-24 17:39
然而我们大多数渣看不懂什么意思,虽然看起来很厉害的样子,不过要是能有个程序就好了,来个使用教程也好啊
战地记者丶 发表于 2015-11-24 16:36
爱在何方 发表于 2015-11-24 16:39
菜鸟哥 发表于 2015-11-24 16:52
别人看个空间有必要发邮件么。
Demo-Test 发表于 2015-11-24 17:06
传说中的Python Mail?我只想静静的看个空间。
Dicker 发表于 2015-11-24 17:17
吓得访客(电脑菜鸟)半死 不活的。。。
小小衰 发表于 2015-11-24 17:19
有点不懂.....
晶莹的鼻涕泡 发表于 2015-11-24 17:19
看起来好像很流弊的样子……
乐卤类小冲儿 发表于 2015-11-24 17:25
这个学习一下,代码能在空间执行吗
xxxaaxa 发表于 2015-11-24 17:32
这东西不会用撒。。
您需要登录后才可以回帖 登录 | 注册[Register]

本版积分规则 警告:本版块禁止灌水或回复与主题无关内容,违者重罚!

快速回复 收藏帖子 返回列表 搜索

RSS订阅|小黑屋|处罚记录|联系我们|吾爱破解 - LCG - LSG ( 京ICP备16042023号 | 京公网安备 11010502030087号 )

GMT+8, 2024-6-17 15:35

Powered by Discuz!

Copyright © 2001-2020, Tencent Cloud.

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