薅羊毛技巧,Python多平台自动签到兑换奖励,班上的同学好羡慕

Posted python可乐编程

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了薅羊毛技巧,Python多平台自动签到兑换奖励,班上的同学好羡慕相关的知识,希望对你有一定的参考价值。

300积分可以换视频和音乐会员。
代码不存在拉新用户。自己看
留下个脚印可好

腾讯云函数里面的执行时间调大点,要不执行不完

下面就是抓包的教程(fd抓包),浏览器和微信小程序都行。(我用的是小程序):
1。点我的,打开抓包工具。点击签到。

 

 

2.看到有一大堆的ck文件(记得转义:复制到记事本,替换"为\\ )和Referer,将这两个值复制到py文件里面,再上传到腾讯云函数,设置触发器。

 

3.酷推地推送自己弄。
4.效果图:

 

当然在学习Python的道路上肯定会困难,没有好的学习资料,怎么去学习呢? 
学习Python中有不明白推荐加入交流Q群号:928946953 
群里有志同道合的小伙伴,互帮互助, 群里有不错的视频学习教程和PDF!
还有大牛解答!

 

5.Python源代码:

import json
import requests
OpenLuckDraw = False  # 是否开启自动幸运抽奖(首次免费, 第二次5积分/次) 不建议开启 否则会导致多次执行时消耗积分
Skey = ""  # 酷推 skey
Cookie = \'\'# 抓包Cookie 存在引号时 请使用 \\ 转义
Referer = ""  # 抓包referer
UA = "Mozilla/5.0 (Linux; android 10; M2007J3SC Build/QKQ1.191222.002; wv) AppleWebKit/537.36 (Khtml, like Gecko) Version/4.0 Chrome/83.0.4103.106 Mobile Safari/537.36 MCloudApp/7.6.0"
 
 
def push(title, content):
    url = "https://push.xuthus.cc/send/" + Skey
    data = title + "\\n" + content
    # 发送请求
    res = requests.post(url=url, data=data.encode(\'utf-8\')).text
     
 
 
def getEncryptTime():
    target = "http://caiyun.feixin.10086.cn:7070/portal/ajax/tools/opRequest.action"
    headers = {
        "Host": "caiyun.feixin.10086.cn:7070",
        "Accept": "*/*",
        "X-Requested-With": "XMLHttpRequest",
        "User-Agent": UA,
        "Content-Type": "application/x-www-form-urlencoded",
        "Origin": "http://caiyun.feixin.10086.cn:7070",
        "Referer": Referer,
        "Accept-Encoding": "gzip, deflate",
        "Accept-Language": "zh-CN,zh;q=0.9,en;q=0.8",
        "Cookie": Cookie,
    }
    payload = ({
        "op": "currentTimeMillis"
    })
     
    resp = json.loads(requests.post(target, headers=headers, data=payload).text)
    if resp[\'code\'] != 10000:
        print(\'获取时间戳失败: \', resp[\'msg\'])
        return 0
    return resp[\'result\']
 
 
def getTicket():
    target = "https://hecaiyun.vercel.app/api/10086_calc_sign"
    payload = {
        "sourceId": 1003,
        "type": 1,
        "encryptTime": getEncryptTime()
    }
    resp = json.loads(requests.post(target, data=payload).text)
    if resp[\'code\'] != 200:
        print(\'加密失败: \', resp[\'msg\'])
    return resp[\'data\']
 
 
def luckDraw():
    target = "http://caiyun.feixin.10086.cn:7070/portal/ajax/common/caiYunSignIn.action"
    headers = {
        "Host": "caiyun.feixin.10086.cn:7070",
        "Accept": "*/*",
        "X-Requested-With": "XMLHttpRequest",
        "User-Agent": UA,
        "Content-Type": "application/x-www-form-urlencoded",
        "Origin": "http://caiyun.feixin.10086.cn:7070",
        "Referer": Referer,
        "Accept-Encoding": "gzip, deflate",
        "Accept-Language": "zh-CN,zh;q=0.9,en;q=0.8",
        "Cookie": Cookie,
    }
    payload = ({
        "op": "luckDraw",
        "data": getTicket()
    })
 
    resp = json.loads(requests.post(target, headers=headers, data=payload).text)
 
    if resp[\'code\'] != 10000:
        print(\'自动抽奖失败: \', resp[\'msg\'])
        return \'自动抽奖失败: \' + resp[\'msg\']
    else:
        if resp[\'result\'][\'type\'] == \'40160\':
            return \'自动抽奖成功: 小狗电器小型手持床铺除螨仪\'
        elif resp[\'result\'][\'type\'] == \'40175\':
            return \'自动抽奖成功: 飞科男士剃须刀\'
        elif resp[\'result\'][\'type\'] == \'40120\':
            return \'自动抽奖成功: 京东京造电动牙刷\'
        elif resp[\'result\'][\'type\'] == \'40140\':
            return \'自动抽奖成功: 10-100M随机长期存储空间\'
        elif resp[\'result\'][\'type\'] == \'40165\':
            return \'自动抽奖成功: 夏新蓝牙耳机\'
        elif resp[\'result\'][\'type\'] == \'40170\':
            return \'自动抽奖成功: 欧莱雅葡萄籽护肤套餐\'
        else:
            return \'自动抽奖成功: 谢谢参与\'
 
 
def run():
    target = "http://caiyun.feixin.10086.cn:7070/portal/ajax/common/caiYunSignIn.action"
    headers = {
        "Host": "caiyun.feixin.10086.cn:7070",
        "Accept": "*/*",
        "X-Requested-With": "XMLHttpRequest",
        "User-Agent": UA,
        "Content-Type": "application/x-www-form-urlencoded",
        "Origin": "http://caiyun.feixin.10086.cn:7070",
        "Referer": Referer,
        "Accept-Encoding": "gzip, deflate",
        "Accept-Language": "zh-CN,zh;q=0.9,en;q=0.8",
        "Cookie": Cookie,
    }
 
    ticket = getTicket()
    payload = ({
        "op": "receive",
        "data": ticket,
    })
 
    resp = json.loads(requests.post(target, headers=headers, data=payload).text)
    if resp[\'code\'] != 10000:
        push(\'和彩云签到\', \'失败:\' + resp[\'msg\'])
    else:
        content = \'签到成功\\n月签到天数:\' + str(resp[\'result\'][\'monthDays\']) + \'\\n总积分:\' + str(
            resp[\'result\'][\'totalPoints\'])
        if OpenLuckDraw:
            content += \'\\n\\n\' + luckDraw()
        push(\'和彩云签到\', content)
 
 
def main_handler(event, context):
    run()
 
 
# 本地测试
if __name__ == \'__main__\':
    run()

 

以上是关于薅羊毛技巧,Python多平台自动签到兑换奖励,班上的同学好羡慕的主要内容,如果未能解决你的问题,请参考以下文章

技巧 | 有了验证码识别,终于可以愉快地薅羊毛了

美元如何薅羊毛?

暖春行动护航"多投票平台”,助力数字经济发展

薅羊毛啦! 价值$1000动态规划答疑讲堂, 令狐冲老师为您划重点!

大学生利用漏洞薅肯德基羊毛,获刑两年半

IOS+安卓 | 薅羊毛了!!薅羊毛了!!