├── yuedu
├── aoc抽奖.js
├── 偷撸.js.lnk
├── README.md
├── 重要说明
└── README.md
├── raw_master_yhxq_variable.js
├── jd_indeps.sh
├── 阅读
└── common
│ └── log.js
├── 中友能源.py
├── xkqd.py
├── elmtool.sh
├── ddnsto.py
├── hgds.js
├── aliyun.sh
├── ck_ccb.js
├── rainyun.py
├── 雨云.py
├── 书亦烧仙草 (修).py
├── aes(RAS)加解密.py
├── 书亦烧仙草(4.2修).py
├── 必应v1.4.py
├── jrttjsbqd.py
├── wxread.py
├── smzdm_auto_sign_bot.py
├── 变量环境 (1).txt
├── mtqg18-18.py
├── tianyi.py
├── 阿里云签到(1).js
├── 39959_maotai_optional.py
├── 联通签到.py
├── aliyun.js
├── 5_6152272864604063310-20220922-224410.js
├── TieBa.js
├── dy安卓.py
├── raw_main_dftt.js
└── mtml.py
/yuedu:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/aoc抽奖.js:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/QC514/Collection-library/HEAD/aoc抽奖.js
--------------------------------------------------------------------------------
/偷撸.js.lnk:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/QC514/Collection-library/HEAD/偷撸.js.lnk
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # 特别申明
2 | 本仓库发布的脚本及其中涉及的任何解锁和解密分析脚本,仅用于测试和学习研究,禁止用于商业用途,不能保证其合法性,准确性,完整性和有效性,请根据情况自行判断。
3 |
4 | 本项目内所有资源文件,禁止任何公众号、自媒体进行任何形式的转载、发布。
5 |
6 | 本人对任何脚本问题概不负责,包括但不限于由任何脚本错误导致的任何损失或损害。
7 |
8 | 间接使用脚本的任何用户,包括但不限于建立VPS或在某些行为违反国家/地区法律或相关法规的情况下进行传播, 本人对于由此引起的任何隐私泄漏或其他后果概不负责。
9 |
10 | 请勿将本仓库的任何内容用于商业或非法目的,否则后果自负。
11 |
12 | 如果任何单位或个人认为该项目的脚本可能涉嫌侵犯其权利,则应及时通知并提供身份证明,所有权证明,我们将在收到认证文件后删除相关脚本。
13 |
14 | 任何以任何方式查看此项目的人或直接或间接使用该项目的任何脚本的使用者都应仔细阅读此声明。本人保留随时更改或补充此免责声明的权利。一旦使用并复制了任何相关脚本或Script项目的规则,则视为您已接受此免责声明。
15 |
16 | 您必须在下载后的24小时内从计算机或手机中完全删除以上内容
17 |
18 | 您使用或者复制了本仓库且本人制作的任何脚本,则视为 已接受 此声明,请仔细阅读
19 |
--------------------------------------------------------------------------------
/重要说明/README.md:
--------------------------------------------------------------------------------
1 | # 重要说明
2 | 本仓库发布的脚本及其中涉及的任何解锁和解密分析脚本,仅用于测试和学习研究,禁止用于商业用途,不能保证其合法性,准确性,完整性和有效性,请根据情况自行判断。
3 |
4 | 本项目内所有资源文件,禁止任何公众号、自媒体进行任何形式的转载、发布。
5 |
6 | 本人对任何脚本问题概不负责,包括但不限于由任何脚本错误导致的任何损失或损害。
7 |
8 | 间接使用脚本的任何用户,包括但不限于建立VPS或在某些行为违反国家/地区法律或相关法规的情况下进行传播, 本人对于由此引起的任何隐私泄漏或其他后果概不负责。
9 |
10 | 请勿将本仓库的任何内容用于商业或非法目的,否则后果自负。
11 |
12 | 如果任何单位或个人认为该项目的脚本可能涉嫌侵犯其权利,则应及时通知并提供身份证明,所有权证明,我们将在收到认证文件后删除相关脚本。
13 |
14 | 任何以任何方式查看此项目的人或直接或间接使用该项目的任何脚本的使用者都应仔细阅读此声明。本人保留随时更改或补充此免责声明的权利。一旦使用并复制了任何相关脚本或Script项目的规则,则视为您已接受此免责声明。
15 |
16 | 您必须在下载后的24小时内从计算机或手机中完全删除以上内容
17 |
18 | 您使用或者复制了本仓库且本人制作的任何脚本,则视为 已接受 此声明,请仔细阅读
19 |
--------------------------------------------------------------------------------
/raw_master_yhxq_variable.js:
--------------------------------------------------------------------------------
1 | module.exports = {"code":200,"yhxq_variable_data":{
2 | "config":[{
3 | "url":"https://gitee.com/soy-tool/app-script/raw/master/app_yhxq.js",
4 | "update":false,
5 | "notice":false
6 | }],
7 | "user_data":[{
8 | "token":"请求头上的Authorization值",
9 | "Withdrawal":true,
10 | "Withdrawal_Time":12:29:00,
11 | "Feed":true代表喂养,
12 | "Hoe":1,
13 | "UA":"请求UA头,请求头的User-Agent值(选填)"
14 | },{
15 | "token":"多号如上,没有就删除,否则报错",
16 | "Withdrawal":多号如上,没有就删除,否则报错,
17 | "Withdrawal_Time":多号如上,没有就删除,否则报错,
18 | "Feed":多号如上,没有就删除,否则报错,
19 | "Hoe":(拔萝卜次数,每天可免费一次,默认填1),
20 | "UA":"多号如上,没有就删除,否则报错"
21 | },{
22 | "token":"多号如上,没有就删除,否则报错",
23 | "Withdrawal":多号如上,没有就删除,否则报错,
24 | "Withdrawal_Time":多号如上,没有就删除,否则报错,
25 | "Feed":多号如上,没有就删除,否则报错,
26 | "Hoe":(拔萝卜次数,每天可免费一次,默认填1),
27 | "UA":"多号如上,没有就删除,否则报错"
28 | }
29 |
30 | ]}}
--------------------------------------------------------------------------------
/jd_indeps.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 | #依赖安装,运行一次就好
3 | #0 8 5 5 * jd_indeps.sh
4 | #new Env('依赖安装');
5 | #
6 |
7 | npm_ver=`pnpm -v|awk -F. '{print $1}'`
8 | if [[ $npm_ver -ge 7 ]];then
9 | export PNPM_HOME="/root/.local/share/pnpm"
10 | export PATH="$PNPM_HOME:$PATH"
11 | fi
12 |
13 | echo -e "安装脚本所需依赖,不一定一次全部安装成功,请自己检查\n"
14 | echo -e "开始安装............\n"
15 |
16 | #apk add g++ make pixman-dev pango-dev cairo-dev pkgconf --no-cache
17 | apk add g++ make --no-cache
18 | pnpm config set registry https://registry.npm.taobao.org
19 | pnpm install -g
20 | pnpm install -g ds
21 | pnpm install -g png-js
22 | pnpm install -g date-fns
23 | pnpm install -g axios@0.27.2
24 | pnpm install -g crypto-js
25 | pnpm install -g ts-md5
26 | pnpm install -g tslib
27 | pnpm install -g @types/node
28 | pnpm install -g request
29 | pnpm install -g jsdom
30 | pnpm install -g moment
31 | pnpm install -g cheerio
32 | pnpm install -g tough-cookie
33 | pnpm install -g https-proxy-agent
34 | pip3 install -i https://pypi.tuna.tsinghua.edu.cn/simple/ jieba
35 | pip3 install -i https://pypi.tuna.tsinghua.edu.cn/simple/ requests
36 | rm -rf /usr/local/pnpm-global/5/node_modules/.pnpm/canvas*
37 | rm -rf /root/.local/share/pnpm/global/5/.pnpm/canvas*
38 | echo -e "\n所需依赖安装完成,请检查有没有报错,可尝试再次运行"
--------------------------------------------------------------------------------
/阅读/common/log.js:
--------------------------------------------------------------------------------
1 | const log4js = require('log4js');
2 |
3 |
4 | module.exports = {
5 | init(file) {
6 | // 配置日志
7 | log4js.configure({
8 | appenders: {
9 | console: {
10 | type: 'console',
11 | layout: {
12 | type: 'pattern',
13 | pattern: '[%d{yyyy-MM-dd hh:mm:ss}] [%p] [%f{3}:%l] %m',
14 | }
15 | }, // 输出到控制台
16 | file: {
17 | type: 'file',
18 | filename: file,
19 | layout: {
20 | type: 'pattern',
21 | pattern: '%r %p - %m',
22 | }
23 | }
24 | },
25 | categories: {
26 | default: {
27 | appenders: ["console",'file'],
28 | level: 'debug'
29 | }
30 | }
31 | })
32 | let logs = console.log
33 | let logger = log4js.getLogger()
34 |
35 | logs("启动日志")
36 | logger.info('启动日志')
37 | console.log = (...d) => {
38 | logs(...d)
39 | logger.info(...d)
40 | }
41 | }
42 | }
--------------------------------------------------------------------------------
/中友能源.py:
--------------------------------------------------------------------------------
1 | import requests,time,json,os,random
2 | from notify import send
3 | xiaoxi = "no"
4 | user_cookie = os.getenv("zyny")
5 | cookies = user_cookie.split("&")
6 | class Zyny:
7 | url = "https://zyny123.h5.yunhuiyuan.cn/"
8 | payload ={}
9 | headers = {
10 | "Host": "zyny123.h5.yunhuiyuan.cn",
11 | "Connection": "keep-alive",
12 | "Content-Length": "2",
13 | "Accept": "application/json, text/plain, */*",
14 | "User-Agent": "Mozilla/5.0 (Linux; Android 10; V1986A Build/QP1A.190711.020; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/111.0.5563.116 Mobile Safari/537.36 XWEB/5249 MMWEBSDK/20230504 MMWEBID/2183 MicroMessenger/8.0.37.2380(0x2800255B) WeChat/arm64 Weixin NetType/WIFI Language/zh_CN ABI/arm64",
15 | "Content-Type": "application/json;charset\u003dUTF-8",
16 | "Origin": "https://zyny123.h5.yunhuiyuan.cn",
17 | "X-Requested-With": "com.tencent.mm",
18 | "Sec-Fetch-Site": "same-origin",
19 | "Sec-Fetch-Mode": "cors",
20 | "Sec-Fetch-Dest": "empty",
21 | "Referer": "https://zyny123.h5.yunhuiyuan.cn/Member/PointCenter/?bid\u003d574c639c-3009-4b3b-9ab8-da4749c0189d",
22 | "Accept-Encoding": "gzip, deflate",
23 | "Accept-Language": "zh-CN,zh;q\u003d0.9,en-US;q\u003d0.8,en;q\u003d0.7",
24 |
25 | }
26 | def run(self):
27 | self.qd()
28 |
29 | def qd(self):
30 | print("正在运行签到")
31 | jieko = "Member/Sign?bid\u003d574c639c-3009-4b3b-9ab8-da4749c0187d"
32 | url = requests.post(self.url+jieko,headers=self.headers,json=self.payload).json()
33 | #print(url)
34 | print("签到成功" if url.get("success") == True else url.get("message"))
35 | time.sleep(3)
36 | return
37 |
38 |
39 | sl=Zyny()
40 | results = []
41 | for o in range(len(cookies)):
42 | print("---------------开始运行中友能源账号%s-----------"%str(o+1))
43 | mse = "---------------开始运行中友能源账号%s-----------"%str(o+1)
44 | results.append(mse)
45 | ck=cookies[o]
46 | sl.headers["Cookie"]=ck
47 | sl.run()
48 | if xiaoxi == "yes":
49 | print("运行推送:")
50 | result = '\n\n'.join(results)
51 | send("🎉中友能源🎉",result)
52 |
--------------------------------------------------------------------------------
/xkqd.py:
--------------------------------------------------------------------------------
1 | # -*- coding: utf-8 -*-
2 | """
3 | @Time : 2023/6/16 15:28
4 | @Auth : LTX-Name
5 | @File :test11.py
6 | @IDE :PyCharm
7 | """
8 | # 变量 export xingkong="账户1:密码"
9 |
10 | import os
11 | import re
12 | from datetime import datetime
13 |
14 | import requests
15 | try:
16 | xingkong = os.environ["xingkong"]
17 |
18 | headers = {
19 | 'Accept': 'application/json, text/javascript, */*; q=0.01',
20 | 'Accept-Language': 'zh-CN,zh;q=0.9,en;q=0.8,en-GB;q=0.7,en-US;q=0.6',
21 | 'Connection': 'keep-alive',
22 | 'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8',
23 | 'DNT': '1',
24 | 'Origin': 'http://www.xkdaili.com',
25 | 'Referer': 'http://www.xkdaili.com/main/usercenter.aspx',
26 | 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/103.0.5060.134 Safari/537.36 Edg/103.0.1264.77',
27 | 'X-Requested-With': 'XMLHttpRequest',
28 | }
29 | up = xingkong.split(":")
30 | data = {
31 | "username": up[0],
32 | "password": up[1],
33 | "remember": 0
34 | }
35 |
36 | msg = ""
37 | params = {
38 | 'action': 'user_receive_point',
39 | }
40 | try:
41 | aa = requests.post("http://www.xkdaili.com/tools/submit_ajax.ashx?action=user_login&site_id=1", headers=headers,
42 | data=data)
43 | ck = aa.cookies
44 | asp = re.findall(r"ASP\.NET_SessionId=(\w+)", str(ck))
45 | dt = re.findall(r"dt_cookie_user_name_remember=(\w+=\w+)", str(ck))
46 | cookies = {
47 | "ASP.NET_SessionId": asp[0],
48 | "dt_cookie_user_name_remember": dt[0]
49 | }
50 | data = {
51 | 'type': 'login',
52 | }
53 | response = requests.post('http://www.xkdaili.com/tools/submit_ajax.ashx', params=params, cookies=cookies,
54 | headers=headers, data=data, verify=False)
55 | txt = response.json()
56 | print("星空签到 ", txt['msg'])
57 | msg += f"账户 {up[0]} 星空签到 {txt['msg']}\n"
58 | except Exception as e:
59 | print(f"账户 {up[0]} 星空签到异常 {str(e)}")
60 | msg += f"账户 {up[0]} 星空签到异常 {str(e)}\n"
61 | msg = f"⏰{str(datetime.now())[:19]}\n" + msg
62 | except Exception as e:
63 | print("星空签到失败,失败原因 ", str(e))
--------------------------------------------------------------------------------
/elmtool.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | #Author: zelang
3 | #Time: 2022年10月3日(星期一) (GMT+8)
4 |
5 | cur_dir=$(pwd)
6 | check_system() {
7 | arch=$(arch)
8 | if [[ $arch == "amd64" || $arch == "x86_64" || $arch == "x64" ]]; then
9 | arch="amd64"
10 | elif [[ $arch == "aarch64" || $arch == "arm64" ]]; then
11 | arch="arm64"
12 | elif [[ $arch == "x86" || $arch == "i386" ]]; then
13 | arch="386"
14 | elif [[ $arch == "arm" || $arch == "armv7l" || $arch == "armv8l" ]]; then
15 | arch="arm"
16 | else
17 | echo -e "[Error] 检测架构失败,请尝试切换设备或联系作者"
18 | exit 2
19 | fi
20 | echo -e "[INFO] 架构: ${arch}"
21 | }
22 | check_install() {
23 | if [ ! -d "${cur_dir}/elmtool" ]; then
24 | echo -e "[INFO] 检测到当前未安装ElmTool,即将下载二进制文件"
25 | mkdir -p elmtool && cd elmtool || exit
26 | wget https://ghproxy.com/https://github.com/zelang/elm-release/releases/download/"${new_version:0:3}"/elm-"${new_version}"-linux-${arch}.tar.gz
27 | # shellcheck disable=SC2181
28 | if [ $? -ne 0 ]; then
29 | echo -e "[Error] 下载二进制文件失败,请检查网络或重新执行本脚本" && exit 2
30 | fi
31 | tar -zxvf elm-"${new_version}"-linux-${arch}.tar.gz && rm -rf elm-"${new_version}"-linux-${arch}.tar.gz
32 | echo -e "[SUCCESS] 下载二进制文件成功"
33 | fi
34 | }
35 | update_soft() {
36 | if [ -d "${cur_dir}/elmtool" ]; then
37 | cd "${cur_dir}" || exit
38 | echo -e "[INFO] 检测到当前已安装ElmTool,即将下载更新二进制文件"
39 | mkdir -p tmp && cd tmp || exit
40 | wget https://ghproxy.com/https://github.com/zelang/elm-release/releases/download/"${new_version:0:3}"/elm-"${new_version}"-linux-${arch}.tar.gz >/dev/null 2>&1
41 | # shellcheck disable=SC2181
42 | if [ $? -ne 0 ]; then
43 | echo -e "[Error] 下载二进制文件失败,请检查网络或重新执行本脚本" && cd .. && rm -rf tmp && exit 2
44 | fi
45 | tar -zxvf elm-"${new_version}"-linux-${arch}.tar.gz && rm -rf elm-"${new_version}"-linux-${arch}.tar.gz
46 | mv -f elm "${cur_dir}/elmtool" && cd .. && rm -rf tmp
47 | echo -e "[SUCCESS] 更新二进制文件成功"
48 | fi
49 | }
50 | check_update() {
51 | new_version=$(curl -s "https://fastly.jsdelivr.net/gh/zelang/elm-release@main/version")
52 | if [[ !${new_version} =~ [:digit:].[:digit:].[:digit:] ]];then
53 | echo -e "[Error] 当前版本获取失败,请尝试更改本脚本51行获取版本地址链接"
54 | exit 0
55 | fi
56 | echo -e "[SUCCESS] 当前最新版本为:${new_version}"
57 | if [ -d "${cur_dir}/elmtool" ]; then
58 | # shellcheck disable=SC2086
59 | cd ${cur_dir} || exit
60 | # shellcheck disable=SC2046
61 | # shellcheck disable=SC2091
62 | old_version=$(elmtool/elm -version)
63 | if version_gt "$new_version" "$old_version"; then
64 | update_soft
65 | fi
66 | else
67 | check_install
68 | fi
69 | }
70 | version_gt() { test "$(echo "$@" | tr " " "\n" | sort -V | head -n 1)" != "$1"; }
71 | main() {
72 | #检测系统
73 | check_system
74 | #检测是否存在文件 && 下载更新文件
75 | check_update
76 | #开始执行任务
77 | cd "${cur_dir}/elmtool" || exit
78 | chmod +x elm && ./elm -task -ql
79 | #等待任务执行完毕
80 | }
81 |
82 | main
83 |
--------------------------------------------------------------------------------
/ddnsto.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/python3
2 | # -- coding: utf-8 --
3 | # -------------------------------
4 | # @Author : github@wd210010 https://github.com/wd210010/just_for_happy
5 | # @Time : 2023/2/27 13:23
6 | # -------------------------------
7 | # cron "30 9 * * *" script-path=xxx.py,tag=匹配cron用
8 | # const $ = new Env('ddnsto七天续费');
9 |
10 | import requests, json,uuid,datetime,re,os
11 | from datetime import timedelta
12 | # 环境变量ddns_cookie,“ksuser=xxx;csrftoken=xxx;sessionid=xxx”,push+推送填写变量plustoken
13 | # 配置参数 登录https://www.ddnsto.com/app/#/devices 抓包cookie
14 | ddns_cookie = os.getenv("ddns_cookie")
15 | xcsrftoken=re.findall('csrftoken=(.*?);', ddns_cookie, re.S)[0]
16 | # 先购买一次7天免费套餐 抓包查看https://www.ddnsto.com/api/user/routers/*****/ 这个url里面的*****就是userid
17 | ddns_userid=os.getenv("ddns_userid")
18 |
19 | # pushtoken
20 | plustoken=os.getenv("plustoken")
21 |
22 |
23 | def Push(contents):
24 | #推送加
25 | headers = {'Content-Type': 'application/json'}
26 | json = {"token": plustoken, 'title': 'DDNS', 'content': contents.replace('\n', '
'), "template": "json"}
27 | resp = requests.post(f'http://www.pushplus.plus/send', json=json, headers=headers).json()
28 | print('push+推送成功' if resp['code'] == 200 else 'push+推送失败')
29 |
30 | # utc-beijing
31 | def UTC2BJS(UTC):
32 | UTC_format = "%Y-%m-%dT%H:%M:%S.%fZ"
33 | BJS_format = "%Y-%m-%d %H:%M:%S"
34 | UTC = datetime.strptime(UTC,UTC_format)
35 | #格林威治时间+8小时变为北京时间
36 | BJS = UTC + timedelta(hours=8)
37 | BJSJ = BJS.strftime(BJS_format)
38 | return BJSJ
39 |
40 |
41 | #获取订单号
42 | uu_id = uuid.uuid4()
43 | suu_id = ''.join(str(uu_id).split('-'))
44 | url_2 = 'https://www.ddnsto.com/api/user/product/orders/'
45 | headers = {
46 | 'accept': 'application/json, text/plain, */*',
47 | 'accept-encoding': 'gzip, deflate, br',
48 | 'accept-language': 'zh-CN,zh;q=0.9',
49 | 'cookie': f'{ddns_cookie}',
50 | 'referer': 'https://www.ddnsto.com/app/',
51 | 'sec-fetch-dest': 'empty',
52 | 'sec-fetch-mode': 'cors',
53 | 'sec-fetch-site': 'same-origin',
54 | 'user-agent': 'Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.198 Safari/537.36',
55 | 'x-csrftoken': f'{xcsrftoken}'
56 | }
57 | data_2 = {
58 | 'product_id': '2',
59 | 'uuid_from_client': f'{suu_id}'
60 | }
61 | html_2 = requests.post(url=url_2, headers=headers,data=data_2)
62 | result_2 = json.loads(html_2.text)
63 | if result_2['application-error']=='超出本周免费套餐购买次数':
64 | print(result_2['application-error'])
65 | message_3=result_2['application-error']
66 | Push(contents=message_3)
67 | else:
68 | id = result_2['id']
69 | print(id)
70 | # 提交订单
71 | url_3 = f'https://www.ddnsto.com/api/user/product/orders/{id}/'
72 | html_3 = requests.get(url=url_3, headers=headers).text
73 |
74 | #创建
75 | url_4 =f'https://www.ddnsto.com/api/user/routers/{ddns_userid}/'
76 | data_4 ={
77 | "plan_ids_to_add":[f'{id}'],
78 | "server":3
79 | }
80 | html_4 = requests.patch(url=url_4, headers=headers,data =data_4)
81 | result_4 = json.loads(html_4.text)
82 | if len(result_4['uid'])>0:
83 | print('****白嫖成功*****'+'\n'+'到期时间:'+UTC2BJS(result_4['active_plan']["product_expired_at"]))
84 | else:
85 | print('没有白嫖到!检查配置看看')
86 | message_2 = '****白嫖成功*****'+'\n'+'到期时间:'+UTC2BJS(result_4['active_plan']["product_expired_at"])
87 | Push(contents=message_2)
--------------------------------------------------------------------------------
/hgds.js:
--------------------------------------------------------------------------------
1 | //{"unionId":"","openId": "","sessionKey": "","mobile":""}
2 | const axios = require("axios");
3 | let $ = new Env("哈根达斯");
4 | let Notify = 1;
5 | async function signin(params) {
6 | let t = new Date().getTime();
7 | let json = JSON.parse(params);
8 | let sign = await $.post(
9 | "https://fc-mp-847b10b7-15f3-4aba-9d15-3a25c09b33ae.next.bspapp.com/hgds?t=" +
10 | t,
11 | {
12 | unionId: json.unionId,
13 | openId: json.openId,
14 | sessionKey: json.sessionKey,
15 | }
16 | );
17 | let data = {
18 | unionId: json.unionId,
19 | openId: json.openId,
20 | socialHubid: "b1lZDonG5YtEXLIS",
21 | mobile: json.mobile,
22 | sign,
23 | timestamp: t,
24 | sessionKey: json.sessionKey,
25 | };
26 | let url = "https://haagendazs.smarket.com.cn/v1/api/wxapp/daily/signIn";
27 | let Authorization =
28 | "Bearer " +
29 | (
30 | await $.post(
31 | "https://haagendazs.smarket.com.cn/v1/api/token",
32 | {
33 | partner: "apitest",
34 | secret: "Ou0HT@0W6e",
35 | openid: "gh_68065de13ad5",
36 | "app-id": "wx3656c2a2353eb377",
37 | },
38 | {
39 | "User-Agent":
40 | "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2785.143 Safari/537.36 MicroMessenger/7.0.9.501 NetType/WIFI MiniProgramEnv/Windows WindowsWechat",
41 | }
42 | )
43 | ).data;
44 | let res = await $.post(url, data, {
45 | "User-Agent":
46 | "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2785.143 Safari/537.36 MicroMessenger/7.0.9.501 NetType/WIFI MiniProgramEnv/Windows WindowsWechat",
47 | "content-type": "application/json",
48 | Authorization,
49 | Referer: "https://servicewechat.com/wx3656c2a2353eb377/273/page-frame.html",
50 | });
51 | $.addMsg(res.msg);
52 | }
53 |
54 | (async () => {
55 | let arr = $.getToken("hgds");
56 | if (!arr) return await $.SendMsg("未填写token");
57 | for (let index = 0; index < arr.length; index++) {
58 | $.addMsg(`账号[${index + 1}]:`);
59 | await signin(arr[index]);
60 | await $.wait(3);
61 | }
62 |
63 | await $.SendMsg($._msg);
64 | $.done();
65 | })();
66 |
67 | function Env(name) {
68 | return new (class {
69 | constructor(name) {
70 | this.name = name;
71 | console.log(`\ud83d\udd14${this.name},\u5f00\u59cb!`);
72 | }
73 | async get(url, headers) {
74 | try {
75 | this.result = await axios.get(url, { headers });
76 | return this.result.data;
77 | } catch (err) {
78 | console.log(`error:${err.message}`);
79 | }
80 | }
81 | async post(url, data, headers) {
82 | try {
83 | this.result = await axios.post(url, data, { headers: headers });
84 | return this.result.data;
85 | } catch (err) {
86 | console.log(`error:${err.message}`);
87 | }
88 | }
89 | async SendMsg(message) {
90 | if (!message) return;
91 | if (Notify > 0) {
92 | var notify = require("./sendNotify");
93 | await notify.sendNotify(this.name, message);
94 | }
95 | }
96 | addMsg(msg) {
97 | if (!this._msg) this._msg = "";
98 | console.log(msg);
99 | this._msg += msg + "\n";
100 | }
101 | wait(delay) {
102 | return new Promise((res) => {
103 | setTimeout(res, delay * 1000);
104 | });
105 | }
106 | getToken(key) {
107 | let tmp = process.env[key];
108 | if (!tmp) return "";
109 |
110 | if (tmp.includes("@")) {
111 | let arr = tmp.split("&");
112 | arr = arr.map((value) => {
113 | let tmp = value.split("@");
114 | return [tmp[0], tmp[1]];
115 | });
116 | return arr.length > 0 ? arr : "";
117 | }
118 |
119 | let arr = tmp.split("&");
120 | return arr.length > 0 ? arr : "";
121 | }
122 | done() {
123 | console.log(`\ud83d\udd14${this.name},\u7ed3\u675f!`);
124 | }
125 | })(name);
126 | }
127 |
--------------------------------------------------------------------------------
/aliyun.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | #获取工作路径
4 | CURRENT_DIR=$(
5 | cd $(dirname $0)
6 | pwd
7 | )
8 | #读取token
9 | token=$(cat $CURRENT_DIR/aliyun.txt)
10 | #设置默认Headers参数
11 | Header="User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/94.0.4606.54 Safari/537.36"
12 | Rererer=https://www.aliyundrive.com/
13 | #刷新token并获取drive_id、access_token
14 | response=$(curl https://auth.aliyundrive.com/v2/account/token -X POST -H "User-Agent:$Header" -H "Content-Type:application/json" -H "Rererer:$Rererer" -d '{"refresh_token":"'$token'", "grant_type": "refresh_token"}')
15 | drive_id=$(echo "$response" | sed -n 's/.*"default_drive_id":"\([^"]*\).*/\1/p')
16 | new_token=$(echo "$response" | sed -n 's/.*"refresh_token":"\([^"]*\).*/\1/p')
17 | access_token=$(echo "$response" | sed -n 's/.*"access_token":"\([^"]*\).*/\1/p')
18 | if [ -z "$new_token" ]; then
19 | echo "刷新Token失败"
20 | exit 1
21 | fi
22 | echo -n ${new_token} >$CURRENT_DIR/aliyun.txt
23 |
24 | #签到
25 | response=$(curl "https://member.aliyundrive.com/v1/activity/sign_in_list" -X POST -H "User-Agent:$Header" -H "Content-Type:application/json" -H "Authorization:Bearer $access_token" -d '{"grant_type":"refresh_token", "refresh_token":"'$new_token'"}')
26 | success=$(echo $response | cut -f1 -d, | cut -f2 -d:)
27 | if [ $success = "true" ]; then
28 | echo "阿里签到成功"
29 | fi
30 | signday=$(echo "$response" | grep -o '"day":[0-9]\+' | cut -d':' -f2-)
31 | status=$(echo "$response" | grep -o "\"status\":\"[^\"]*\"" | cut -d':' -f2- | tr -d '"')
32 | isReward=$(echo "$response" | grep -o '"isReward":[^,}]\+' | cut -d':' -f2- | sed '1d')
33 | col=1
34 | for day in $signday; do
35 | stat=$(echo $status | awk -v col="$col" '{print $col}')
36 | reward=$(echo $isReward | awk -v col="$col" '{print $col}')
37 | if [ $stat = "normal" ] && [ "$reward" = "false" ]; then
38 | echo "正在领取第$day天奖励"
39 | curl -s -H "User-Agent:$Header" -H "Authorization:Bearer $access_token" -H "Content-Type: application/json" -X POST -d '{"refresh_token":"'$token'", "grant_type": "refresh_token", "signInDay": "'$day'"}' "https://member.aliyundrive.com/v1/activity/sign_in_reward"
40 | fi
41 | col=$((col + 1))
42 | done
43 |
44 | #获取opentoken
45 | response=$(curl "https://open.aliyundrive.com/oauth/users/authorize?client_id=76917ccccd4441c39457a04f6084fb2f&redirect_uri=https://alist.nn.ci/tool/aliyundrive/callback&scope=user:base,file:all:read,file:all:write&state=" -X POST -H "User-Agent:$Header" -H "Content-Type:application/json" -H "Rererer:$Rererer" -H "Authorization:Bearer $access_token" -d '{"authorize":"1", "scope": "user:base,file:all:read,file:all:write"}')
46 | code=$(echo $response | sed -n 's/.*code=\([^"]*\).*/\1/p')
47 | response=$(curl "https://api.nn.ci/alist/ali_open/code" -X POST -H "User-Agent:$Header" -H "Content-Type:application/json" -H "Rererer:$Rererer" -H "Authorization:Bearer $access_token" -d '{"code":"'$code'", "grant_type":"authorization_code"}')
48 | opentoken=$(echo $response | sed -n 's/.*"refresh_token":"\([^"]*\).*/\1/p')
49 | echo -n ${opentoken} >$CURRENT_DIR/open.txt
50 | echo -n "${new_token};${opentoken}" >$CURRENT_DIR/alltok.txt
51 |
52 | #删除文件
53 | delete_File() {
54 | response=$(curl -s -H "User-Agent:$Header" -H "Authorization:Bearer $access_token" -H "Content-Type: application/json" -X POST -d '{"drive_id": "'$drive_id'","parent_file_id": "root"}' "https://api.aliyundrive.com/adrive/v3/file/list")
55 | if [ -z "$(echo "$response" | grep "items")" ]; then
56 | echo "获取文件列表失败"
57 | exit 1
58 | fi
59 | file_lines=$(echo "$response" | grep -o "\"file_id\":\"[^\"]*\"" | cut -d':' -f2- | tr -d '"')
60 | type_lines=$(echo "$response" | grep -o "\"type\":\"[^\"]*\"" | cut -d':' -f2- | tr -d '"')
61 | col=1
62 | for file_id in $file_lines; do
63 | type=$(echo $type_lines | awk -v col="$col" '{print $col}')
64 | if [ $type = "file" ]; then
65 | curl -s -H "User-Agent:$Header" -H "Authorization:Bearer $access_token" -H "Content-Type: application/json" -X POST -d '{"requests": [{"body": {"drive_id": "'$drive_id'", "file_id": "'$file_id'"}, "headers": {"Content-Type": "application/json"}, "id": "'$file_id'", "method": "POST", "url": "/file/delete"}], "resource": "file"}' "https://api.aliyundrive.com/v3/batch"
66 | fi
67 | col=$((col + 1))
68 | done
69 | }
70 |
71 | INPUT=$1
72 | case $INPUT in
73 | delete_File) delete_File ;;
74 | esac
75 |
76 |
--------------------------------------------------------------------------------
/ck_ccb.js:
--------------------------------------------------------------------------------
1 | /*
2 | 5 8 * * * ck_ccb.js
3 | */
4 | const utils = require('./utils');
5 | const fetch = require('node-fetch');
6 | const Env = utils.Env;
7 | const $ = new Env('建行生活');
8 | const getData = utils.getData;
9 | const sleep = utils.sleep;
10 | const notify = require('./sendNotify');
11 | const AsVow = getData().CCB_LIFE;
12 | var desp = '';
13 | var info = '';
14 | headers = {
15 | "Host": "yunbusiness.ccb.com",
16 | "Accept": "application/json,text/javascript,*/*",
17 | "Content-Type": "application/json;charset=UTF-8",
18 | "User-Agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 14_2_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148/CloudMercWebView/UnionPay/1.0 CCBLoongPay",
19 | }
20 |
21 | ccb_life();
22 |
23 | async function ccb_life() {
24 | if (AsVow) {
25 | for (i in AsVow) {
26 | bodydata = JSON.parse(AsVow[i].body)
27 | headers['skey'] = AsVow[i].skey
28 | pat1 = /cityid=([0-9]+)/g
29 | pat2 = /userCityId=([0-9]+)/g
30 | cityid = pat1.exec(bodydata.ENCRYPT_MSG)
31 | usercityid = pat2.exec(bodydata.ENCRYPT_MSG)
32 | info +=`=== 正对在第 ${i+1} 个账号签到===\n`
33 | await get_Param(cityid[1],usercityid[1]).then (function(data){param_link = data});
34 | delete headers['Content-Type']
35 | delete headers['Accept']
36 | delete headers['skey']
37 | headers["Host"] = "fission-events.ccbft.com"
38 | await get_Cookie(param_link).then (function(data){cookies = data});
39 | headers["X-XSRF-TOKEN"] = decodeURIComponent(cookies.token)
40 | headers["Cookie"] = "XSRF-TOKEN=" + cookies.token + ";_session=" + cookies.session
41 | await get_Info().then (function(data){sign_str = data});
42 | if (sign_str){
43 | info += "今日已签过到!\n"
44 | } else {
45 | await sign();
46 | }
47 | desp += info;
48 | info = '';
49 | }
50 | info = desp;
51 | console.log(info);
52 | notify.sendNotify('建行生活', info);
53 | } else {
54 | info = '签到失败:请先获取Cookie⚠️';
55 | notify.sendNotify('建行生活', info);
56 | }
57 | $.done()
58 | }
59 |
60 | // 获取Param参数
61 | function get_Param(t,b) {
62 | url = `https://yunbusiness.ccb.com/basic_service/txCtrl?txcode=A3341SB06`
63 | return new Promise(resolve => {
64 | fetch(url, {
65 | method: 'POST',
66 | headers: headers,
67 | body: JSON.stringify(bodydata),
68 | }).then(function(response) {
69 | return response.json()
70 | }).then(function(body) {
71 | tmp = "https://fission-events.ccbft.com/a/31/AZGlA939?ccbParamSJ=" + encodeURIComponent(body["data"]["ENCRYPTED_MSG"]) + `&cityid=${t}&CITYID=${t}&userCityId=${b}&USERCITYID=${b}`
72 | console.log("ParamSJ链接为:\n" + tmp + "\n\n")
73 | resolve(tmp)
74 | }).catch(function(e) {
75 | const error = '获取Param出现错误,请检查⚠️';
76 | console.log(error + '\n' + e);
77 | })
78 | });
79 | }
80 |
81 | //获取cookie和token
82 | function get_Cookie(t) {
83 | url = `${t}`;
84 | return new Promise(resolve => {
85 | fetch(url, {
86 | method: 'GET',
87 | headers: headers,
88 | redirect: 'manual',
89 | }).then(function(response) {
90 | cookies = {}
91 | tmp = response.headers.get('set-cookie')
92 | pat1 = /_session=([\w%]+);/g
93 | pat2 = /XSRF-TOKEN=([\w%]+);/g
94 | session = pat1.exec(tmp)
95 | token = pat2.exec(tmp)
96 | cookies.session = session[1]
97 | cookies.token = token[1]
98 | console.log("session参数为:\n"+ cookies.session + "\ntoken参数为:\n"+ cookies.token + "\n\n")
99 | resolve(cookies)
100 | }).catch(function(e) {
101 | const error = '获取cookie出现错误,请检查⚠️';
102 | console.log(error + '\n' + e);
103 | })
104 | });
105 | }
106 |
107 | //查看是否已签过到
108 | function get_Info() {
109 | url = "https://fission-events.ccbft.com/activity/autographnew/info/31/LmqJbkZ6"
110 | return new Promise(resolve => {
111 | fetch(url, {
112 | method: 'GET',
113 | headers: headers,
114 | }).then(function(response) {
115 | return response.json()
116 | }).then(function(body) {
117 | if (body.message.includes("成功")){
118 | tmp = body.data.today_is_register
119 | console.log("今天是否已签过到:" + tmp + "\n")
120 | } else {
121 | console.log(body)
122 | }
123 | resolve(tmp)
124 | }).catch(function(e) {
125 | const error = '获取Info出现错误,请检查⚠️';
126 | console.log(error + '\n' + e);
127 | })
128 | });
129 | }
130 |
131 | //签到
132 | function sign() {
133 | url = "https://fission-events.ccbft.com/activity/autographnew/register/31/LmqJbkZ6"
134 | return new Promise(resolve => {
135 | fetch(url, {
136 | method: 'POST',
137 | headers: headers,
138 | }).then(function(response) {
139 | return response.json()
140 | }).then(function(body) {
141 | if (body.message.includes("成功")){
142 | info += `已连续签到 ${body.data.continue_register_num}天\n`;
143 | } else {
144 | console.log(body)
145 | }
146 | }).catch(function(e) {
147 | const error = '签到出现错误,请检查⚠️';
148 | console.log(error + '\n' + e);
149 | }).finally(() => {
150 | resolve()
151 | })
152 | });
153 | }
154 | module.exports = ccb_life;
155 |
--------------------------------------------------------------------------------
/rainyun.py:
--------------------------------------------------------------------------------
1 | # -*- coding: utf-8 -*-
2 | # @Time: 2023年04月23日21时26分
3 | import requests
4 | from datetime import datetime, timedelta, timezone
5 | from pathlib import Path
6 | import logging
7 | import json
8 |
9 | ''''脚本使用说明:
10 |
11 | 第一步:上传本脚本到青龙
12 | 第二步:去 〖https://www.rainyun.com/Mzk2ODk=_〗 注册一个账号(不提现只抢游戏云和主机的话不用实名)
13 | 第三步:本脚本里第139、140行里设置一下自己注册的账号和密码!!!
14 | 第四步:时间规则:0 0 23 * * ? #每天 23 点执行一次 (可以按自己的需求,每天执行一次)
15 |
16 | 积分规则: 本脚本是每天实现自动签到(每天300个积分),入门级游戏云或者虚拟主机2000积分一周,这样下来一直用积分续费
17 |
18 | 提现规则:6万积分起提现(稳到,不过建议用来续费游戏云比较划算)
19 |
20 | 其他说明:
21 | ①先去完成新人积分任务,点击 左上角菜单-积分中心-赚取积分 ,完成以后大概会有7000积分(积分商城每天20点刷新,到时自己抢一下主机或者游戏云)
22 | ②2000积分就可以领取一个免费的MC服务器或者主机,而且可以用积分进行续费!续费也只需要2000积分!
23 | 前期积分任务做完加上每日签到,足够免费续费一个月了!后面一直用积分续费。
24 |
25 | '''
26 | # 忽略 不验证ssl的提示
27 | import warnings
28 | warnings.filterwarnings('ignore')
29 |
30 | class RainYun():
31 |
32 | def __init__(self, user: str, pwd: str) -> None:
33 | # 认证信息
34 | self.user = user.lower()
35 | self.pwd = pwd
36 | self.json_data = json.dumps({
37 | "field": self.user,
38 | "password": self.pwd,
39 | })
40 | # 日志输出
41 | self.logger = logging.getLogger(self.user)
42 | formatter = logging.Formatter(datefmt='%Y/%m/%d %H:%M:%S',
43 | fmt="%(asctime)s 雨云 %(levelname)s: 用户<%(name)s> %(message)s")
44 | handler = logging.StreamHandler()
45 | handler.setFormatter(formatter)
46 | self.logger.addHandler(handler)
47 | self.logger.setLevel(logging.INFO)
48 | # 签到结果初始化
49 | self.signin_result = False
50 | # 请求设置
51 | self.session = requests.Session()
52 | self.session.headers.update({
53 | "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/102.0.0.0 Safari/537.36",
54 | "Origin": "https://api.rainyun.cc",
55 | "Referer": "https://api.rainyun.cc"
56 | })
57 | self.login_url = "https://api.v2.rainyun.com/user/login"
58 | self.signin_url = "https://api.v2.rainyun.com/user/reward/tasks"
59 | self.logout_url = "https://api.v2.rainyun.com/user/logout"
60 | self.query_url = "https://api.v2.rainyun.com/user/"
61 | # 忽略 .cc ssl错误
62 | self.session.verify = False
63 |
64 | def login(self) -> None:
65 | """登录"""
66 | res = self.session.post(
67 | url=self.login_url, headers={"Content-Type": "application/json"}, data=self.json_data)
68 | if res.text.find("200") > -1:
69 | self.logger.info("登录成功")
70 | self.session.headers.update({
71 | "X-CSRF-Token": res.cookies.get("X-CSRF-Token", "")
72 | })
73 | else:
74 | self.logger.error(f"登录失败,响应信息:{res.text}")
75 |
76 | def signin(self) -> None:
77 | """签到"""
78 | res = self.session.post(url=self.signin_url, headers={"Content-Type": "application/json"}, data=json.dumps({
79 | "task_name": "每日签到",
80 | "verifyCode": ""
81 | }))
82 | self.signin_date = datetime.utcnow()
83 | if res.text.find("200") > -1:
84 | self.logger.info("成功签到并领取积分")
85 | self.signin_result = True
86 | else:
87 | self.logger.error(f"签到失败,响应信息:{res.text}")
88 | self.signin_result = False
89 |
90 | def logout(self) -> None:
91 | res = self.session.post(url=self.logout_url)
92 | if res.text.find("200") > -1:
93 | self.logger.info('已退出登录')
94 | else:
95 | self.logger.warning(f"退出登录时出了些问题,响应信息:{res.text}")
96 |
97 | def query(self) -> None:
98 | res = self.session.get(url=self.query_url)
99 | self.points = None
100 | if res.text.find("200") > -1:
101 | data = res.json()["data"]
102 | self.points = data.get("Points", None) or data["points"]
103 | self.logger.info("积分查询成功为 " + repr(self.points))
104 | else:
105 | self.logger.error(f"积分信息失败,响应信息:{res.text}")
106 |
107 | def log(self, log_file: str, max_num=5) -> None:
108 | """存储本次签到结果的日志"""
109 | # 北京时间
110 | time_string = self.signin_date.replace(tzinfo=timezone.utc).astimezone(
111 | timezone(timedelta(hours=8))).strftime("%Y/%m/%d %H:%M:%S")
112 | file = Path(log_file)
113 | record = {
114 | "date": time_string,
115 | "result": self.signin_result,
116 | "points": self.points
117 | }
118 | previous_records = {}
119 | if file.is_file():
120 | try:
121 | with open(log_file, 'r') as f:
122 | previous_records = json.load(f)
123 | if not previous_records.get(self.user):
124 | previous_records[self.user] = []
125 | previous_records[self.user].insert(0, record)
126 | previous_records[self.user] = previous_records[self.user][:max_num]
127 | except Exception as e:
128 | self.logger.error("序列化日志时出错:"+repr(e))
129 | else:
130 | previous_records[self.user] = [record]
131 | with open(log_file, 'w', encoding='utf-8') as f:
132 | json.dump(previous_records, f, indent=4)
133 | self.logger.info('日志保存成功')
134 |
135 |
136 | if __name__ == '__main__':
137 | accounts = [
138 | {
139 | "user": "", # 账户
140 | "password": "" # 密码
141 | }
142 | ]
143 | for acc in accounts:
144 | ry = RainYun(acc["user"], acc["password"]) # 实例
145 | ry.login() # 登录
146 | ry.signin() # 签到
147 | ry.query() # 查询积分
148 | ry.logout() # 登出
149 | # 保存日志则打开注释 推荐文件绝对路径
150 | # file = "./rainyun-signin-log.json"
151 | # 日志最大记录数量
152 | # max_num = 5
153 | # ry.log(file, max_num) # 保存日志
--------------------------------------------------------------------------------
/雨云.py:
--------------------------------------------------------------------------------
1 | # -*- coding: utf-8 -*-
2 | # @Time: 2023年04月23日21时26分
3 | import requests
4 | from datetime import datetime, timedelta, timezone
5 | from pathlib import Path
6 | import logging
7 | import json
8 |
9 | ''''脚本使用说明:
10 |
11 | 第一步:上传本脚本到青龙
12 | 第二步:去 〖https://www.rainyun.com/Mzk2ODk=_〗 注册一个账号(不提现只抢游戏云和主机的话不用实名)
13 | 第三步:本脚本里第139、140行里设置一下自己注册的账号和密码!!!
14 | 第四步:时间规则:0 0 23 * * ? #每天 23 点执行一次 (可以按自己的需求,每天执行一次)
15 |
16 | 积分规则: 本脚本是每天实现自动签到(每天300个积分),入门级游戏云或者虚拟主机2000积分一周,这样下来一直用积分续费
17 |
18 | 提现规则:6万积分起提现(稳到,不过建议用来续费游戏云比较划算)
19 |
20 | 其他说明:
21 | ①先去完成新人积分任务,点击 左上角菜单-积分中心-赚取积分 ,完成以后大概会有7000积分(积分商城每天20点刷新,到时自己抢一下主机或者游戏云)
22 | ②2000积分就可以领取一个免费的MC服务器或者主机,而且可以用积分进行续费!续费也只需要2000积分!
23 | 前期积分任务做完加上每日签到,足够免费续费一个月了!后面一直用积分续费。
24 |
25 | '''
26 | # 忽略 不验证ssl的提示
27 | import warnings
28 | warnings.filterwarnings('ignore')
29 |
30 | class RainYun():
31 |
32 | def __init__(self, user: str, pwd: str) -> None:
33 | # 认证信息
34 | self.user = user.lower()
35 | self.pwd = pwd
36 | self.json_data = json.dumps({
37 | "field": self.user,
38 | "password": self.pwd,
39 | })
40 | # 日志输出
41 | self.logger = logging.getLogger(self.user)
42 | formatter = logging.Formatter(datefmt='%Y/%m/%d %H:%M:%S',
43 | fmt="%(asctime)s 雨云 %(levelname)s: 用户<%(name)s> %(message)s")
44 | handler = logging.StreamHandler()
45 | handler.setFormatter(formatter)
46 | self.logger.addHandler(handler)
47 | self.logger.setLevel(logging.INFO)
48 | # 签到结果初始化
49 | self.signin_result = False
50 | # 请求设置
51 | self.session = requests.Session()
52 | self.session.headers.update({
53 | "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/102.0.0.0 Safari/537.36",
54 | "Origin": "https://api.rainyun.cc",
55 | "Referer": "https://api.rainyun.cc"
56 | })
57 | self.login_url = "https://api.v2.rainyun.com/user/login"
58 | self.signin_url = "https://api.v2.rainyun.com/user/reward/tasks"
59 | self.logout_url = "https://api.v2.rainyun.com/user/logout"
60 | self.query_url = "https://api.v2.rainyun.com/user/"
61 | # 忽略 .cc ssl错误
62 | self.session.verify = False
63 |
64 | def login(self) -> None:
65 | """登录"""
66 | res = self.session.post(
67 | url=self.login_url, headers={"Content-Type": "application/json"}, data=self.json_data)
68 | if res.text.find("200") > -1:
69 | self.logger.info("登录成功")
70 | self.session.headers.update({
71 | "X-CSRF-Token": res.cookies.get("X-CSRF-Token", "")
72 | })
73 | else:
74 | self.logger.error(f"登录失败,响应信息:{res.text}")
75 |
76 | def signin(self) -> None:
77 | """签到"""
78 | res = self.session.post(url=self.signin_url, headers={"Content-Type": "application/json"}, data=json.dumps({
79 | "task_name": "每日签到",
80 | "verifyCode": ""
81 | }))
82 | self.signin_date = datetime.utcnow()
83 | if res.text.find("200") > -1:
84 | self.logger.info("成功签到并领取积分")
85 | self.signin_result = True
86 | else:
87 | self.logger.error(f"签到失败,响应信息:{res.text}")
88 | self.signin_result = False
89 |
90 | def logout(self) -> None:
91 | res = self.session.post(url=self.logout_url)
92 | if res.text.find("200") > -1:
93 | self.logger.info('已退出登录')
94 | else:
95 | self.logger.warning(f"退出登录时出了些问题,响应信息:{res.text}")
96 |
97 | def query(self) -> None:
98 | res = self.session.get(url=self.query_url)
99 | self.points = None
100 | if res.text.find("200") > -1:
101 | data = res.json()["data"]
102 | self.points = data.get("Points", None) or data["points"]
103 | self.logger.info("积分查询成功为 " + repr(self.points))
104 | else:
105 | self.logger.error(f"积分信息失败,响应信息:{res.text}")
106 |
107 | def log(self, log_file: str, max_num=5) -> None:
108 | """存储本次签到结果的日志"""
109 | # 北京时间
110 | time_string = self.signin_date.replace(tzinfo=timezone.utc).astimezone(
111 | timezone(timedelta(hours=8))).strftime("%Y/%m/%d %H:%M:%S")
112 | file = Path(log_file)
113 | record = {
114 | "date": time_string,
115 | "result": self.signin_result,
116 | "points": self.points
117 | }
118 | previous_records = {}
119 | if file.is_file():
120 | try:
121 | with open(log_file, 'r') as f:
122 | previous_records = json.load(f)
123 | if not previous_records.get(self.user):
124 | previous_records[self.user] = []
125 | previous_records[self.user].insert(0, record)
126 | previous_records[self.user] = previous_records[self.user][:max_num]
127 | except Exception as e:
128 | self.logger.error("序列化日志时出错:"+repr(e))
129 | else:
130 | previous_records[self.user] = [record]
131 | with open(log_file, 'w', encoding='utf-8') as f:
132 | json.dump(previous_records, f, indent=4)
133 | self.logger.info('日志保存成功')
134 |
135 |
136 | if __name__ == '__main__':
137 | accounts = [
138 | {
139 | "user": "", # 账户
140 | "password": "" # 密码
141 | }
142 | ]
143 | for acc in accounts:
144 | ry = RainYun(acc["user"], acc["password"]) # 实例
145 | ry.login() # 登录
146 | ry.signin() # 签到
147 | ry.query() # 查询积分
148 | ry.logout() # 登出
149 | # 保存日志则打开注释 推荐文件绝对路径
150 | # file = "./rainyun-signin-log.json"
151 | # 日志最大记录数量
152 | # max_num = 5
153 | # ry.log(file, max_num) # 保存日志
154 |
--------------------------------------------------------------------------------
/书亦烧仙草 (修).py:
--------------------------------------------------------------------------------
1 | """
2 | 1. 书亦烧仙草签到 抓包scrm-prod.shuyi.org.cn域名请求头里的auth
3 | 脚本仅供学习交流使用, 请在下载后24h内删除
4 | 2. cron 以防cor识别出错每天运行两次左右
5 | 3. ddddocr搭建方法https://github.com/sml2h3/ocr_api_server #如果脚本里的失效请自行搭建
6 | 4. 已知问题,多账号无法运行,python大佬帮忙修修吧
7 | """
8 | import requests, base64, json, time, os
9 |
10 | try:
11 | from Crypto.Cipher import AES
12 | except:
13 | print(
14 | "\n未检测到pycryptodome\n需要Python依赖里安装pycryptodome\n安装失败先linux依赖里安装gcc、python3-dev、libc-dev\n如果还是失败,重启容器,或者重启docker就能解决")
15 | exit(0)
16 |
17 | def setHeaders(i):
18 | headers = {
19 | "auth": cookies[i],
20 | "hostname": "scrm-prod.shuyi.org.cn",
21 | "content-type": "application/json",
22 | "host": "scrm-prod.shuyi.org.cn",
23 | "User-Agent": "Mozilla/5.0 (Linux; Android 10; V2203A Build/SP1A.210812.003; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/107.0.5304.141 Mobile Safari/537.36 XWEB/5023 MMWEBSDK/20221012 MMWEBID/1571 MicroMessenger/8.0.30.2260(0x28001E55) WeChat/arm64 Weixin NetType/WIFI Language/zh_CN ABI/arm64 MiniProgramEnv/android"
24 | }
25 | return headers
26 |
27 | cookies = []
28 | try:
29 | cookies = os.environ["sysxc_auth"].split("&")
30 | if len(os.environ["sysxc_auth"]) > 0:
31 | print("已获取并使用Env环境Cookie\n声明:本脚本为学习python,请勿用于非法用途\n")
32 |
33 |
34 | except:
35 | print(
36 | "【提示】请先添加sysxc_auth")
37 | exit(3)
38 |
39 | def getVCode(headers):
40 | """获取滑块图片"""
41 | data = {
42 | "captchaType": "blockPuzzle",
43 | "clientUid": "slider-6292e85b-e871-4abd-89df-4d97709c6e0c",
44 | "ts": int(time.time() * 1000)
45 | }
46 | url = 'https://scrm-prod.shuyi.org.cn/saas-gateway/api/agg-trade/v1/signIn/getVCode'
47 | response = requests.post(url, json=data, headers=headers)
48 | return response.json()
49 |
50 |
51 |
52 | def ocr(tg,bg):
53 | """使用自有ocr识别滑块坐标"""
54 | url = 'http://103.45.185.224:9898/slide/match/b64/json'
55 | jsonstr = json.dumps({'target_img': tg, 'bg_img': bg})
56 | response = requests.post(url, data=base64.b64encode(jsonstr.encode()).decode())
57 | return response.json()
58 |
59 |
60 | '''
61 | 采用AES对称加密算法
62 | '''
63 |
64 | BLOCK_SIZE = 16 # Bytes
65 | pad = lambda s: s + (BLOCK_SIZE - len(s) % BLOCK_SIZE) * \
66 | chr(BLOCK_SIZE - len(s) % BLOCK_SIZE)
67 | unpad = lambda s: s[:-ord(s[len(s) - 1:])]
68 |
69 |
70 | def aesEncrypt(key, data):
71 | '''
72 | AES的ECB模式加密方法
73 | :param key: 密钥
74 | :param data:被加密字符串(明文)
75 | :return:密文
76 | '''
77 | key = key.encode('utf8')
78 | # 字符串补位
79 | data = pad(data)
80 | cipher = AES.new(key, AES.MODE_ECB)
81 | # 加密后得到的是bytes类型的数据,使用Base64进行编码,返回byte字符串
82 | result = cipher.encrypt(data.encode())
83 | encodestrs = base64.b64encode(result)
84 | enctext = encodestrs.decode('utf8')
85 | return enctext
86 |
87 |
88 | def aesDecrypt(key, data):
89 | '''
90 |
91 | :param key: 密钥
92 | :param data: 加密后的数据(密文)
93 | :return:明文
94 | '''
95 | key = key.encode('utf8')
96 | data = base64.b64decode(data)
97 | cipher = AES.new(key, AES.MODE_ECB)
98 |
99 | # 去补位
100 | text_decrypted = unpad(cipher.decrypt(data))
101 | text_decrypted = text_decrypted.decode('utf8')
102 | return text_decrypted
103 |
104 |
105 | def checkVCode(pointJson, token):
106 | """验证"""
107 | try:
108 | data = {
109 | "captchaType": "blockPuzzle",
110 | "pointJson": pointJson,
111 | "token": token
112 | }
113 | url = 'https://scrm-prod.shuyi.org.cn/saas-gateway/api/agg-trade/v1/signIn/checkVCode'
114 | response = requests.post(url, json=data, headers=headers)
115 | result = response.json()
116 | # print(result)
117 | resultCode = result['resultCode']
118 | if resultCode == '0000':
119 | print('校验结果:', '成功')
120 | else:
121 | print('校验结果:', result['resultMsg'])
122 |
123 | except Exception as err:
124 | print(err)
125 |
126 |
127 | def check_sign(pointJson):
128 | """签到"""
129 | try:
130 | data = {
131 | "captchaVerification": pointJson
132 | }
133 | url = 'https://scrm-prod.shuyi.org.cn/saas-gateway/api/agg-trade/v1/signIn/insertSignInV3'
134 | response = requests.post(url, json=data, headers=headers)
135 | result = response.json()
136 | resultCode = result['resultCode']
137 | if resultCode == 0:
138 | print("签到结果: 第{result['data']['days']天} 获得{result['data']['pointRewardNum']积分}")
139 | else:
140 | print('签到结果:', result['resultMsg'])
141 | except Exception as err:
142 | print(err)
143 |
144 | def main():
145 | result = getVCode(headers)
146 | bg = result['data']['originalImageBase64']
147 | tg = result['data']['jigsawImageBase64']
148 | key = result['data']['secretKey']
149 | token = result['data']['token']
150 | time.sleep(1.5)
151 | print("--------------------识别滑块--------------------")
152 | result = ocr(tg,bg)
153 | res = result['result']['target']
154 | d = (res[0])
155 | print('滑动距离为:', d)
156 | print("--------------------执行算法--------------------")
157 | aes_str = json.dumps({"x": d, "y": 5})
158 | data = aes_str.replace(' ', '')
159 | print('加密前:', data)
160 | time.sleep(1.5)
161 | ecdata = aesEncrypt(key, data)
162 | aesDecrypt(key, ecdata)
163 | pointJson = aesEncrypt(key, data)
164 | print('加密后:', pointJson)
165 | print("--------------------校验滑块--------------------")
166 | checkVCode(pointJson, token)
167 | print("--------------------开始签到--------------------")
168 | str = (token + '---' + aes_str)
169 | data = str.replace(' ', '')
170 | ecdata = aesEncrypt(key, data)
171 | aesDecrypt(key, ecdata)
172 | pointJson = aesEncrypt(key, data)
173 | time.sleep(0.5)
174 | check_sign(pointJson)
175 |
176 | if __name__ == '__main__':
177 |
178 | print("--------------------任务开始--------------------")
179 | for i in range(len(cookies)):
180 | print(f"开始第{i + 1}个账号")
181 | headers = setHeaders(i)
182 | main()
183 |
184 |
--------------------------------------------------------------------------------
/aes(RAS)加解密.py:
--------------------------------------------------------------------------------
1 | import base64
2 | from Crypto.Cipher import PKCS1_v1_5 as Cipher_pkcs1_v1_5, AES
3 | from Crypto.PublicKey import RSA
4 | from Crypto.Util.Padding import pad
5 |
6 | # 请求数据加密
7 | publicKey = '''-----BEGIN RSA PUBLIC KEY-----
8 | MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA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2XZrDRqeqTsBzbEM2qCBmYXIgVf/K0rWLbWA72h7sP2m2PmvnwcFSl6NvDh+vhZyBqOykrEl2utLlwFx1nOBqNxEbLoR8RqILTsRa5GdtlrApr+TF938BRNnVoXJR0P5+X2+194JQnjzagwYEleGRtHV3XOjFBDL2felNApnJ2aLcKCIF2IM8EeGRYU8QpM8rl4aSL/7C3X4QC80OaqvS1zbCYdRRcRhQXkuFHstn5inPL+4j5caBhcUfQd8tEWVUsNcYdOCogaeEwy4Er8ITeHn3RA==","encryptData":"QwA8jmkhqKP1L6uf/SZf5g=="}
26 |
27 |
28 | encryptKey = data_1['encryptKey']
29 | encryptData = data_1['encryptData']
30 |
31 |
32 | #RSA 加密方法
33 | def rsa_ecrypt():
34 | # 加密方
35 | ecrypt_text = 'ajgekbmgfkasefqk@DS@cd1d955be8e4c11a'.encode('utf8')
36 | pub_key = RSA.importKey(publicKey)
37 | cipher = Cipher_pkcs1_v1_5.new(pub_key)
38 | rsa_text = base64.b64encode(cipher.encrypt(ecrypt_text))
39 | print(rsa_text)
40 | return rsa_text
41 |
42 | # RSA 解密方法
43 | def rsa_decrypt():
44 | # 加密的数据
45 | ciphertext = encryptKey
46 | print(privateKey)
47 | # 请求解密
48 | # private_key = RSA.importKey(privateKey)
49 | # 返回解密
50 | private_key = RSA.importKey(privateKey)
51 | cipher = Cipher_pkcs1_v1_5.new(private_key)
52 | plaintext = cipher.decrypt(base64.b64decode(ciphertext),None)
53 | print(plaintext.decode('utf8'))
54 | return plaintext.decode('utf8')
55 |
56 | # 非对称AES加密
57 | def aes_encrypt():
58 | key = '27czygby174toajw'
59 | vi = 'gj40819yc7qmjux4'
60 |
61 | data = '''{"subjectId":"1651538844278808578","subjectType":"POST"}'''
62 | data = pad(data.encode('utf8'), 16)
63 | cipher = AES.new(key.encode('utf8'), AES.MODE_CBC, vi.encode('utf8'))
64 | encryptedbytes = cipher.encrypt(data)
65 | # 加密后得到的是bytes类型的数据,使用Base64进行编码,返回byte字符串
66 | encodestrs = base64.b64encode(encryptedbytes)
67 | # 对byte字符串按utf-8进行解码
68 | enctext = encodestrs.decode('utf8')
69 | print(enctext)
70 | return enctext
71 |
72 | # 对称加密AES 解密
73 | def aes_decrypt(key,vi):
74 | print(key,vi)
75 | data = encryptData
76 | data = data.encode('utf8')
77 | key = key
78 | vi = vi
79 | encodebytes = base64.decodebytes(data)
80 | # 将加密数据转换位bytes类型数据
81 | cipher = AES.new(key.encode('utf8'), AES.MODE_CBC, vi.encode('utf8'))
82 | text_decrypted = cipher.decrypt(encodebytes)
83 | print(text_decrypted.decode('utf8'))
84 | return text_decrypted
85 |
86 |
87 | # aes_encrypt()
88 | # rsa_ecrypt()
89 |
90 | plaintext = rsa_decrypt()
91 | print('11111'+plaintext)
92 |
93 | key = plaintext.split('@DS@')[0]
94 | vi = plaintext.split('@DS@')[1]
95 | aes_decrypt(key,vi)
96 |
97 |
98 |
99 |
--------------------------------------------------------------------------------
/书亦烧仙草(4.2修).py:
--------------------------------------------------------------------------------
1 | """
2 | 1. 书亦烧仙草签到 抓包scrm-prod.shuyi.org.cn域名请求头里的auth
3 | 脚本仅供学习交流使用, 请在下载后24h内删除
4 | 2. cron 以防ocr识别出错每天运行两次左右
5 | 3. ddddocr搭建方法https://github.com/sml2h3/ocr_api_server #如果脚本里的失效请自行搭建
6 | """
7 | import json,logging,os,sys,time,base64,requests
8 | from os import environ, system, path
9 |
10 | logger = logging.getLogger(name=None)
11 | logging.Formatter("%(message)s")
12 | logger.setLevel(logging.INFO)
13 | logger.addHandler(logging.StreamHandler())
14 |
15 | def load_send():
16 | global send, mg
17 | cur_path = path.abspath(path.dirname(__file__))
18 | if path.exists(cur_path + "/notify.py"):
19 | try:
20 | from notify import send
21 | print("加载通知服务成功!")
22 | except:
23 | send = False
24 | print("加载通知服务失败~")
25 | else:
26 | send = False
27 | print("加载通知服务失败~")
28 |
29 | load_send()
30 |
31 | try:
32 | from Crypto.Cipher import AES
33 | except:
34 | logger.info(
35 | "\n未检测到pycryptodome\n需要Python依赖里安装pycryptodome\n安装失败先linux依赖里安装gcc、python3-dev、libc-dev\n如果还是失败,重启容器,或者重启docker就能解决")
36 | exit(0)
37 |
38 | def setHeaders(i):
39 | headers = {
40 | "auth": cookies[i],
41 | "hostname": "scrm-prod.shuyi.org.cn",
42 | "content-type": "application/json",
43 | "host": "scrm-prod.shuyi.org.cn",
44 | "User-Agent": "Mozilla/5.0 (Linux; Android 10; V2203A Build/SP1A.210812.003; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/107.0.5304.141 Mobile Safari/537.36 XWEB/5023 MMWEBSDK/20221012 MMWEBID/1571 MicroMessenger/8.0.30.2260(0x28001E55) WeChat/arm64 Weixin NetType/WIFI Language/zh_CN ABI/arm64 MiniProgramEnv/android"
45 | }
46 | return headers
47 |
48 | cookies = []
49 | try:
50 | cookies = os.environ["sysxc_auth"].split("&")
51 | if len(os.environ["sysxc_auth"]) > 0:
52 | logger.info("已获取并使用Env环境Cookie\n声明:本脚本为学习python,请勿用于非法用途\n")
53 |
54 |
55 | except:
56 | logger.info(
57 | "【提示】请先添加sysxc_auth")
58 | exit(3)
59 |
60 | def getVCode(headers):
61 | """获取滑块图片"""
62 | data = {
63 | "captchaType": "blockPuzzle",
64 | "clientUid": "slider-6292e85b-e871-4abd-89df-4d97709c6e0c",
65 | "ts": int(time.time() * 1000)
66 | }
67 | url = 'https://scrm-prod.shuyi.org.cn/saas-gateway/api/agg-trade/v1/signIn/getVCode'
68 | response = requests.post(url, json=data, headers=headers)
69 | return response.json()
70 |
71 |
72 |
73 | def ocr(tg,bg):
74 | """使用自有ocr识别滑块坐标"""
75 | url = 'http://103.45.185.224:9898/slide/match/b64/json'
76 | jsonstr = json.dumps({'target_img': tg, 'bg_img': bg})
77 | response = requests.post(url, data=base64.b64encode(jsonstr.encode()).decode())
78 | return response.json()
79 |
80 |
81 | '''
82 | 采用AES对称加密算法
83 | '''
84 |
85 | BLOCK_SIZE = 16 # Bytes
86 | pad = lambda s: s + (BLOCK_SIZE - len(s) % BLOCK_SIZE) * \
87 | chr(BLOCK_SIZE - len(s) % BLOCK_SIZE)
88 | unpad = lambda s: s[:-ord(s[len(s) - 1:])]
89 |
90 |
91 | def aesEncrypt(key, data):
92 | '''
93 | AES的ECB模式加密方法
94 | :param key: 密钥
95 | :param data:被加密字符串(明文)
96 | :return:密文
97 | '''
98 | key = key.encode('utf8')
99 | # 字符串补位
100 | data = pad(data)
101 | cipher = AES.new(key, AES.MODE_ECB)
102 | # 加密后得到的是bytes类型的数据,使用Base64进行编码,返回byte字符串
103 | result = cipher.encrypt(data.encode())
104 | encodestrs = base64.b64encode(result)
105 | enctext = encodestrs.decode('utf8')
106 | return enctext
107 |
108 |
109 | def aesDecrypt(key, data):
110 | '''
111 | :param key: 密钥
112 | :param data: 加密后的数据(密文)
113 | :return:明文
114 | '''
115 | key = key.encode('utf8')
116 | data = base64.b64decode(data)
117 | cipher = AES.new(key, AES.MODE_ECB)
118 |
119 | # 去补位
120 | text_decrypted = unpad(cipher.decrypt(data))
121 | text_decrypted = text_decrypted.decode('utf8')
122 | return text_decrypted
123 |
124 |
125 | def checkVCode(pointJson, token):
126 | """验证"""
127 | try:
128 | data = {
129 | "captchaType": "blockPuzzle",
130 | "pointJson": pointJson,
131 | "token": token
132 | }
133 |
134 | url = 'https://scrm-prod.shuyi.org.cn/saas-gateway/api/agg-trade/v1/signIn/checkVCode'
135 | response = requests.post(url, json=data, headers=headers)
136 | result = response.json()
137 | resultCode = result['resultCode']
138 | resultMsg = result['resultMsg']
139 | if resultCode == '0000':
140 | logger.info(f"校验结果:成功")
141 | else:
142 | logger.info(f"校验结果: {resultMsg}")
143 | time.sleep(3)
144 | main()
145 | except Exception as err:
146 | print(err)
147 |
148 |
149 | def check_sign(pointJson):
150 | """签到"""
151 | try:
152 | data = {
153 | "captchaVerification": pointJson
154 | }
155 | url = 'https://scrm-prod.shuyi.org.cn/saas-gateway/api/agg-trade/v1/signIn/insertSignInV3'
156 | response = requests.post(url, json=data, headers=headers)
157 | result = response.json()
158 | resultCode = result['resultCode']
159 |
160 | resultMsg = result['resultMsg']
161 | if resultCode == '0':
162 | logger.info(f"签到结果:{result}")
163 | send('书亦烧仙草签到通知', result)
164 | else:
165 | logger.info(f"签到结果: {resultMsg}")
166 | send('书亦烧仙草签到通知', resultMsg)
167 | except Exception as err:
168 | print(err)
169 | sys.exit(0)
170 |
171 | def main():
172 | logger.info("--------------------任务开始--------------------")
173 | result = getVCode(headers)
174 | bg = result['data']['originalImageBase64']
175 | tg = result['data']['jigsawImageBase64']
176 | key = result['data']['secretKey']
177 | token = result['data']['token']
178 | logger.info(f"本次口令为: {token}")
179 | logger.info(f"本次密钥为: {key}")
180 | time.sleep(1.5)
181 | logger.info("--------------------识别滑块--------------------")
182 | result = ocr(tg,bg)
183 | res = result['result']['target']
184 | d = (res[0])
185 | logger.info(f"滑动距离为: {d}")
186 | logger.info("--------------------执行算法--------------------")
187 | aes_str = json.dumps({"x": d, "y": 5})
188 | data = aes_str.replace(' ', '')
189 | logger.info(f"加密前: {data}")
190 | time.sleep(1.5)
191 | ecdata = aesEncrypt(key, data)
192 | aesDecrypt(key, ecdata)
193 | pointJson = aesEncrypt(key, data)
194 | logger.info(f"加密后: {pointJson}")
195 | logger.info("--------------------校验滑块--------------------")
196 | checkVCode(pointJson, token)
197 | logger.info("--------------------开始签到--------------------")
198 | str = (token + '---' + aes_str)
199 | data = str.replace(' ', '')
200 | ecdata = aesEncrypt(key, data)
201 | aesDecrypt(key, ecdata)
202 | pointJson = aesEncrypt(key, data)
203 | time.sleep(0.5)
204 | check_sign(pointJson)
205 |
206 | if __name__ == '__main__':
207 | for i in range(len(cookies)):
208 | logger.info(f"\n开始第{i + 1}个账号")
209 |
210 | headers = setHeaders(i)
211 | main()
212 | logger.info("所有账号执行完成\n")
213 | sys.exit(0)
214 |
215 |
--------------------------------------------------------------------------------
/必应v1.4.py:
--------------------------------------------------------------------------------
1 | """
2 | Edge必应自动搜索赚积分
3 | 使用Edge浏览器打开必应 https://rewards.bing.com/ F12抓取Cookie即可 正确的CK格式是以MUID=xxxxxxx开头的
4 | 当前版本:v1.4
5 |
6 | 变量名:bingCK 多账号换行
7 | bingDetectionStop 是否检测到积分未增长自动停止任务 默认为true 不需要该功能则额外定义变量,值为false
8 |
9 | 如果执行的发现积分不增长,且脚本上显示的积分跟实际不符,很有可能不是同一个账号的cookie,建议重新抓取。
10 | 玄学报错目前无解,凑合用吧!
11 | """
12 | import requests
13 | import os
14 | import time
15 | import random
16 | import json
17 | import datetime
18 | import re
19 | import urllib.parse
20 | from time import strftime
21 |
22 | old_Balance = 0
23 | bingDetectionStop = os.getenv("bingDetectionStop")
24 | #获取用户信息
25 | def getDashboard(bingCK):
26 | try:
27 | url = 'https://rewards.bing.com/pointsbreakdown'
28 | headers = {
29 | "cookie": bingCK,
30 | "User-Agent": "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/50.0.2661.87 Safari/537.36"
31 | };
32 | resp = requests.get(url, headers = headers).text
33 | str_start = 'var dashboard = '
34 | str_end = '{}};'
35 | retStr = find(resp,str_start,str_end)+"{}}"
36 | return retStr
37 | except Exception as e:
38 | return '调用接口出现异常' + str(e)
39 |
40 | #获取当前积分
41 | def getBalance(bingCK):
42 | try:
43 | url = 'https://cn.bing.com/rewardsapp/reportActivity'
44 | headers = {
45 | "cookie": bingCK,
46 | "User-Agent": "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/50.0.2661.87 Safari/537.36"
47 | };
48 | resp = requests.get(url, headers = headers).text
49 | str_start = 'RewardsBalance":'
50 | str_end = ',"GiveBalance'
51 | retStr = find(resp,str_start,str_end)
52 | return retStr
53 | except Exception as e:
54 | return '调用接口出现异常' + str(e)
55 |
56 | #搜索
57 | def bing_rewards(q_str,bingCK,isPc):
58 | try:
59 | url = f'https://cn.bing.com/search?q={q_str}'
60 | if isPc == 1:
61 | ua = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/108.0.0.0 Safari/537.36 Edg/108.0.1462.54"
62 | else:
63 | ua = "Mozilla/5.0 (Linux; Android 12; Mi 10 Pro Build/SKQ1.220303.001; ) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/99.0.4844.88 Mobile Safari/537.36 BingSapphire/23.5.2110003534"
64 |
65 | headers = {
66 | "cookie":bingCK,
67 | "referer": "https://cn.bing.com",
68 | "User-Agent": ua
69 | }
70 | resp = requests.get(url,headers=headers)
71 | code = resp.status_code
72 | if code == 200:
73 | msg = '成功'
74 | else:
75 | msg = '失败'
76 | retStr = msg
77 | return retStr
78 | except Exception as e:
79 | return '调用接口出现异常'+str(e)
80 |
81 | #随机生成一个汉字
82 | def get_random_char():
83 | # 汉字编码的范围是0x4e00 ~ 0x9fa5
84 | random.seed()
85 | val = random.randint(0x4e00, 0x9fa5)
86 | # 转换为Unicode编码
87 | return chr(val)
88 |
89 | #分割函数
90 | def find(str,str_start,str_end):
91 | start_index = str.find(str_start) + len(str_start)
92 | end_index = str.find(str_end)
93 | retStr = str[start_index: end_index].rstrip()
94 | return retStr
95 |
96 | #执行
97 | def startMain(bingCK):
98 | '''
99 | try:
100 | userDashboard_json = json.loads(getDashboard(bingCK))
101 | activeLevel = userDashboard_json['userStatus']['levelInfo']['activeLevel']
102 | activeLevelName = userDashboard_json['userStatus']['levelInfo']['activeLevelName']
103 | progress = userDashboard_json['userStatus']['levelInfo']['progress']
104 | progressMax = userDashboard_json['userStatus']['levelInfo']['progressMax']
105 | if activeLevel == 'Level1':
106 | printLog('当前等级',f'{activeLevelName}[{progress}/{progressMax}]')
107 | else:
108 | printLog('当前等级',f'{activeLevelName}[{progress}]')
109 | except Exception as e:
110 | activeLevel = 'Level2'
111 | printLog('当前等级','获取失败')
112 | '''
113 | #根据当前积分判断用户组
114 | start_Balance = getBalance(bingCK)
115 | if int(start_Balance) < 500:
116 | activeLevel = 'Level1'
117 | printLog('当前用户组','第一阶段')
118 | upBalance = getBalanceGap(start_Balance,500)
119 | printLog('距离升级下一阶段',f'还需要{upBalance}积分')
120 | else:
121 | activeLevel = 'Level2'
122 | printLog('当前用户组','第二阶段')
123 | old_Balance = start_Balance
124 | if activeLevel == 'Level1':
125 | #pc端搜索10次
126 | for i in range(10):
127 | q_str = urllib.parse.quote(get_random_char().encode('utf-8'))
128 | printLog(f'电脑搜索第{i+1}次',bing_rewards(q_str,bingCK,1))
129 | new_Balance = getBalance(bingCK)
130 | printLog(f'积分',new_Balance)
131 | if bingDetectionStop != 'false':
132 | if getBalanceGap(old_Balance,new_Balance) <= 0:
133 | printLog('检测','积分未变动,停止运行!')
134 | break
135 | old_Balance = new_Balance
136 | rand = random.randint(3,5)
137 | time.sleep(rand)
138 | else:
139 | #pc端搜索35次
140 | for i in range(35):
141 | q_str = urllib.parse.quote(get_random_char().encode('utf-8'))
142 | printLog(f'电脑搜索第{i+1}次',bing_rewards(q_str,bingCK,1))
143 | new_Balance = getBalance(bingCK)
144 | printLog(f'积分',new_Balance)
145 | if bingDetectionStop != 'false':
146 | if getBalanceGap(old_Balance,new_Balance) <= 0:
147 | printLog('检测','积分未变动,停止运行!')
148 | break
149 | old_Balance = new_Balance
150 | rand = random.randint(3,5)
151 | time.sleep(rand)
152 | #安卓端搜索20次
153 | for i in range(20):
154 | q_str = urllib.parse.quote(get_random_char().encode('utf-8'))
155 | printLog(f'安卓搜索第{i+1}次',bing_rewards(q_str,bingCK,0))
156 | new_Balance = getBalance(bingCK)
157 | printLog(f'积分',new_Balance)
158 | if bingDetectionStop != 'false':
159 | if getBalanceGap(old_Balance,new_Balance) <= 0:
160 | printLog('检测','积分未变动,停止运行!')
161 | break
162 | old_Balance = new_Balance
163 | rand = random.randint(3,5)
164 | time.sleep(rand)
165 | end_Balance = getBalance(bingCK)
166 | increase_Balance = getBalanceGap(start_Balance,end_Balance)
167 | printLog('本次增加积分',f'{increase_Balance}')
168 |
169 | #计算积分增长数
170 | def getBalanceGap(old_Balance,new_Balance):
171 | return int(new_Balance) - int(old_Balance)
172 |
173 | #nvl函数
174 | def nvl(str):
175 | if not str is None:
176 | out = str
177 | else:
178 | out = ''
179 | return out
180 |
181 | #输出日志
182 | def printLog(title,msg):
183 | now=datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S")
184 | print(now+f' [{title}]:'+nvl(msg))
185 |
186 | if __name__ == '__main__':
187 | if bingDetectionStop == '':
188 | bingDetectionStop = 'true'
189 | bingCK = os.getenv("bingCK")
190 | cks = bingCK.split("\n")
191 | print(f"检测到{len(cks)}个账号,即将开始...")
192 | i = 1
193 | for ck in cks:
194 | print(f"\n---开始第{i}个账号---")
195 | i += 1
196 | startMain(ck)
197 | rand = random.randint(5,20)
198 | if i > len(cks):
199 | break
200 | print(f"\n等待{rand}s后进行下一个账号")
201 | time.sleep(rand)
202 |
--------------------------------------------------------------------------------
/jrttjsbqd.py:
--------------------------------------------------------------------------------
1 | import requests
2 | import json
3 | #by:不才
4 | #就一个简单签到,不会用青龙变量,还在学,其它任务也在摸索,简单抓包请求,大佬看到写个完整的出来吧
5 | #只有有开宝箱视频,签到,开宝箱接口,目测都是几金币,应该就签到能用吧,抓包:全部api5—normal域名全部cookie
6 | #跑宝箱的定时0 0 */10 * * *,只跑签到0 * * *
7 | cookie = ""#全部cookie
8 | # pushplus推送
9 | token = ""
10 | notice = 0#0为不推送
11 |
12 | print("这是一个垃圾本")
13 | name = "今日头条极速版签到"
14 | #签到
15 | url = "https://api5-normal-lq.toutiaoapi.com/luckycat/lite/v1/sign_in/action?sa_enable=0&channel=lite_vivo_64&static_settings_version=49&device_type=V2055A&language=zh&ab_client=a1%2Ce1%2Cf2%2Cg2%2Cf7&resolution=1080%2A2319&update_version_code=93015&cdid=1342e43c-037e-4e4d-97ee-ccccd3bd7d70&abflag=3&rit=coin&dynamic_settings_version=49&ac=wifi&device_id=3180260224926509&version_code=930&luckydog_api_version=8.2.0-rc.14&ab_version=668908%2C6042572%2C5315659%2C1859936%2C668905%2C6042536%2C668904%2C6042527%2C668907%2C6042568%2C668906%2C6042544%2C668776%2C6042565%2C668903%2C6042562%2C3891688%2C4743964%2C6142131&luckydog_base=GZWblGmfKUi5Qfp34GQzeBS05UY2PHwBHdefVAAevxuas-KbODrPBvNbskykaZ1Oa7ko8yyaEx8x3S9nozCW6A7BqqQnsLHXRY2S0aCbQe3McmPg9RYoRhIbsH_DMr71fbtrEhhTqpFQlaSlJ_9jWVFAjhsV9_KaIo4y8io3SJcXnNNO1A01EV_sNAIt5d5M&plugin_state=821344778461205&device_platform=android&aid=35&rom_version=33&manifest_version_code=9300&_rticket=1684215697280&iid=3521073794792040&isTTWebView=1&use_ecpm=0&host_abi=arm64-v8a&is_pad=0&dq_param=0&status_bar_height=28&os_api=33&luckydog_data=OwSWR2KExBGsnIhhAzsCKSI3qwiOQSEnPY7hZ_Lr821M3wtmvhZM6hNu_5jl-T5-WpeHJFGNjq4QCN7vYGa-e5_Nbk_vO76SBaGTojlgsuM&dpi=480&ab_feature=z1&polling_settings_version=0&os=android&pass_through=null&os_version=13&session_id=baa1ead1-bd49-4244-a9ad-b036f5c41e9e&luckydog_token=OWodj3qAQ8nqP-g_tuCvijvHI6SGN4ma9cr1E2Xl1Q-2UWz73rnOm9TZKwDscrls&app_name=news_article_lite&version_name=9.3.0&device_brand=vivo&ssmix=a&luckydog_sdk_version=8.2.0-rc.14&polaris_version=1.0.5&luckycat_version_name=8.2.0-rc.14&luckycat_version_code=820014&lucky_is_32=0&lucky_device_score=8.9371&lucky_device_type=V2055"
16 | payload = json.dumps({
17 | "use_ecpm": 0,
18 | "rit": "coin"
19 | })
20 | # 宝箱
21 | url2 = "https://api5-normal-lq.toutiaoapi.com/score_task/v1/task/open_treasure_box/?sa_enable=0&channel=lite_vivo_64&static_settings_version=49&device_type=V2055A&language=zh&ab_client=a1%2Ce1%2Cf2%2Cg2%2Cf7&resolution=1080%2A2319&update_version_code=93015&cdid=1342e43c-037e-4e4d-97ee-ccccd3bd7d70&abflag=3&rit=coin&dynamic_settings_version=49&ac=wifi&device_id=3180260224926509&version_code=930&luckydog_api_version=8.2.0-rc.14&ab_version=668908%2C6042572%2C5315659%2C1859936%2C668905%2C6042536%2C668904%2C6042527%2C668907%2C6042568%2C668906%2C6042544%2C668776%2C6042565%2C668903%2C6042562%2C3891688%2C4743964%2C6142131&luckydog_base=9ccbBhPEuSwIcUIGXWk2VTvbnV6aIw2EHxbCxuSf2SWYDqVJ2Haa1_ZuKZpBzPe_qm_Gs7htZL0eMeaLW0C_LuO-O7F4n2HhZSMybMUhWLa6eLaUTrsdi1YWf4AvL-IFnpPb1L_EPrXcdkC_Gcnu5OIHWEqIMbYksK-_jC2gvJRy_GI8ByhCN652Exwb5eOt&plugin_state=821344778461205&device_platform=android&aid=35&rom_version=33&manifest_version_code=9300&_rticket=1684305292677&iid=3521073794792040&isTTWebView=1&use_ecpm=0&host_abi=arm64-v8a&is_pad=0&dq_param=0&status_bar_height=28&os_api=33&luckydog_data=kHIy9gAlIV5GXfacUAUB96QaRxexpDKqSEu-dJnRHZ41OKUAcsMEqJd6eZfDwIF3V6XvpwaeK_pyIxoKeio9UiKUiLswccR-FIf7WC5fMWw&dpi=480&ab_feature=z1&polling_settings_version=0&os=android&pass_through=null&os_version=13&session_id=d13a8602-9ab3-4fd3-968e-8f262a4b7b0f&luckydog_token=OWodj3qAQ8nqP-g_tuCvijvHI6SGN4ma9cr1E2Xl1Q-2UWz73rnOm9TZKwDscrls&app_name=news_article_lite&version_name=9.3.0&device_brand=vivo&ssmix=a&luckydog_sdk_version=8.2.0-rc.14&polaris_version=1.0.5&luckycat_version_name=8.2.0-rc.14&luckycat_version_code=820014&lucky_is_32=0&lucky_device_score=8.9371&lucky_device_type=V2055"
22 | payload2 = json.dumps({
23 | "from": "task_page",
24 | "use_ecpm": 0,
25 | "rit": "coin",
26 | "open_treasure_box_enter_from": ""
27 | })
28 | # 开宝箱看视频
29 | url3 = "https://api5-normal-lq.toutiaoapi.com/luckycat/lite/v1/task/done/excitation_ad?manifest_version_code=9300&_rticket=1684306826048&sa_enable=0&iid=3521073794792040&channel=lite_vivo_64&isTTWebView=1&static_settings_version=49&device_type=V2055A&language=zh&host_abi=arm64-v8a&ab_client=a1%2Ce1%2Cf2%2Cg2%2Cf7&resolution=1080%2A2319&is_pad=0&update_version_code=93015&dq_param=0&status_bar_height=28&cdid=1342e43c-037e-4e4d-97ee-ccccd3bd7d70&os_api=33&abflag=3&luckydog_data=ASsoNMAQxvxvcj9d60wSCRYYBjvzKuBwyZa5Gjf861HoFWEWXcG86gAjo2TfRev3OwXDyDxpSiodUrL37Y4wDJ0hsucjNYVtpFbBXYIOwAM&dpi=480&ab_feature=z1&dynamic_settings_version=49&ac=wifi&polling_settings_version=0&device_id=3180260224926509&os=android&pass_through=null&os_version=13&version_code=930&session_id=7ab08340-ac85-4636-b793-0e65047ec86a&luckydog_token=OWodj3qAQ8nqP-g_tuCvijvHI6SGN4ma9cr1E2Xl1Q-2UWz73rnOm9TZKwDscrls&luckydog_api_version=8.2.0-rc.14&app_name=news_article_lite&ab_version=668908%2C6042572%2C5315659%2C1859936%2C668905%2C6042536%2C668904%2C6042527%2C668907%2C6042568%2C668906%2C6042544%2C668776%2C6042565%2C668903%2C6042562%2C3891688%2C4743964%2C6142131&version_name=9.3.0&luckydog_base=sBRpO82VKKTFVTlFZqMyqYSdg7NYyfH1p6z98zuOOhCR_Y7pxrbXpLvbWA2Db1PRL0izln3S9VBhOo07eRyqvK0eYqqR5vsxceIxXvtHc5kGBjOoGb6zIYrQTilSjut67czYQtINeK-Tpc1ivCX3IAN-19Ccm9mRCdU6s7VE1cTMpSdYiolG-0-P1M9q1EFC&device_brand=vivo&ssmix=a&luckydog_sdk_version=8.2.0-rc.14&plugin_state=821344778461205&device_platform=android&polaris_version=1.0.5&aid=35&rom_version=33&luckycat_version_name=8.2.0-rc.14&luckycat_version_code=820014&lucky_is_32=0&lucky_device_score=8.9371&lucky_device_type=V2055"
30 |
31 | payload3 = json.dumps({
32 | "ad_id": "2",
33 | "amount": "702",
34 | "ad_rit": "2",
35 | "extra_data": {
36 | "enter_from": "tre_box",
37 | "track_id": "7234042362707085323"
38 | },
39 | "task_key": "excitation_ad",
40 | "extra": {
41 | "track_id": "7234042362707085323"
42 | },
43 | "task_id": "188",
44 | "ad_alias_position": "coin",
45 | "is_post_login": False,
46 | "ad_from": "coin",
47 | "score_source": 0,
48 | "coin_count": "702",
49 | "params_for_special": "luckydog_sdk",
50 | "static_settings_version": 49,
51 | "dynamic_settings_version": 49,
52 | "poll_settings_version": 0,
53 | "exci_extra": {
54 | "cid": 1766107551880221,
55 | "req_id": "20230517145947586167CCCC350C52DD67",
56 | "rit": 20047
57 | },
58 | "aggre_chain_id": ""
59 | })
60 |
61 | headers = {
62 | 'Host': 'api5-normal-lq.toutiaoapi.com',
63 | 'Cookie': cookie,
64 | 'User-Agent': 'Apifox/1.0.0 (https://www.apifox.cn)',
65 | 'Content-Type': 'application/json',
66 | 'Accept': '*/*',
67 | 'Connection': 'keep-alive'
68 | }
69 | tip = "不才提醒您"
70 | if cookie == "":
71 | print("请填写cookie")
72 | else:
73 | response = requests.request("POST", url, headers=headers, data=payload)
74 | response2 = requests.request("POST", url2, headers=headers, data=payload2)
75 | time = 0
76 | for time in range(6):
77 | time+=1
78 | if time==5:
79 | response3 = requests.request("POST", url3, headers=headers, data=payload3)
80 |
81 | print(tip+response.text+response2.text+response3.text)
82 | def pushplus(content, token):
83 | title = '今日头条极速版签到通知: '
84 | url = 'http://www.pushplus.plus/send'
85 | data = {
86 | 'token': token,
87 | 'title': title,
88 | 'content': content
89 | }
90 | res = requests.post(url, data=data).json()
91 | # print(res)
92 | try:
93 | status = '推送成功!' if res['code'] == 200 else res['msg']
94 | print(status)
95 | except:
96 | print('推送异常!')
97 |
98 |
99 | if notice == 1:
100 | pushplus(tip + response.text + response2.text + response3.text, token)
101 | else:
102 | print("未开启推送")
--------------------------------------------------------------------------------
/wxread.py:
--------------------------------------------------------------------------------
1 | # 小小檬阅读 05-26
2 | # 入口:https://kygj0626144001-1316151879.cos.ap-nanjing.myqcloud.com/index.html?upuid=11934988
3 | # 变量名read,抓包cookie,复制cookie全部
4 | # 定时 15 8-23 * * *
5 | # 多账号换行,推荐换个人UA
6 | # 每天开始手动阅读三篇
7 | # 黑号不负责
8 |
9 | import json
10 | import os
11 | import random
12 | import re
13 | import time
14 | import requests
15 |
16 | default_ua = ''
17 |
18 | read_ck = os.getenv('read')
19 | ck = read_ck.split('\n')
20 |
21 | site_url = 'https://m.cdcd.plus/tuijian'
22 |
23 |
24 | def struct_headers(referurl):
25 | headers = {
26 | 'Host': 'm.cdcd.plus',
27 | 'Connection': 'keep-alive',
28 | 'Accept': 'application/json, text/plain, */*',
29 | 'User-Agent': default_ua,
30 | 'Accept-Language': 'zh-CN,zh',
31 | 'Accept-Encoding': 'gzip, deflate',
32 | 'Origin': referurl,
33 | 'Referer': referurl,
34 | 'Sec-Fetch-Site': 'cross-site',
35 | 'Sec-Fetch-Mode': 'cors',
36 | 'Sec-Fetch-Dest': 'empty',
37 | 'X-Requested-With': 'XMLHttpRequest'
38 | }
39 | # print(headers)
40 | return headers
41 |
42 |
43 | class UserInfo():
44 | ck = ''
45 | iu = ''
46 | referURL = ''
47 | jkey = ''
48 | uid = ''
49 | upuid = ''
50 | rootUrl = ''
51 | rest = ''
52 |
53 | def __init__(self, myck):
54 | self.ck = myck
55 |
56 | def get_userInfo(self):
57 |
58 | try:
59 | url = f'{self.rootUrl}/tuijian'
60 | temp_host = re.findall('http://(.*?)/', url)[0]
61 | headers = {
62 | 'Host': temp_host,
63 | 'Connection': 'keep-alive',
64 | 'Accept': 'application/json, text/plain, */*',
65 | 'User-Agent': default_ua,
66 | 'Accept-Language': 'zh-CN,zh',
67 | 'Accept-Encoding': 'gzip, deflate',
68 | 'Cookie': self.ck
69 | }
70 | res = requests.get(url=url, headers=headers)
71 |
72 | json_obj = json.loads(res.text)
73 | status = json_obj['data']['infoView']['status']
74 | self.rest = json_obj['data']['infoView']['rest']
75 | self.upuid = json_obj['data']['user']['upuid']
76 | self.uid = json_obj['data']['user']['uid']
77 | if 'msg' in json_obj['data']['infoView']:
78 | print(json_obj['data']['infoView']['msg'])
79 | return status
80 | except Exception:
81 | print(Exception)
82 |
83 | def get_new_id(self):
84 | try:
85 | url = 'https://m.cdcd.plus/entry/new_ld'
86 | headers = {
87 | 'Host': 'm.cdcd.plus',
88 | 'Connection': 'keep-alive',
89 | 'User-Agent': default_ua,
90 | 'Accept': '*/*',
91 | 'Accept-Language': 'zh-CN,zh',
92 | 'Accept-Encoding': 'gzip, deflate',
93 | 'Sec-Fetch-Site': 'cross-site',
94 | 'Sec-Fetch-Mode': 'cors',
95 | 'Sec-Fetch-Dest': 'empty',
96 | }
97 | res = requests.get(url=url, headers=headers)
98 | #print(res)
99 | json_obj = json.loads(res.text)
100 | self.rootUrl = re.findall('(.*?)/new', json_obj['jump'])[0]
101 | except Exception:
102 | print(Exception)
103 |
104 | def get_read_url(self):
105 |
106 | try:
107 | url = f'{self.rootUrl}/new/get_read_url'
108 | temp_host = re.findall('http://(.*?)/', url)[0]
109 | headers = {
110 | 'Host': temp_host,
111 | 'Connection': 'keep-alive',
112 | 'Accept': 'application/json, text/plain, */*',
113 | 'Referer': f'{self.rootUrl}/new?upuid={self.upuid}',
114 | 'User-Agent': default_ua,
115 | 'Accept-Language': 'zh-CN,zh',
116 | 'Accept-Encoding': 'gzip, deflate',
117 | 'Cookie': self.ck
118 | }
119 | res = requests.get(url, headers=headers)
120 |
121 | json_obj = json.loads(res.text)
122 | temp_url = json_obj['jump']
123 |
124 | self.referURL = re.match('(.*?)/read.html', temp_url)[0]
125 | self.iu = temp_url[temp_url.rfind('iu=') + 3:]
126 |
127 | except Exception:
128 | print(Exception)
129 |
130 | def goto_read(self, r):
131 | try:
132 | # r = random.random()
133 | url = site_url + f'/do_read?iu={self.iu}&pageshow&r={r}'
134 | headers = struct_headers(self.referURL)
135 | res = requests.get(url=url, headers=headers)
136 | json_obj = json.loads(res.text)
137 | self.jkey = json_obj['jkey']
138 |
139 | if 'url' in json_obj:
140 | return json_obj['url'] # 返回文章地址
141 | else:
142 | exit(-1)
143 | except Exception:
144 | print(Exception)
145 |
146 | def finish_read(self, r):
147 | try:
148 | url = site_url + f'/do_read?iu={self.iu}&pageshow&r={r}&jkey={self.jkey}'
149 | headers = struct_headers(self.referURL)
150 | res = requests.get(url=url, headers=headers)
151 | json_obj = json.loads(res.text)
152 | msg = json_obj['success_msg']
153 | self.jkey = json_obj['jkey']
154 | if '150' in msg and 'url' in json_obj:
155 | print(msg)
156 | return json_obj['url'] # 返回文章地址
157 | else:
158 | print('阅读受限,停止阅读')
159 | exit(-1)
160 | except Exception:
161 | print(Exception)
162 |
163 | def find_withdraw(self):
164 | try:
165 | url = f'{self.rootUrl}/withdrawal'
166 | temp_host = re.findall('http://(.*?)/', url)[0]
167 | headers = {
168 | 'Host': temp_host,
169 | 'Connection': 'keep-alive',
170 | 'Accept': 'application/json, text/plain, */*',
171 | 'Referer': f'{self.rootUrl}/new?upuid={self.upuid}',
172 | 'User-Agent': default_ua,
173 | 'Accept-Language': 'zh-CN,zh',
174 | 'Accept-Encoding': 'gzip, deflate',
175 | 'Cookie': self.ck
176 | }
177 | res = requests.get(url=url, headers=headers)
178 | json_obj = json.loads(res.text)
179 |
180 | if 'score' in json_obj['data']['user']:
181 | score = json_obj['data']['user']['score']
182 | score = float(score)
183 | print('当前:%.3f元' % (score * 0.01))
184 | return int(score)
185 | return 0
186 | except Exception:
187 | print(Exception.args)
188 |
189 | def withdraw(self, withdrawNum):
190 | try:
191 | url = f'{self.rootUrl}/withdrawal/doWithdraw'
192 | temp_host = re.findall('http://(.*?)/', url)[0]
193 | headers = {
194 | 'Host': temp_host,
195 | 'Connection': 'keep-alive',
196 | 'Accept': 'application/json, text/plain, */*',
197 | 'Referer': f'{self.rootUrl}/new?upuid={self.upuid}',
198 | 'User-Agent': default_ua,
199 | 'Accept-Language': 'zh-CN,zh',
200 | 'Accept-Encoding': 'gzip, deflate',
201 | 'Cookie': self.ck,
202 | 'Content-Type': 'application/x-www-form-urlencoded'
203 | }
204 | data = f'amount={withdrawNum}'
205 | res = requests.post(url=url, headers=headers, data=data)
206 |
207 | json_obj = json.loads(res.text)
208 | code = json_obj['code']
209 | if code == 0:
210 | print(f'已提现{withdrawNum * 0.01}')
211 | else:
212 | print('提现失败')
213 |
214 | except Exception:
215 | print(Exception.args)
216 |
217 |
218 | # formatTime = time.strftime("%m%d%H%M", time.localtime())
219 | print('=============开始运行==============')
220 | print('当前共{userLen}个账号'.format(userLen=len(ck)))
221 | for index, userInfo in enumerate(ck):
222 | print('===============账号{i}==============='.format(i=index + 1))
223 | cur_user = UserInfo(ck[index])
224 | cur_user.get_new_id()
225 | print(cur_user.rootUrl)
226 | if cur_user.get_userInfo() != 1:
227 | continue
228 | cur_user.get_read_url()
229 | if int(cur_user.rest != 0):
230 | for i in range(int(cur_user.rest)):
231 | r = round(random.random(), 16)
232 | time.sleep(random.uniform(1, 2))
233 | if i == 0:
234 | # 第一次获取到文章
235 | article_url = cur_user.goto_read(r)
236 | article_url = article_url[:article_url.rfind('#wechat')]
237 | res = requests.get(article_url)
238 | time.sleep(8 + random.uniform(0, 2)) # 等待
239 | # 第一次阅读完成,返回第二次文章链接
240 | article_url = cur_user.finish_read(r)
241 | if article_url is None:
242 | break
243 | article_url = article_url[:article_url.rfind('#wechat')]
244 | res = requests.get(article_url)
245 | time.sleep(8 + random.uniform(0, 2)) # 等待
246 | score = cur_user.find_withdraw()
247 | if int(score) >= 30:
248 | cur_user.withdraw(score)
249 |
--------------------------------------------------------------------------------
/smzdm_auto_sign_bot.py:
--------------------------------------------------------------------------------
1 | """
2 | 什么值得买自动签到脚本
3 |
4 | 借鉴(copy)自lws1122,fork 自:https://gitee.com/lsw1122/smzdm_bot
5 | """
6 | '''
7 | cron: 0 1 * * * smzdm_auto_sign_bot.py
8 | new Env('张大妈自动签到');
9 | '''
10 |
11 | import requests, os, datetime, sys
12 | from sys import argv
13 | import requests
14 | import json
15 | import time
16 | import hmac
17 | import hashlib
18 | import base64
19 | import urllib.parse
20 |
21 | """
22 | http headers
23 | """
24 | DEFAULT_HEADERS = {
25 | 'Accept': '*/*',
26 | 'Accept-Encoding': 'gzip, deflate, br',
27 | 'Accept-Language': 'zh-CN,zh;q=0.9',
28 | 'Connection': 'keep-alive',
29 | 'Host': 'zhiyou.smzdm.com',
30 | 'Referer': 'https://www.smzdm.com/',
31 | 'Sec-Fetch-Dest': 'script',
32 | 'Sec-Fetch-Mode': 'no-cors',
33 | 'Sec-Fetch-Site': 'same-site',
34 | 'User-Agent': 'Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.3 Mobile/15E148 Safari/604.1 Edg/108.0.0.0',
35 | }
36 |
37 | # 签到用的url
38 | SIGN_URL = 'https://zhiyou.smzdm.com/user/checkin/jsonp_checkin'
39 |
40 | # 环境变量中用于存放cookie的key值
41 | KEY_OF_COOKIE = "SMZDM_COOKIE"
42 |
43 | TG_TOKEN = ''
44 | TG_USER_ID = ''
45 | # serverJ
46 | SCKEY = ''
47 | # push+
48 | PUSH_PLUS_TOKEN = ''
49 | # 钉钉机器人
50 | DD_BOT_TOKEN = ''
51 | DD_BOT_SECRET = ''
52 |
53 | if "TG_BOT_TOKEN" in os.environ and len(os.environ["TG_BOT_TOKEN"]) > 1 and "TG_USER_ID" in os.environ and len(
54 | os.environ["TG_USER_ID"]) > 1:
55 | TG_TOKEN = os.environ["TG_BOT_TOKEN"]
56 | TG_USER_ID = os.environ["TG_USER_ID"]
57 |
58 | if "PUSH_KEY" in os.environ and len(os.environ["PUSH_KEY"]) > 1:
59 | SCKEY = os.environ["PUSH_KEY"]
60 |
61 | if "DD_BOT_TOKEN" in os.environ and len(os.environ["DD_BOT_TOKEN"]) > 1 and "DD_BOT_SECRET" in os.environ and len(
62 | os.environ["DD_BOT_SECRET"]) > 1:
63 | DD_BOT_TOKEN = os.environ["DD_BOT_TOKEN"]
64 | DD_BOT_SECRET = os.environ["DD_BOT_SECRET"]
65 |
66 | if "PUSH_PLUS_TOKEN" in os.environ and len(os.environ["PUSH_PLUS_TOKEN"]) > 1:
67 | PUSH_PLUS_TOKEN = os.environ["PUSH_PLUS_TOKEN"]
68 |
69 |
70 | def logout(self):
71 | print("[{0}]: {1}".format(datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S"), self))
72 | sys.stdout.flush()
73 |
74 |
75 | def push_via_boot(title, content):
76 | dingding_bot(title, content)
77 | telegram_bot(title, content)
78 | serverJ(title, content)
79 | push_plus_bot(title, content)
80 |
81 |
82 | def dingding_bot(title, content):
83 | if not DD_BOT_TOKEN or not DD_BOT_SECRET:
84 | print("钉钉推送服务的DD_BOT_TOKEN或者DD_BOT_SECRET未设置!!\n取消推送")
85 | return
86 | timestamp = str(round(time.time() * 1000)) # 时间戳
87 | secret_enc = DD_BOT_SECRET.encode('utf-8')
88 | string_to_sign = '{}\n{}'.format(timestamp, DD_BOT_SECRET)
89 | string_to_sign_enc = string_to_sign.encode('utf-8')
90 | hmac_code = hmac.new(secret_enc, string_to_sign_enc, digestmod=hashlib.sha256).digest()
91 | sign = urllib.parse.quote_plus(base64.b64encode(hmac_code)) # 签名
92 | print('开始使用 钉钉机器人 推送消息...', end='')
93 | url = f'https://oapi.dingtalk.com/robot/send?access_token={DD_BOT_TOKEN}×tamp={timestamp}&sign={sign}'
94 | headers = {'Content-Type': 'application/json;charset=utf-8'}
95 | data = {
96 | 'msgtype': 'text',
97 | 'text': {'content': f'{title}\n\n{content}'}
98 | }
99 | response = requests.post(url=url, data=json.dumps(data), headers=headers, timeout=15).json()
100 | if not response['errcode']:
101 | print('推送成功!')
102 | else:
103 | print('推送失败!')
104 |
105 |
106 | def telegram_bot(title, content):
107 | try:
108 | print("\n")
109 | bot_token = TG_TOKEN
110 | user_id = TG_USER_ID
111 | if not bot_token or not user_id:
112 | print("tg服务的bot_token或者user_id未设置!!\n取消推送")
113 | return
114 | print("tg服务启动")
115 | url = f"https://api.telegram.org/bot{TG_TOKEN}/sendMessage"
116 |
117 | headers = {'Content-Type': 'application/x-www-form-urlencoded'}
118 | payload = {'chat_id': str(TG_USER_ID), 'text': f'{title}\n\n{content}', 'disable_web_page_preview': 'true'}
119 | proxies = None
120 |
121 | try:
122 | response = requests.post(url=url, headers=headers, params=payload, proxies=proxies).json()
123 | except:
124 | print('推送失败!')
125 | if response['ok']:
126 | print('推送成功!')
127 | else:
128 | print('推送失败!')
129 | except Exception as e:
130 | print(e)
131 |
132 |
133 | # push推送
134 | def push_plus_bot(title, content):
135 | try:
136 | print("\n")
137 | if not PUSH_PLUS_TOKEN:
138 | print("PUSHPLUS服务的token未设置!!\n取消推送")
139 | return
140 | print("PUSHPLUS服务启动")
141 | url = 'http://pushplus.hxtrip.com/send'
142 | data = {
143 | "token": PUSH_PLUS_TOKEN,
144 | "title": title,
145 | "content": content
146 | }
147 | body = json.dumps(data).encode(encoding='utf-8')
148 | headers = {'Content-Type': 'application/json'}
149 | response = requests.post(url=url, data=body, headers=headers).json()
150 | if response['code'] == 200:
151 | print('推送成功!')
152 | else:
153 | print('推送失败!')
154 | except Exception as e:
155 | print(e)
156 |
157 |
158 | def serverJ(title, content):
159 | try:
160 | print("\n")
161 | if not SCKEY:
162 | print("server酱服务的SCKEY未设置!!\n取消推送")
163 | return
164 | print("serverJ服务启动")
165 | data = {
166 | "title": title,
167 | "desp": content.replace("\n", "\n\n")
168 | }
169 | response = requests.post("https://sctapi.ftqq.com/{SCKEY}.send", data=data).json()
170 | if response['errno'] == 0:
171 | print('推送成功!')
172 | else:
173 | print('推送失败!')
174 | except Exception as e:
175 | print(e)
176 |
177 |
178 | class SignBot(object):
179 |
180 | def __init__(self):
181 | self.session = requests.Session()
182 | # 添加 headers
183 | self.session.headers = DEFAULT_HEADERS
184 |
185 | def __json_check(self, msg):
186 | """
187 | 对请求 盖乐世社区 返回的数据进行进行检查
188 | 1.判断是否 json 形式
189 | """
190 | try:
191 | result = msg.json()
192 | return True
193 | except Exception as e:
194 | logout(f'Error : {e}')
195 | return False
196 |
197 | def load_cookie_str(self, cookies):
198 | """
199 | 起一个什么值得买的,带cookie的session
200 | cookie 为浏览器复制来的字符串
201 | :param cookie: 登录过的社区网站 cookie
202 | """
203 | self.session.headers['Cookie'] = cookies
204 |
205 | def checkin(self):
206 | """
207 | 签到函数
208 | """
209 | msg = self.session.get(SIGN_URL)
210 | if self.__json_check(msg):
211 | return msg.json()
212 | return msg.content
213 |
214 |
215 | if __name__ == '__main__':
216 | bot = SignBot()
217 | cookies = os.environ[KEY_OF_COOKIE]
218 | cookieList = cookies.split("&")
219 | logout("检测到{}个cookie记录\n开始签到".format(len(cookieList)))
220 | index = 0
221 | for c in cookieList:
222 | bot.load_cookie_str(c)
223 | result = bot.checkin()
224 | msg = "\n⭐⭐⭐签到成功{1}天⭐⭐⭐\n🏅🏅🏅金币[{2}]\n🏅🏅🏅积分[{3}]\n🏅🏅🏅经验[{4}],\n🏅🏅🏅等级[{5}]\n🏅🏅补签卡[{6}]".format(
225 | index,
226 | result['data']["checkin_num"],
227 | result['data']["gold"],
228 | result['data']["point"],
229 | result['data']["exp"],
230 | result['data']["rank"],
231 | result['data']["cards"])
232 | logout(msg)
233 | logout("开始推送,暂时支持【Telegram】【钉钉】【push+】【serverJ】")
234 | push_via_boot("张大妈自动签到", msg)
235 | # telegram_bot("张大妈自动签到", msg)
236 | index += 1
237 | logout("签到结束")
238 |
--------------------------------------------------------------------------------
/变量环境 (1).txt:
--------------------------------------------------------------------------------
1 | 拉库地址:
2 | Faker2:
3 |
4 | ql repo https://git.metauniverse-cn.com/https://github.com/shufflewzc/faker3.git "jd_|jx_|gua_|jddj_|jdCookie" "activity|backUp" "^jd[^_]|USER|function|utils|sendNotify|ZooFaker_Necklace.js|JDJRValidator_|sign_graphics_validate|ql|JDSignValidator|magic|depend|h5sts" "main"
5 |
6 | 船长
7 |
8 | ql repo https://github.com/HarbourJ/HarbourToulu.git "jd_" "activity|backUp|jd_sign" "^jd[^_]|USER|utils|ZooFaker_Necklace|JDJRValidator_|sign_graphics_validate|jddj_cookie|function|ql|magic|JDJR|JD|sendNotify" "main"
9 |
10 | KR
11 |
12 | ql repo https://github.com/KingRan/KR.git "jd_|jx_|jdCookie" "activity|backUp" "^jd[^_]|USER|utils|function|sign|sendNotify|ql|JDJR"
13 |
14 | 统一定时规则:
15 | 12 8 * * *
16 |
17 |
18 |
19 |
20 | 环境变量区
21 |
22 | xinruimz true
23 |
24 | opencard_addCart true
25 |
26 | opencard_draw true
27 |
28 | JD_PAY_CONTRACT true
29 |
30 | morningScPins 京东大号pt_pin=一直到;号结束
31 |
32 | JD_TRY true
33 |
34 | JD_CART_REMOVE true
35 |
36 | mpdzHelp 设置头文字助力
37 |
38 | isCashOut true
39 |
40 | isCommentPic true
41 |
42 |
43 | 配置文件区
44 | export ec_fix_dep="true"
45 | export ec_re_dep="true"
46 | export DY_WASHBEANS="true"
47 |
48 | ##偷豆豆的大舅哥整合
49 |
50 | export jd_shopLeagueId="dz60a95fce4627a9824f5a7581shop"
51 | export LUCK_DRAW_URL="https://cjhy-isv.isvjcloud.com/wxDrawActivity/activity/8772059?activityId=d12abb777111446286d064c16ccc10db"
52 | export jd_lzkj_loreal_draw_url="https://lzkj-isv.isvjcloud.com/prod/cc/interactsaas/index?activityType=10026&templateId=20210518190900jfcj011&activityId=1697158365872295938"
53 | export DPCJID="199514&1000365002&11384330&1000104643&1000090063&10227411&1000407945&638588&1000123964"
54 | export jd_drawCenter_activityId="cb1f4ccfc2534425bbf15660ede368b2"
55 | export jd_zdjr_activityId="2c0c5ec443294c51b86371d7b0222664"
56 | export jd_zdjr_activityUrl="https://lzkjdz-isv.isvjcloud.com"
57 | export jd_cjhy_activityId="5e485bdb9ae24754af5767ddb83a7218"
58 | export jd_cjhy_activityUrl="https://cjhydz-isv.isvjcloud.com"
59 | export jd_lzkj_loreal_cart_url="https://lzkj-isv.isvjcloud.com/prod/cc/interactsaas/index?activityType=10039&templateId=20210518190900jzscr011&activityId=1702208819806277633&nodeId=101001039&prd=cjwx&shareuserid4minipg=Ia5PP8QG3E9m 6RaAo3sd/kaL5GGqMTUc8u/otw2E a7Ak3lgFoFQlZmf45w8Jzw&shopid=1000003015"
60 | export jd_wxCollectCard_activityId="e7129dbbc3524d7690ee75ad15ed9497"
61 | export jd_shop_draw_ids="199514&1000365002&11384330&1000104643&1000090063&10227411&1000407945&638588&1000123964"
62 | export jd_lzkj_loreal_daySign_url="https://lzkj-isv.isvjcloud.com/prod/cc/interactsaas/index?activityType=10023&templateId=20210518190900rlqd011&activityId=1696432821162020866"
63 | export jd_wxCollectionActivity_activityUrl="https://cjhy-isv.isvjcloud.com/wxCollectionActivity/activity?activityId=629a0207838b4345ba5834f9ac93303d"
64 | export jd_pointExgBeans_activityUrl="https://cjhy-isv.isvjcloud.com/mc/wxPointShopView/pointExgBeans?venderId=1000002668&giftId=f595d44968524008bd520dd3d22d8439"
65 | export jd_joinCommonId="8036fbc67e784f81a807034147c21dc4&1000002672"
66 | export jd_cart_item_activityUrl="https://txzj-isv.isvjcloud.com/cart_item/home?a=TDhhSWhCMllrcVdRZUx0djFR"
67 | export jd_wxShopFollowActivity_activityUrl="https://lzkj-isv.isvjd.com/wxShopFollowActivity/activity/activity?activityId=b060eede0ffd483db0c94fd80ffd5fc1"
68 | export jd_lzkj_loreal_lkFollowShop_url="https://lzkj-isv.isvjcloud.com/prod/cc/interactsaas/index?activityType=10039&templateId=20210518190900jzscr011&activityId=1702208819806277633&nodeId=101001039&prd=cjwx&shareuserid4minipg=Ia5PP8QG3E9m"
69 | export jd_wxCartKoi_activityId="534ea4b8707c443d933e130712fab004"
70 | export jd_wxShareActivity_activityId="9656448ba7ad4e908c8218dc0764a807"
71 | export jd_wxBuildActivity_activityId="0ca2e538f7d1484da143d6a02d560db6"
72 | export jd_collect_shop_activityUrl="https://txzj-isv.isvjcloud.com/collect_shop/home?a=TXdhdzNCYUdMTkNTMmlKVVZn"
73 | export jd_lzkj_loreal_upperSign_url="https://lzkj-isv.isvjcloud.com/prod/cc/interactsaas/index?activityType=10039&templateId=20210518190900jzscr011&activityId=1702208819806277633&nodeId=101001039&prd=cjwx&shareuserid4minipg=Ia5PP8QG3E9m"
74 | export jd_lzkj_loreal_sign_url="https://lzkj-isv.isvjcloud.com/prod/cc/interactsaas/index?activityType=10001&templateId=20201228083300ljqdcj011&activityId=1698965822375632897"
75 | ##偷豆豆的大舅哥整合
76 | export jd_lzkj_loreal_invite_url="https://lzkj-isv.isvjcloud.com/prod/cc/interactsaas/index?activityType=10033&activityId=1701046053987065857&templateId=2021062190900zdgf081&nodeId=101001&prd=cjwx"
77 | export jd_cjhydz_wxTeam_Id="d2147cbb51064225bba1a7194b04867c"
78 | export jd_lzkj_loreal_followGoods_url="https://lzkj-isv.isvjcloud.com/prod/cc/interactsaas/index?activityType=10063&activityId=1701134472217423873&templateId=20210824190900ffl011&nodeId=101001063&prd=cjwx"
79 | export jd_wxShopGiftId="ac4c4fd78c164e6dbbff5ae899e381b8"
80 | export jd_wxKnowledgeActivity_activityUrl="https://cjhy-isv.isvjcloud.com/wxKnowledgeActivity/activity?activityId=d1bfec1533f14b22a30ff06456d14570"
81 | export jd_lottery_activityUrl="https://txzj-isv.isvjcloud.com/lottery/home?a=RFdkWG9zSkhGbnYwK1ZpNVRn"
82 | export jd_lzkj_wxShopGift_ids="f08ec64ae1c040aa8814333662946d54"
83 | export jd_wxgame_activityId="f9f9355f76314e669983f28f4828ea97"
84 | export VENDER_ID="1000467596"
85 | export jd_wxSecond_activityId="af0c01f7eb5b48a08c11b2a8a8e36840"
86 | export jd_wxFansInterActionActivity_activityId="a3452f5da61649efa42953a9d3370127"
87 | export jd_fxyl_activityId="9dbb819009924f769065436f3504f648"
88 | export jd_completeInfoActivity_venderId="751232"
89 | export jd_completeInfoActivity_activityId="35327d99993f4791870404b2b915cad9"
90 | export jd_wxMcLevelAndBirthGifts_activityId="3eb9d17445e94c9390688f735d31c0ca"
91 | export jd_wxTeam_activityUrl="https://cjhydz-isv.isvjcloud.com/wxTeam/activity?activityId=54f4ed5d3fd1412dacd1ff9f94196c89"
92 | export WXGAME_ACT_ID="xxx"
93 | export LZKJ_SIGN="b6ad701d74284d4284f13b1faf8b88af"
94 | export M_FOLLOW_SHOP_ARGV="1000453623_1000453623"
95 | export jd_loreal_interact_ljqdysl_Ids="xxx"
96 | export JD_Lottery_cart="7808ced380994f7e9ffcb84b43ef47e5"
97 | export jd_cjhy_wxCollectionActivityId="e215d529eae34539af8fc1e1a1c475a"
98 | export jd_lzkj_wxCollectionActivityId="47b0d1a4f4fe474db598c15d050794d3"
99 | export jd_wxShopGift_activityUrl="https://lzkj-isv.isvjcloud.com/wxShopGift/activity?activityId=f7c91c017c3f4d20a8e7ced558437db7"
100 | export M_WX_TEAM_URL="https://lzkj-isv.isvjcloud.com/prod/cc/interactsaas/index?activityType=10039&templateId=20210518190900jzscr011&activityId=1702208819806277633&nodeId=101001039&prd=cjwx&shareuserid4minipg=Ia5PP8QG3E9m"
101 | export jd_lzkj_interactsaas_jgyl_activityId="1692481889507524610"
102 | ##偷豆豆的大舅哥整合
103 | export DO_TEN_WATER_AGAIN="1"
104 | export jd_lzkj_interactsaas_gzyl_activityId="1694628308110929921"
105 | export jd_drawShopGift_argv="1000411104_1000411104"
106 | export jd_lzkj_loreal_share_url="https://lzkj-isv.isvjcloud.com/prod/cc/interactsaas/index?activityType=10039&templateId=20210518190900jzscr011&activityId=1702208819806277633&nodeId=101001039&prd=cjwx&shareuserid4minipg=Ia5PP8QG3E9m"
107 | export jd_cjhy_wxGameActivity_activityId="80f07c94bb7e43e884cc7e36a3b10e5a"
108 | export jd_sevenDay_activityUrl="https://cjhy-isv.isvjcloud.com/sign/signActivity?activityId=3eb8b4eebfd041d390fb94be0b16995f&venderId=63461"
109 | export CJHY_SIGN="3eb8b4eebfd041d390fb94be0b16995f"
110 | export jd_cjhy_signActivity_ids="3eb8b4eebfd041d390fb94be0b16995f"
111 | export jd_lzkj_loreal_perfectInfo_url="https://lzkj-isv.isvjcloud.com/prod/cc/interactsaas/index?activityType=10039&templateId=20210518190900jzscr011&activityId=1702208819806277633&nodeId=101001039&prd=cjwx&shareuserid4minipg=Ia5PP8QG3E9m"
112 |
113 |
114 |
115 |
116 |
117 |
118 |
119 |
120 |
121 |
122 |
123 |
124 |
125 |
126 |
127 |
128 | 依赖区
129 |
130 | Node.js区
131 |
132 | crypto-js
133 | prettytable
134 | dotenv
135 | jsdom
136 | date-fns
137 | tough-cookie
138 | tslib
139 | ws@7.4.3
140 | ts-md5
141 | jsdom -g
142 | jieba
143 | fs
144 | ds
145 | form-data
146 | json5
147 | global-agent
148 | png-js
149 | @types/node
150 | require
151 | js-base64
152 | axios
153 | redis
154 | jd_sign
155 | date-fns
156 | moment
157 | map
158 |
159 |
160 |
161 | Python3区
162 |
163 | requests
164 | canvas
165 | ping3
166 | jieba
167 | jd_sign
168 | redis
169 | jd_sign.so
170 |
171 |
172 |
173 | liunx区
174 |
175 | bizCode
176 | bizMsg
177 | iRet
178 | lxml
179 | jd_sign.so
180 |
--------------------------------------------------------------------------------
/mtqg18-18.py:
--------------------------------------------------------------------------------
1 | #by:不才
2 | # 18号的id
3 | # 17:20----6FAEB8B631384C8290EE0A0924EDA728
4 | # 17:30----B4394A5374304B1DA010AE5A98216F06
5 | # 17:40----2F12F73F71A34308BB96B802F0402047
6 | # 17:50----AF0348077FF1436AA9A1661A3E5BBB7C
7 | # 18:00----5DE3087F38E94BD38FF7A0FB3B763352
8 | # 18:10----45A45F8BD27D4BBABEB431BADB1811D1
9 |
10 | import requests
11 |
12 | #美团的token=xxx,记得每一场都要手动进去一下活动页面才能抢,填写ck和couponxxx就能抢
13 | ck=''
14 | couponReferId=''#场次id;
15 |
16 | num = 50#抢购次数
17 | #定时建议提前几秒
18 |
19 | notice = 1#开启通知
20 | token = ''#pushplus的token
21 |
22 |
23 |
24 |
25 | name = '美团18-18抢购'
26 | v = "1.0"
27 | headers = {
28 | 'Accept': 'application/json, text/plain, */*',
29 | 'Accept-Language': 'zh-CN,zh;q=0.9,ru;q=0.8',
30 | 'Connection': 'keep-alive',
31 | 'Content-Type': 'application/json',
32 | 'Cookie': ck,
33 | 'Origin': 'https://market.waimai.meituan.com',
34 | 'Referer': 'https://market.waimai.meituan.com/',
35 | 'Sec-Fetch-Dest': 'empty',
36 | 'Sec-Fetch-Mode': 'cors',
37 | 'Sec-Fetch-Site': 'same-site',
38 | 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/111.0.0.0 Safari/537.36',
39 | 'mtgsig':'{"cType":"mti","fpPlatform":3,"wxOpenId":"","appVersion":"","mtFingerprint":"H5dfp_1.8.2_tttt_d2KX3vHpIK9wgBLgCri5IH7Ffno1IrqwW6i3E2gBfvj22JkyG6ytqPBASl3LG1SgSs4YDZK7Hqqp+y7xGcS1xkWbBZ3+02TgPG/pJveDk75vytmXe56QfW3BoGDTttRwvaSSOvqVi4u7SQOPTDbpRSNB0eAJ+MU61h1fU8fnTi01mO4oEc+9THzoIU+XEerq65G2kkyYLbL43dFyL4Fm/ht6HMPz6i1WYGB71Jqz8wccOcYbCVFcI1zilxra8O1425J1w+l6607QYJZaGNRWKcel8tfoHdNt9dfOjudrkmXBRUUNmxgZOiMy8tO5BUC8mdA38JxQodQ/Z6gABdMzYr9EmH0zlJZahp3JhwpYejjIu2cG6agEjRBR66F+uwVGYEx8860Uu5V2WdJdBc3CaQmt24eUJoTQ07EfgzfqxK1khsf97cdbLC4ErHpASPaAitQow9Rp1Vaw2Pc5ruujGKh6zTznDPF6ERbZg3CjzgjgTt1lBsiw9oMHVrfT7/OZZIyJLAmVhkJGvetghWODixXKlUWdyVwyk+PieaOeOQwsKalLF/z/FrWvtktuP2Xmed4Qn/1tddhWg4Jzw9kRiBRFr0qTJ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UN7cqyOWexLRlkZy5HeOkQlXvxnKI2ZgI98CLfEsvpiiH6SMS0Q/Hys0vS1PfgIbLC8JogYyHbeVaChV4s6qcjAVRaU7ta+ILytyTpQmjopZU9dIfI"}', 'sec-ch-ua': '"Google Chrome";v="111", "Not(A:Brand";v="8", "Chromium";v="111"',
40 | 'sec-ch-ua-mobile': '?0',
41 | 'sec-ch-ua-platform': '"Windows"',
42 | }
43 |
44 | params = {
45 | 'couponReferId': couponReferId,
46 | 'actualLng': '113.551454',
47 | 'actualLat': '23.32507',
48 | 'geoType': '2',
49 | 'gdPageId': '379391',
50 | 'pageId': '378925',
51 | 'version': '1',
52 | 'utmSource': '70200',
53 | 'utmCampaign': 'wmsq-678762',
54 | 'instanceId': '16619982800580.30892480633143027',
55 | 'componentId': '16619982800580.30892480633143027',
56 | }
57 |
58 | json_data = {
59 | 'cType': 'wm_wxapp',
60 | 'fpPlatform': 1,
61 | 'wxOpenId': '',
62 | 'appVersion': '',
63 | 'mtFingerprint': 'H5dfp_1.8.2_tttt_SYehpOfeZ2l5ptHmehreFzlB/ReU6a6ed5xQpi3kvQoO446CcB0b9cOm3dJPRJ9xzT3s9r4YN3KMHZnWyoT3cA71dF37w+dNwzYQCAw9Xg7zOlb6Yhh05H5JVnoMPuwLS2EtwARktNI/OaDSJDQQY1T0YlvqP/skB4woCK22w1Phq4G9avF14LZOIAICqnR5zos/FJXkXo8Ly+/EtbjPET+/+ME86zuUh2txasb0rNkkwhteHaLkRa6rxQfV4MzwUQQT+Yra/FofeqhrpCgfSunpUQY+oCjXraAqmibiEyN80SU3CqXgk1BpMuNPJoBfKd+5AJP5G8IUykhn4sfnjJAje6IhxelVSevzQwUc/itestJgzp1XPO6tT5p5KtfVotYr7j6XdC+VU40cMiASQTI1fdhhgoBPUCau30uV/QiU7RWstOrhzYbaHJJ40DxJTA/0GDD38impRmlmqIRPNQliSuGInVp9nvaY8x6Jd0hwTlQYsmuKoYj5RKacUonoYI0wyFI5Cvw6k4sXUoFU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Kzvmc1QOd1O9EZ/fUtW6eSK5TIM0MslypRaz70IQ9ZiTpZC4tiWY/Mt5HsekfcAQOz2we+Q12J+svpXWHn4hk3EQB7aEkR/cwoj3a5e0ep5RY31/xd8HjXZujfm9UytXq9/MkwA0ZKNNv2Wl/0FlnDZK63BgvIPPM9AIabmpFuGRAQWFIyfCkX1QKnHnXiuUaX02z+9TmY0tVh1FHkqg1MnwIp1LuLxnQxOX6CrGeFsO2fu7gvkPRJB2xo4ROL4z5WkekcMFzVBfj34qQTAvkKkCVDvCOFoMhgwakWkHk1JoytGXjrFiDc+Cd6KVW/lCaNtPDUrFMHd9oVltAZzMTTcPdH+Wn6tYN4KMm8eL5Jl9RFuU4NJlo8GPMGEAip3rfcoL2DtmRQ2IXiVv1LeKUdZ8vKqgV65CfkBTNL6NlhRViPdqnzCbM8AGmY2xbxT28k4faH89+FYEWjq6zAx2L31hT7WlVAVTENmpwaIMqqhj5jTJbl5U8s1J5Qmwc2mNNOs0uikO8bT36zz/Jb987IWAD3gkG24M+U2oEzdnLJxvckK/sghPln9603OO1QWjNo31nMepDk/wA4YCvldiUvMTrKw8J31rPsS+0HhdOCWbM90ET6I6H+vVIvGhNLpzpZiXpAnR877Q1L4c0xPHNnzJg1hy4XM2LC7R5rBpyF9SY5Lphmog1XU7RSnk1dOGoxZqPWduUitBCp5dn27riqM8Hs+jJ8BIm4X4lOixMZUmRj0sgsWmTYsUzOB6VxqEJupyfljk4K7Po6oG+0FE+FUxMhz+lz9l3B/Nnx1e1exbpEYeITVFLlcFD/zw4Sn1T8YBZUvJJC+ZHTSnu3lvDXf52Xsjet9e9X4JXTNkEHGOstq+2O3XxJvy5+eHSycoVnfLAcs/9tzbzVmSiH1mFMPS6MKcBfng==',
64 | }
65 | tip = "不才提醒您:"
66 | i=0
67 | while i < num:
68 | response = requests.post( 'https://promotion.waimai.meituan.com/lottery/limitcouponcomponent/fetchcoupon',
69 | params=params,
70 | headers=headers,
71 | json=json_data,
72 |
73 | )
74 | print(tip+response.text)
75 | i+=1
76 | def pushplus(content, token):
77 | title = '美团抢购通知: '
78 | url = 'http://www.pushplus.plus/send'
79 | data = {
80 | 'token': token,
81 | 'title': title,
82 | 'content': content
83 | }
84 | res = requests.post(url, data=data).json()
85 | # print(res)
86 | try:
87 | status = '推送成功!' if res['code'] == 200 else res['msg']
88 | print(status)
89 | except:
90 | print('推送异常!')
91 |
92 | if notice == 1:
93 | pushplus('不才提醒您'+response.text,token)
94 | else:
95 | print("未开启推送")
--------------------------------------------------------------------------------
/tianyi.py:
--------------------------------------------------------------------------------
1 | """
2 | [url=https://www.52pojie.cn/thread-1231190-1-1.html]https://www.52pojie.cn/thread-1231190-1-1.html[/url]
3 |
4 | 感谢作者开源天翼云签到部分源码:
5 | https://github.com/t00t00-crypto/cloud189-action/blob/master/checkin.py 及 [login_function.py](https://github.com/Dawnnnnnn/Cloud189/blob/master/functions/login_function.py)
6 | """
7 | import time
8 | import re
9 | import json
10 | import base64
11 | import hashlib
12 | # from urllib import parse
13 | import urllib.parse,hmac
14 | import rsa
15 | import requests
16 | import random
17 |
18 | BI_RM = list("0123456789abcdefghijklmnopqrstuvwxyz")
19 |
20 | B64MAP = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"
21 |
22 | s = requests.Session()
23 |
24 | # 在下面两行的引号内贴上账号(仅支持手机号)和密码
25 | username = ""
26 | password = ""
27 |
28 | _ = """
29 | if(username == "" or password == ""):
30 | username = input("账号:")
31 | password = input("密码:")
32 | # """
33 |
34 | assert username and password, "在第23、24行填入有效账号和密码"
35 |
36 | # 钉钉机器人token 申请key 并设置密钥
37 | ddtoken = ""
38 | ddsecret = ""
39 | # xuthuskey = "27a...........................7b"
40 |
41 | if not ddtoken:
42 | print("第36行的ddtoken 为空,签到结果将不会通过钉钉发送")
43 |
44 |
45 | def int2char(a):
46 | return BI_RM[a]
47 |
48 |
49 | def b64tohex(a):
50 | d = ""
51 | e = 0
52 | c = 0
53 | for i in range(len(a)):
54 | if list(a)[i] != "=":
55 | v = B64MAP.index(list(a)[i])
56 | if 0 == e:
57 | e = 1
58 | d += int2char(v >> 2)
59 | c = 3 & v
60 | elif 1 == e:
61 | e = 2
62 | d += int2char(c << 2 | v >> 4)
63 | c = 15 & v
64 | elif 2 == e:
65 | e = 3
66 | d += int2char(c)
67 | d += int2char(v >> 2)
68 | c = 3 & v
69 | else:
70 | e = 0
71 | d += int2char(c << 2 | v >> 4)
72 | d += int2char(15 & v)
73 | if e == 1:
74 | d += int2char(c << 2)
75 | return d
76 |
77 |
78 | def rsa_encode(j_rsakey, string):
79 | rsa_key = f"-----BEGIN PUBLIC KEY-----\n{j_rsakey}\n-----END PUBLIC KEY-----"
80 | pubkey = rsa.PublicKey.load_pkcs1_openssl_pem(rsa_key.encode())
81 | result = b64tohex((base64.b64encode(rsa.encrypt(f'{string}'.encode(), pubkey))).decode())
82 | return result
83 |
84 |
85 | def calculate_md5_sign(params):
86 | return hashlib.md5('&'.join(sorted(params.split('&'))).encode('utf-8')).hexdigest()
87 |
88 |
89 | def login(username, password):
90 | #https://m.cloud.189.cn/login2014.jsp?redirectURL=https://m.cloud.189.cn/zhuanti/2021/shakeLottery/index.html
91 | url=""
92 | urlToken="https://m.cloud.189.cn/udb/udb_login.jsp?pageId=1&pageKey=default&clientType=wap&redirectURL=https://m.cloud.189.cn/zhuanti/2021/shakeLottery/index.html"
93 | s = requests.Session()
94 | r = s.get(urlToken)
95 | pattern = r"https?://[^\s'\"]+" # 匹配以http或https开头的url
96 | match = re.search(pattern, r.text) # 在文本中搜索匹配
97 | if match: # 如果找到匹配
98 | url = match.group() # 获取匹配的字符串
99 | # print(url) # 打印url
100 | else: # 如果没有找到匹配
101 | print("没有找到url")
102 |
103 | r = s.get(url)
104 | # print(r.text)
105 | pattern = r"]*href=\"([^\"]+)\"" # 匹配id为j-tab-login-link的a标签,并捕获href引号内的内容
106 | match = re.search(pattern, r.text) # 在文本中搜索匹配
107 | if match: # 如果找到匹配
108 | href = match.group(1) # 获取捕获的内容
109 | # print("href:" + href) # 打印href链接
110 | else: # 如果没有找到匹配
111 | print("没有找到href链接")
112 |
113 | r = s.get(href)
114 | captchaToken = re.findall(r"captchaToken' value='(.+?)'", r.text)[0]
115 | lt = re.findall(r'lt = "(.+?)"', r.text)[0]
116 | returnUrl = re.findall(r"returnUrl= '(.+?)'", r.text)[0]
117 | paramId = re.findall(r'paramId = "(.+?)"', r.text)[0]
118 | j_rsakey = re.findall(r'j_rsaKey" value="(\S+)"', r.text, re.M)[0]
119 | s.headers.update({"lt": lt})
120 |
121 | username = rsa_encode(j_rsakey, username)
122 | password = rsa_encode(j_rsakey, password)
123 | url = "https://open.e.189.cn/api/logbox/oauth2/loginSubmit.do"
124 | headers = {
125 | 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:74.0) Gecko/20100101 Firefox/76.0',
126 | 'Referer': 'https://open.e.189.cn/',
127 | }
128 | data = {
129 | "appKey": "cloud",
130 | "accountType": '01',
131 | "userName": f"{{RSA}}{username}",
132 | "password": f"{{RSA}}{password}",
133 | "validateCode": "",
134 | "captchaToken": captchaToken,
135 | "returnUrl": returnUrl,
136 | "mailSuffix": "@189.cn",
137 | "paramId": paramId
138 | }
139 | r = s.post(url, data=data, headers=headers, timeout=5)
140 | if (r.json()['result'] == 0):
141 | print(r.json()['msg'])
142 | else:
143 | print(r.json()['msg'])
144 | redirect_url = r.json()['toUrl']
145 | r = s.get(redirect_url)
146 | return s
147 |
148 |
149 | def main():
150 | s=login(username, password)
151 | rand = str(round(time.time() * 1000))
152 | surl = f'https://api.cloud.189.cn/mkt/userSign.action?rand={rand}&clientType=TELEANDROID&version=8.6.3&model=SM-G930K'
153 | url = f'https://m.cloud.189.cn/v2/drawPrizeMarketDetails.action?taskId=TASK_SIGNIN&activityId=ACT_SIGNIN'
154 | url2 = f'https://m.cloud.189.cn/v2/drawPrizeMarketDetails.action?taskId=TASK_SIGNIN_PHOTOS&activityId=ACT_SIGNIN'
155 | url3 = f'https://m.cloud.189.cn/v2/drawPrizeMarketDetails.action?taskId=TASK_2022_FLDFS_KJ&activityId=ACT_SIGNIN'
156 | headers = {
157 | 'User-Agent': 'Mozilla/5.0 (Linux; Android 5.1.1; SM-G930K Build/NRD90M; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/74.0.3729.136 Mobile Safari/537.36 Ecloud/8.6.3 Android/22 clientId/355325117317828 clientModel/SM-G930K imsi/460071114317824 clientChannelId/qq proVersion/1.0.6',
158 | "Referer": "https://m.cloud.189.cn/zhuanti/2016/sign/index.jsp?albumBackupOpened=1",
159 | "Host": "m.cloud.189.cn",
160 | "Accept-Encoding": "gzip, deflate",
161 | }
162 | response = s.get(surl, headers=headers)
163 | netdiskBonus = response.json()['netdiskBonus']
164 | if (response.json()['isSign'] == "false"):
165 | print(f"未签到,签到获得{netdiskBonus}M空间")
166 | res1 = f"未签到,签到获得{netdiskBonus}M空间"
167 | else:
168 | print(f"已经签到过了,签到获得{netdiskBonus}M空间")
169 | res1 = f"已经签到过了,签到获得{netdiskBonus}M空间"
170 |
171 | headers = {
172 | 'User-Agent': 'Mozilla/5.0 (Linux; Android 5.1.1; SM-G930K Build/NRD90M; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/74.0.3729.136 Mobile Safari/537.36 Ecloud/8.6.3 Android/22 clientId/355325117317828 clientModel/SM-G930K imsi/460071114317824 clientChannelId/qq proVersion/1.0.6',
173 | "Referer": "https://m.cloud.189.cn/zhuanti/2016/sign/index.jsp?albumBackupOpened=1",
174 | "Host": "m.cloud.189.cn",
175 | "Accept-Encoding": "gzip, deflate",
176 | }
177 | response = s.get(url, headers=headers)
178 | if ("errorCode" in response.text):
179 | print(response.text)
180 | res2 = ""
181 | else:
182 | description = response.json()['description']
183 | print(f"抽奖获得{description}")
184 | res2 = f"抽奖获得{description}"
185 | response = s.get(url2, headers=headers)
186 | if ("errorCode" in response.text):
187 | print(response.text)
188 | res3 = ""
189 | else:
190 | description = response.json()['description']
191 | print(f"抽奖获得{description}")
192 | res3 = f"抽奖获得{description}"
193 |
194 | response = s.get(url3, headers=headers)
195 | if ("errorCode" in response.text):
196 | print(response.text)
197 | res4 = ""
198 | else:
199 | description = response.json()['description']
200 | print(f"链接3抽奖获得{description}")
201 | res4 = f"链接3抽奖获得{description}"
202 | if ddtoken.strip():
203 | _ = ddtoken.strip()
204 | timestamp = str(round(time.time() * 1000))
205 | secret_enc = ddsecret.encode('utf-8')
206 | string_to_sign = '{}\n{}'.format(timestamp, ddsecret)
207 | string_to_sign_enc = string_to_sign.encode('utf-8')
208 | hmac_code = hmac.new(secret_enc, string_to_sign_enc, digestmod=hashlib.sha256).digest()
209 | sign = urllib.parse.quote_plus(base64.b64encode(hmac_code))
210 | url = f'https://oapi.dingtalk.com/robot/send?access_token={ddtoken}×tamp={timestamp}&sign={sign}'
211 | headers = {"Content-Type": "application/json;charset=utf-8"}
212 | data = {"msgtype": "markdown",
213 | "markdown": {"title": f"sing189", "text": f"sing189 \n> {res1} \n>{res2}{res3}{res4}"}}
214 | response = requests.post(
215 | url=url, data=json.dumps(data), headers=headers, timeout=15
216 | ).json()
217 |
218 | if not response["errcode"]:
219 | print("钉钉机器人 推送成功!")
220 | else:
221 | print("钉钉机器人 推送失败!")
222 | def lambda_handler(event, context): # aws default
223 | main()
224 |
225 |
226 | def main_handler(event, context): # tencent default
227 | main()
228 |
229 |
230 | def handler(event, context): # aliyun default
231 | main()
232 |
233 |
234 | if __name__ == "__main__":
235 | # time.sleep(random.randint(5, 30))
236 | main()
--------------------------------------------------------------------------------
/阿里云签到(1).js:
--------------------------------------------------------------------------------
1 | #!/usr/bin/python
2 | # coding=utf-8
3 | '''
4 | File: aliyunpan_sign.py
5 | Author: canhetingsky
6 | Date: 2023/2/19 10:00
7 | cron: 0 30 8 * * *
8 | new Env('阿里云盘自动签到');
9 | '''
10 | import sys
11 | import os
12 | import traceback
13 | import requests
14 | from loguru import logger
15 | SIGN_LOG = 'logs/aliyunpan_sign.log'
16 |
17 | logger.remove()
18 | logger.add(sys.stdout, level='INFO')
19 |
20 | work_path = os.path.dirname(os.path.abspath(__file__))
21 | SIGN_LOG_FILE = os.path.join(work_path, SIGN_LOG)
22 | logger.add(SIGN_LOG_FILE, encoding='utf8')
23 |
24 | PUSH_PLUS_TOKEN = '' # push+ 微信推送的用户令牌
25 | # server 酱的 PUSH_KEY,兼容旧版与 Turbo 版
26 | PUSH_KEY = ''
27 | if os.getenv('PUSH_PLUS_TOKEN'):
28 | PUSH_PLUS_TOKEN = os.getenv('PUSH_PLUS_TOKEN')
29 | if os.getenv('PUSH_KEY'):
30 | PUSH_KEY = os.getenv('PUSH_KEY')
31 |
32 | # 请在阿里云盘网页端获取:JSON.parse(localStorage.getItem("token")).refresh_token
33 | refresh_token = os.getenv('ali_refresh_token')
34 | if refresh_token is None:
35 | logger.error("请先在环境变量里添加阿里云盘的refresh_token")
36 | exit(0)
37 |
38 |
39 | def post_msg(url: str, data: dict) -> bool:
40 | response = requests.post(url, data=data)
41 | code = response.status_code
42 | if code == 200:
43 | return True
44 | else:
45 | return False
46 |
47 |
48 | def PushPlus_send(token, title: str, desp: str = '', template: str = 'markdown') -> bool:
49 | url = 'http://www.pushplus.plus/send'
50 | data = {
51 | 'token': token, # 用户令牌
52 | 'title': title, # 消息标题
53 | 'content': desp, # 具体消息内容,根据不同template支持不同格式
54 | 'template': template, # 发送消息模板
55 | }
56 |
57 | return post_msg(url, data)
58 |
59 |
60 | def ServerChan_send(sendkey, title: str, desp: str = '') -> bool:
61 | url = 'https://sctapi.ftqq.com/{0}.send'.format(sendkey)
62 | data = {
63 | 'title': title, # 消息标题,必填。最大长度为 32
64 | 'desp': desp # 消息内容,选填。支持 Markdown语法 ,最大长度为 32KB ,消息卡片截取前 30 显示
65 | }
66 |
67 | return post_msg(url, data)
68 |
69 |
70 | def get_access_token(token):
71 | access_token = ''
72 | try:
73 | url = "https://auth.aliyundrive.com/v2/account/token"
74 |
75 | data_dict = {
76 | "refresh_token": token,
77 | "grant_type": "refresh_token"
78 | }
79 | headers = {
80 | "accept": "application/json, text/plain, */*",
81 | "accept-language": "zh-CN,zh;q=0.9",
82 | "cache-control": "no-cache",
83 | "content-type": "application/json;charset=UTF-8",
84 | "origin": "https://www.aliyundrive.com",
85 | "pragma": "no-cache",
86 | "referer": "https://www.aliyundrive.com/",
87 | "sec-fetch-dest": "empty",
88 | "sec-fetch-mode": "cors",
89 | "sec-fetch-site": "same-site",
90 | "user-agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/108.0.0.0 Safari/537.36",
91 | }
92 |
93 | resp = requests.post(url, json=data_dict, headers=headers)
94 | resp_json = resp.json()
95 | logger.debug(f"resp_json={resp_json}")
96 |
97 | token = {}
98 | token['access_token'] = resp_json.get('access_token', "")
99 | token['refresh_token'] = resp_json.get('refresh_token', "")
100 | token['expire_time'] = resp_json.get('expire_time', "")
101 | logger.info(
102 | f"获取得到新的access_token={token['access_token'][:10]}......,新的refresh_token={token['refresh_token']},过期时间={token['expire_time']}")
103 | access_token = token['access_token']
104 | except:
105 | logger.error(f"获取异常:{traceback.format_exc()}")
106 |
107 | return access_token
108 |
109 |
110 | class ALiYunPan(object):
111 | def __init__(self, access_token):
112 | # 获取JSON.parse(localStorage.getItem("token")).access_token
113 | # 请自行更新填写access_token,有效期7200s
114 | self.access_token = access_token
115 |
116 | def sign_in(self):
117 | sign_in_days_lists = []
118 | not_sign_in_days_lists = []
119 |
120 | try:
121 | token = self.access_token
122 | url = 'https://member.aliyundrive.com/v1/activity/sign_in_list'
123 | headers = {
124 | "Content-Type": "application/json",
125 | "Authorization": token,
126 | "User-Agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 15_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 D/C501C6D2-FAF6-4DA8-B65B-7B8B392901EB"
127 | }
128 | body = {}
129 |
130 | resp = requests.post(url, json=body, headers=headers)
131 | resp_text = resp.text
132 | resp_json = resp.json()
133 |
134 | # 未登录
135 | # {"code":"AccessTokenInvalid","message":"not login","requestId":"0a0080e216757311048316214ed958"}
136 | code = resp_json.get('code', '')
137 | if code == "AccessTokenInvalid":
138 | logger.warning(f"请检查token是否正确")
139 | elif code is None:
140 | # success = resp_json.get('success', '')
141 | # logger.debug(f"success={success}")
142 |
143 | result = resp_json.get('result', {})
144 | sign_in_logs_list = result.get("signInLogs", [])
145 | sign_in_count = result.get("signInCount", 0)
146 | title = '阿里云盘签到提醒'
147 | msg = ''
148 |
149 | if len(sign_in_logs_list) > 0:
150 | for i, sign_in_logs_dict in enumerate(sign_in_logs_list, 1):
151 |
152 | status = sign_in_logs_dict.get('status', '')
153 | day = sign_in_logs_dict.get('day', '')
154 | isReward = sign_in_logs_dict.get('isReward', 'false')
155 | if status == "":
156 | logger.info(
157 | f"sign_in_logs_dict={sign_in_logs_dict}")
158 | logger.error(f"签到信息获取异常:{resp_text}")
159 | elif status == "miss":
160 | # logger.warning(f"第{day}天未打卡")
161 | not_sign_in_days_lists.append(day)
162 | elif status == "normal":
163 | reward = {}
164 | if not isReward: # 签到但未领取奖励
165 | reward = self.get_reward(day)
166 | else:
167 | reward = sign_in_logs_dict.get('reward', {})
168 | # 获取签到奖励内容
169 | if reward:
170 | name = reward.get('name', '')
171 | description = reward.get('description', '')
172 | else:
173 | name = '无奖励'
174 | description = ''
175 | today_info = '✅' if day == sign_in_count else '☑'
176 | log_info = f"{today_info}打卡第{day}天,获得奖励:**[{name}->{description}]**"
177 | logger.info(log_info)
178 | msg = msg + log_info + '\n\n'
179 | sign_in_days_lists.append(day)
180 |
181 | log_info = f"🔥打卡进度:{sign_in_count}/{len(sign_in_logs_list)}"
182 | logger.info(log_info)
183 |
184 | msg = msg + log_info
185 | if PUSH_KEY:
186 | ServerChan_send(PUSH_KEY, title, msg)
187 | if PUSH_PLUS_TOKEN:
188 | PushPlus_send(PUSH_PLUS_TOKEN, title, msg)
189 | else:
190 | logger.warning(f"resp_json={resp_json}")
191 | else:
192 | logger.warning(f"resp_json={resp_json}")
193 | # logger.debug(f"code={code}")
194 |
195 | except:
196 | logger.error(f"签到异常={traceback.format_exc()}")
197 |
198 | def get_reward(self, day):
199 | try:
200 | token = self.access_token
201 | url = 'https://member.aliyundrive.com/v1/activity/sign_in_reward'
202 | headers = {
203 | "Content-Type": "application/json",
204 | "Authorization": token,
205 | "User-Agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 15_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 D/C501C6D2-FAF6-4DA8-B65B-7B8B392901EB"
206 | }
207 | body = {
208 | 'signInDay': day
209 | }
210 |
211 | resp = requests.post(url, json=body, headers=headers)
212 | resp_text = resp.text
213 | logger.debug(f"resp_json={resp_text}")
214 |
215 | resp_json = resp.json()
216 | result = resp_json.get('result', {})
217 | name = result.get('name', '')
218 | description = result.get('description', '')
219 | return {'name': name, 'description': description}
220 | except:
221 | logger.error(f"获取签到奖励异常={traceback.format_exc()}")
222 |
223 | return {'name': 'null', 'description': 'null'}
224 |
225 |
226 | def main():
227 | if ',' in refresh_token:
228 | tokens = refresh_token.split(',')
229 | elif ',' in refresh_token:
230 | tokens = refresh_token.split(',')
231 | else:
232 | tokens = [refresh_token]
233 | for token in tokens:
234 | access_token = get_access_token(token)
235 | if access_token:
236 | ali = ALiYunPan(access_token)
237 | ali.sign_in()
238 |
239 |
240 | if __name__ == '__main__':
241 | main()
242 |
--------------------------------------------------------------------------------
/39959_maotai_optional.py:
--------------------------------------------------------------------------------
1 | import datetime
2 | import logging
3 | import os
4 | import random
5 | import time
6 | import sys
7 | import traceback
8 |
9 | import requests
10 | import base64
11 | import json
12 |
13 | logging.basicConfig(level=logging.INFO, format='%(message)s')
14 |
15 | env_key = "MAOTAI_CONFIG"
16 | res_map = {
17 | # '10213': '贵州茅台酒(癸卯兔年)',
18 | # '10056': '茅台1935',
19 | '2478': '贵州茅台酒(珍品)',
20 | '10214': '贵州茅台酒(癸卯兔年)2'
21 | }
22 | mt_r = 'clips_OlU6TmFRag5rCXwbNAQ/Tz1SKlN8THcecBp/HGhHdw=='
23 | p_c_map = {}
24 | Version = '3.2.16'
25 |
26 |
27 | # 加载通知
28 | def load_send() -> None:
29 | logging.info("加载推送功能中...")
30 | global send
31 | send = None
32 | cur_path = os.path.abspath(os.path.dirname(__file__))
33 | sys.path.append(cur_path)
34 | if os.path.exists(cur_path + "/notify.py"):
35 | try:
36 | from notify import send
37 | except Exception:
38 | send = None
39 | logging.info(f"❌加载通知服务失败!!!\n{traceback.format_exc()}")
40 | else:
41 | logging.info(f"❌加载通知服务失败!!!\n")
42 |
43 |
44 | # 获取环境变量
45 | def get_envs(env_key):
46 | if env_key in os.environ:
47 | configs = os.environ[env_key]
48 | if len(configs) > 0:
49 | try:
50 | return configs
51 | except Exception as e:
52 | logging.error(f"{env_key}变量格式错误: {e}")
53 | sys.exit(1)
54 |
55 | else:
56 | logging.info(f"{env_key}变量量未启用")
57 | sys.exit(1)
58 | else:
59 | logging.info(f'未添加{env_key}变量')
60 | sys.exit(1)
61 |
62 |
63 | # 抢购
64 | def mt_add(item_id, shop_id, session_id, user_id, token, device_id):
65 | mt_k = f'{int(time.time() * 1000)}'
66 | r = requests.get(f'http://82.157.10.108:8086/get_mtv?DeviceID={device_id}&MTk={mt_k}&version={Version}&key=yaohuo')
67 | headers = {
68 | 'User-Agent': 'iPhone 14',
69 | 'MT-Token': token,
70 | 'MT-Network-Type': 'WIFI', 'MT-User-Tag': '0',
71 | 'MT-R': mt_r, 'MT-Lat': '', 'MT-K': mt_k,
72 | 'MT-Lng': '', 'MT-Info': '028e7f96f6369cafe1d105579c5b9377', 'MT-APP-Version': Version,
73 | 'MT-Request-ID': f'{int(time.time() * 1000)}', 'Accept-Language': 'zh-Hans-CN;q=1',
74 | 'MT-Device-ID': device_id, 'MT-V': r.text,
75 | 'MT-Bundle-ID': 'com.moutai.mall',
76 | 'mt-lng': lng,
77 | 'mt-lat': lat
78 |
79 | }
80 | d = {"itemInfoList": [{"count": 1, "itemId": str(item_id)}], "sessionId": session_id, "userId": str(user_id),
81 | "shopId": str(shop_id)}
82 | r = requests.get('http://82.157.10.108:8086/get_actParam?key=yaohuo&actParam=' + base64.b64encode(
83 | json.dumps(d).replace(' ', '').encode('utf8')).decode())
84 | d['actParam'] = r.text
85 | json_data = d
86 | response = requests.post('https://app.moutai519.com.cn/xhr/front/mall/reservation/add', headers=headers,
87 | json=json_data)
88 | code = response.json().get('code', 0)
89 | if code == 2000:
90 | return response.json().get('data', {}).get('successDesc', "未知")
91 | return '申购失败, ' + response.json().get('message', "未知原因")
92 |
93 |
94 | def get_session_id(device_id, token):
95 | headers = {
96 | 'mt-device-id': device_id,
97 | 'mt-user-tag': '0',
98 | 'accept': '*/*',
99 | 'mt-network-type': 'WIFI',
100 | 'mt-token': token,
101 | 'mt-bundle-id': 'com.moutai.mall',
102 | 'accept-language': 'zh-Hans-CN;q=1',
103 | 'mt-request-id': f'{int(time.time() * 1000)}',
104 | 'mt-app-version': '3.2.16',
105 | 'user-agent': 'iPhone 14',
106 | 'mt-r': mt_r,
107 | 'mt-lng': lng,
108 | 'mt-lat': lat
109 | }
110 |
111 | response = requests.get('https://static.moutai519.com.cn/mt-backend/xhr/front/mall/index/session/get/' + time_keys,
112 | headers=headers)
113 | session_id = response.json().get('data', {}).get('sessionId')
114 | item_list = response.json().get('data', {}).get('itemList', [])
115 | item_codes = [item.get('itemCode') for item in item_list]
116 | return session_id, item_codes
117 |
118 |
119 | def get_shop_item(session_id, item_id, device_id, token, province, city):
120 | headers = {
121 | 'mt-device-id': device_id,
122 | 'mt-user-tag': '0',
123 | 'mt-lat': '',
124 | 'accept': '*/*',
125 | 'mt-network-type': 'WIFI',
126 | 'mt-token': token,
127 | 'mt-bundle-id': 'com.moutai.mall',
128 | 'accept-language': 'zh-Hans-CN;q=1',
129 | 'mt-request-id': f'{int(time.time() * 1000)}',
130 | 'mt-r': mt_r,
131 | 'mt-app-version': '3.2.16',
132 | 'user-agent': 'iPhone 14',
133 | 'mt-lng': '',
134 | 'mt-lng': lng,
135 | 'mt-lat': lat
136 | }
137 |
138 | response = requests.get(
139 | 'https://static.moutai519.com.cn/mt-backend/xhr/front/mall/shop/list/slim/v3/' + str(
140 | session_id) + '/' + province + '/' + str(item_id) + '/' + time_keys,
141 | headers=headers)
142 | data = response.json().get('data', {})
143 | shops = data.get('shops', [])
144 | shop_id_ = p_c_map[province][city]
145 | for shop in shops:
146 | if not shop.get('shopId') in shop_id_:
147 | continue
148 | if item_id in str(shop):
149 | return shop.get('shopId')
150 |
151 |
152 | def get_user_id(token, Device_ID):
153 | headers = {
154 | 'MT-User-Tag': '0',
155 | 'Accept': '*/*',
156 | 'MT-Network-Type': 'WIFI',
157 | 'MT-Token': token,
158 | 'MT-Bundle-ID': 'com.moutai.mall',
159 | 'Accept-Language': 'zh-Hans-CN;q=1, en-CN;q=0.9',
160 | 'MT-Request-ID': f'{int(time.time() * 1000)}',
161 | 'MT-APP-Version': '3.2.16',
162 | 'User-Agent': 'iOS;16.0.1;Apple;iPhone 14 ProMax',
163 | 'MT-R': mt_r,
164 | 'MT-Device-ID': Device_ID,
165 | 'mt-lng': lng,
166 | 'mt-lat': lat
167 | }
168 |
169 | response = requests.get('https://app.moutai519.com.cn/xhr/front/user/info', headers=headers)
170 | user_name = response.json().get('data', {}).get('userName')
171 | user_id = response.json().get('data', {}).get('userId')
172 | mobile = response.json().get('data', {}).get('mobile')
173 | return user_name, user_id, mobile
174 |
175 |
176 | def getUserEnergyAward(device_id, ck):
177 | cookies = {
178 | 'MT-Device-ID-Wap': device_id,
179 | 'MT-Token-Wap': ck,
180 | 'YX_SUPPORT_WEBP': '1',
181 | }
182 |
183 | headers = {
184 | 'X-Requested-With': 'XMLHttpRequest',
185 | 'User-Agent': 'Mozilla/5.0 (iPhone; CPU iPhone OS 15_2_1 like Mac OS X)',
186 | 'Referer': 'https://h5.moutai519.com.cn/gux/game/main?appConfig=2_1_2',
187 | 'Client-User-Agent': 'iOS;15.0.1;Apple;iPhone 12 ProMax',
188 | 'MT-R': mt_r,
189 | 'Origin': 'https://h5.moutai519.com.cn',
190 | 'MT-APP-Version': '3.2.16',
191 | 'MT-Request-ID': f'{int(time.time() * 1000)}',
192 | 'Accept-Language': 'zh-CN,zh-Hans;q=0.9',
193 | 'MT-Device-ID': device_id,
194 | 'Accept': 'application/json, text/javascript, */*; q=0.01',
195 | 'mt-lng': lng,
196 | 'mt-lat': lat
197 | }
198 | response = requests.post('https://h5.moutai519.com.cn/game/isolationPage/getUserEnergyAward', cookies=cookies,
199 | headers=headers, json={})
200 | return response.json().get('message') if '无法领取奖励' in response.text else "领取奖励成功"
201 |
202 |
203 | def get_map():
204 | global p_c_map
205 | url = 'https://static.moutai519.com.cn/mt-backend/xhr/front/mall/resource/get'
206 | headers = {
207 | 'MT-R': mt_r,
208 | 'Origin': 'https://h5.moutai519.com.cn',
209 | 'MT-APP-Version': '3.2.16',
210 | 'MT-Request-ID': f'{int(time.time() * 1000)}{random.randint(1111111, 999999999)}{int(time.time() * 1000)}',
211 | 'Accept-Language': 'zh-CN,zh-Hans;q=0.9',
212 | 'MT-Device-ID': f'{int(time.time() * 1000)}{random.randint(1111111, 999999999)}{int(time.time() * 1000)}',
213 | 'Accept': 'application/json, text/javascript, */*; q=0.01',
214 | 'mt-lng': lng,
215 | 'mt-lat': lat
216 | }
217 | res = requests.get(url, headers=headers)
218 | mtshops = res.json().get('data', {}).get('mtshops_pc', {})
219 | urls = mtshops.get('url')
220 | r = requests.get(urls)
221 | for k, v in dict(r.json()).items():
222 | province_name = v.get('provinceName')
223 | city_name = v.get('cityName')
224 | if not p_c_map.get(province_name):
225 | p_c_map[province_name] = {}
226 | if not p_c_map[province_name].get(city_name, None):
227 | p_c_map[province_name][city_name] = [k]
228 | else:
229 | p_c_map[province_name][city_name].append(k)
230 | return p_c_map
231 |
232 |
233 | if __name__ == '__main__':
234 | # 加载通知
235 | load_send()
236 |
237 | # 抢购
238 | maotai_configs = get_envs(env_key)
239 | msg = ''
240 | index = 1
241 | for config in maotai_configs.split("&"):
242 | single_msg = f'===== 第{index}个账号 =====\n'
243 | if not config:
244 | continue
245 | province, city, lng, lat, device_id, token, ck = config.split(',')
246 | time_keys = str(int(time.mktime(datetime.date.today().timetuple())) * 1000)
247 | try:
248 | get_map()
249 | session_id, item_codes = get_session_id(device_id, token)
250 | user_name, user_id, mobile = get_user_id(token, device_id)
251 | for item_code in item_codes:
252 | if not res_map.get(item_code):
253 | continue
254 | name = res_map.get(str(item_code))
255 | shop_id = get_shop_item(session_id, item_code, device_id, token, province, city)
256 | res = mt_add(item_code, str(shop_id), session_id, user_id, token, device_id)
257 | single_msg += f'{user_name}({mobile}) {name} 抢购结果: {res}\n'
258 | r = getUserEnergyAward(device_id, ck)
259 | single_msg += f'{user_name}({mobile} 耐力: {r}\n'
260 | except Exception as e:
261 | single_msg += f'异常: {e}'
262 | logging.info(single_msg)
263 | msg += single_msg + '\n\n'
264 | index += 1
265 |
266 | send('茅台抢购结果', msg)
267 |
--------------------------------------------------------------------------------
/联通签到.py:
--------------------------------------------------------------------------------
1 | # coding=utf-8
2 | import re
3 | from time import sleep
4 | import datetime
5 | import requests
6 | from Crypto.PublicKey import RSA
7 | from Crypto.Cipher import PKCS1_v1_5 as Cipher_pkcs1_v1_5
8 | import base64
9 |
10 | from requests import post
11 |
12 | # 此处改为自己的配置 手机号, 密码, appId
13 | phone = ''
14 | password = ''
15 | pid = ''
16 |
17 | # TG配置
18 | TG_TOKEN = 'xxx' # TG机器人的TOKEN
19 | CHAT_ID = 'xxx' # 推送消息的CHAT_ID
20 |
21 | # 新版Server酱配置
22 | server_key = 'xxxxxxxxxx'
23 |
24 |
25 | # 新版Server酱推送
26 | def send_server(title, content):
27 | server_content = {'text': title, 'desp': content}
28 | server_url = "https://sctapi.ftqq.com/%s.send" % server_key
29 | resp = requests.post(server_url, params=server_content)
30 | print('新版Server酱推送状态码为: %s' % resp.status_code)
31 |
32 |
33 | # TG推送
34 | def tgPush(telegram_message):
35 | params = (
36 | ('chat_id', CHAT_ID),
37 | ('text', telegram_message),
38 | ('parse_mode', "Html"), # 可选Html或Markdown
39 | ('disable_web_page_preview', "yes")
40 | )
41 | telegram_url = "https://api.telegram.org/bot" + TG_TOKEN + "/sendMessage"
42 | post(telegram_url, params=params)
43 |
44 | # 企业微信配置
45 | corpid = 'xxx' # 上面提到的你的企业ID
46 | corpsecret = 'xxx' # 上图的Secret
47 | agentid = 'xxx' # 填写你的企业ID,不加引号,是个整型常数,就是上图的AgentId
48 |
49 | # 企业微信推送
50 | def wxPush(message):
51 | token_url = 'https://qyapi.weixin.qq.com/cgi-bin/gettoken?' + 'corpid=' + corpid + '&corpsecret=' + corpsecret
52 | req_url = 'https://qyapi.weixin.qq.com/cgi-bin/message/send?access_token='
53 | resp = requests.get(token_url).json()
54 | access_token = resp['access_token']
55 | data = {
56 | "touser": "@all",
57 | "toparty": "@all",
58 | "totag": "@all",
59 | "msgtype": "text",
60 | "agentid": agentid,
61 | "text": {
62 | "content": message
63 | },
64 | "safe": 0,
65 | "enable_id_trans": 0,
66 | "enable_duplicate_check": 0,
67 | "duplicate_check_interval": 1800
68 | }
69 | data = json.dumps(data)
70 | req_urls = req_url + access_token
71 | res = requests.post(url=req_urls, data=data)
72 | print(res.text)
73 |
74 | class UnicomSign():
75 |
76 | def __init__(self):
77 | self.UA = None
78 | self.VERSION = '8.0200'
79 | self.request = requests.Session()
80 | self.resp = '联通营业厅签到通知 \n\n'
81 | self.pid = pid
82 |
83 | # 加密算法
84 | def rsa_encrypt(self, str):
85 | # 公钥
86 | publickey = '''-----BEGIN PUBLIC KEY-----
87 | MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDc+CZK9bBA9IU+gZUOc6
88 | FUGu7yO9WpTNB0PzmgFBh96Mg1WrovD1oqZ+eIF4LjvxKXGOdI79JRdve9
89 | NPhQo07+uqGQgE4imwNnRx7PFtCRryiIEcUoavuNtuRVoBAm6qdB0Srctg
90 | aqGfLgKvZHOnwTjyNqjBUxzMeQlEC2czEMSwIDAQAB
91 | -----END PUBLIC KEY-----'''
92 | rsakey = RSA.importKey(publickey)
93 | cipher = Cipher_pkcs1_v1_5.new(rsakey)
94 | cipher_text = base64.b64encode(cipher.encrypt(str.encode('utf-8')))
95 | return cipher_text.decode('utf-8')
96 |
97 | # 用户登录
98 | def login(self, mobile, passwd):
99 | self.UA = 'Mozilla/5.0 (Linux; Android 9; MI 6 Build/PKQ1.190118.001; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/80.0.3987.99 Mobile Safari/537.36; unicom{version:android@' + self.VERSION + ',desmobile:' + mobile + '};devicetype{deviceBrand:Xiaomi,deviceModel:MI 6};{yw_code:}'
100 | timestamp = datetime.datetime.now().strftime('%Y%m%d%H%M%S')
101 | headers = {
102 | 'Host': 'm.client.10010.com',
103 | 'Accept': '*/*',
104 | 'Content-Type': 'application/x-www-form-urlencoded',
105 | 'Connection': 'keep-alive',
106 | 'Cookie': 'devicedId=20be54b981ba4188a797f705d77842d6',
107 | 'User-Agent': self.UA,
108 | 'Accept-Language': 'zh-cn',
109 | 'Accept-Encoding': 'gzip',
110 | 'Content-Length': '1446'
111 | }
112 | login_url = 'https://m.client.10010.com/mobileService/login.htm'
113 | login_data = {
114 | "deviceOS": "android9",
115 | "mobile": self.rsa_encrypt(mobile),
116 | "netWay": "Wifi",
117 | "deviceCode": "20be54b981ba4188a797f705d77842d6",
118 | "isRemberPwd": 'true',
119 | "version": "android@" + self.VERSION,
120 | "deviceId": "20be54b981ba4188a797f705d77842d6",
121 | "password": self.rsa_encrypt(passwd),
122 | "keyVersion": 1,
123 | "provinceChanel": "general",
124 | "appId": self.pid,
125 | "deviceModel": "MI 6",
126 | "deviceBrand": "Xiaomi",
127 | "timestamp": timestamp
128 | }
129 |
130 | res1 = self.request.post(login_url, data=login_data, headers=headers)
131 | if res1.status_code == 200:
132 | print(">>>获取登录状态成功!")
133 | self.resp += '>>>获取登录状态成功!\n\n'
134 |
135 | else:
136 | print(">>>获取登录状态失败!")
137 | self.resp += '>>>获取登录状态失败!\n\n'
138 |
139 | sleep(3)
140 |
141 | # 每日签到领积分、1g流量日包
142 | def daysign(self):
143 | headers = {
144 | "user-agent": self.UA,
145 | "referer": "https://img.client.10010.com",
146 | "origin": "https://img.client.10010.com"
147 | }
148 | res0 = self.request.post("https://act.10010.com/SigninApp/signin/getIntegral", headers=headers)
149 | if res0.json()['status'] == '0000':
150 | print(">>>签到前积分:" + res0.json()['data']['integralTotal'])
151 | self.resp += ">>>签到前积分:" + res0.json()['data']['integralTotal'] + '\n\n'
152 | else:
153 | print(">>>获取积分信息失败!")
154 | self.resp += '获取积分信息失败' + '\n\n'
155 |
156 | res1 = self.request.post("https://act.10010.com/SigninApp/signin/getContinuous", headers=headers)
157 | sleep(3)
158 | if res1.json()['data']['todaySigned'] == '1':
159 | res2 = self.request.post("https://act.10010.com/SigninApp/signin/daySign", headers=headers)
160 |
161 | print('>>>签到成功!')
162 | self.resp += '>>>签到成功!\n\n'
163 | else:
164 | print('>>>今天已签到!')
165 | self.resp += '>>>今天已签到!\n\n'
166 |
167 | # 看视频,积分翻倍
168 | sleep(3)
169 | res3 = self.request.post("https://act.10010.com/SigninApp/signin/bannerAdPlayingLogo", headers=headers)
170 | if res3.json()['status'] == '0000':
171 | self.resp += '>>>积分翻倍成功!\n\n'
172 | print(">>>积分翻倍成功!")
173 | else:
174 | print(res3.json()['msg'])
175 | self.resp += res3.json()['msg'] + '\n\n'
176 |
177 | res4 = self.request.post("https://act.10010.com/SigninApp/signin/getIntegral", headers=headers)
178 | if res4.json()['status'] == '0000':
179 | print(">>>签到后积分:" + res4.json()['data']['integralTotal'])
180 | self.resp += ">>>签到后积分:" + res4.json()['data']['integralTotal'] + '\n\n'
181 | else:
182 | print(">>>获取积分信息失败!")
183 | self.resp += '>>>获取积分信息失败!\n\n'
184 |
185 | # 每日领取1G流量日包
186 | res5 = self.request.post("https://act.10010.com/SigninApp/doTask/finishVideo", headers=headers)
187 | res6 = self.request.post("https://act.10010.com/SigninApp/doTask/getTaskInfo", headers=headers)
188 | res7 = self.request.post("https://act.10010.com/SigninApp/doTask/getPrize", headers=headers)
189 | if res7.json()['status'] == '0000':
190 | print(">>>1G流量日包领取成功!")
191 | self.resp += '>>>1G流量日包领取成功!\n\n'
192 | else:
193 | print(">>>1G流量日包任务失败!")
194 | self.resp += '>>>1G流量日包任务失败!\n\n'
195 |
196 | # 每日任务
197 | def daytask(self):
198 | headers = {
199 | "user-agent": self.UA,
200 | "referer": "https://img.client.10010.com",
201 | "origin": "https://img.client.10010.com"
202 | }
203 | # 娱乐中心--每日打卡
204 | data1 = {
205 | 'methodType': 'signin',
206 | 'clientVersion': self.VERSION,
207 | 'deviceType': 'Android',
208 | }
209 | res1 = self.request.post("https://m.client.10010.com/producGame_signin", data=data1, headers=headers)
210 | res1.encoding = 'utf-8'
211 | print(">>>每日打卡:", res1.json()['respDesc'])
212 | self.resp += ">>>每日打卡:" + res1.json()['respDesc'] + '\n\n'
213 | # 沃之树任务
214 | res5 = self.request.post("https://m.client.10010.com/mactivity/arbordayJson/arbor/3/0/3/grow.htm",
215 | headers=headers)
216 | print(">>>每日浇水:", res5.json()['msg'])
217 | self.resp += ">>>每日浇水:" + res5.json()['msg'] + '\n\n'
218 | # 签到看视频,下载APP流量奖励
219 | print(">>>签到看视频,下载APP流量奖励任务开始...")
220 | data5 = {
221 | 'stepflag': 22
222 | }
223 | data6 = {
224 | 'stepflag': 23
225 | }
226 | for i in range(3):
227 | res5 = self.request.post("https://act.10010.com/SigninApp/mySignin/addFlow", data=data5, headers=headers)
228 | sleep(3)
229 | res6 = self.request.post("https://act.10010.com/SigninApp/mySignin/addFlow", data=data6, headers=headers)
230 | print(">>>签到看视频,下载APP流量奖励任务完成!")
231 | # 金币抽奖免费3次
232 | res7 = self.request.post("https://m.client.10010.com/dailylottery/static/textdl/userLogin", headers=headers)
233 | data8 = {
234 | 'usernumberofjsp': re.findall(r"encryptmobile=(.+?)';", res7.text)[0],
235 | 'flag': 'convert'
236 | }
237 | for i in range(3):
238 | res8 = self.request.post("https://m.client.10010.com/dailylottery/static/doubleball/choujiang", data=data8,
239 | headers=headers)
240 | if res8.status_code == 200:
241 | print(">>>金币抽奖:", res8.json()['RspMsg'])
242 | self.resp += ">>>金币抽奖:" + res8.json()['RspMsg'] + '\n\n'
243 | sleep(3)
244 |
245 |
246 |
247 |
248 |
249 | if __name__ == '__main__':
250 | user = UnicomSign()
251 | user.login(phone, password) # 用户登录 这里需要更改
252 | user.daysign() # 日常签到领积分,1g流量日包
253 | user.daytask() # 日常任务
254 | #send_server('联通营业厅签到通知', user.resp) # Server酱推送
255 | # tgPush(user.resp)
256 |
--------------------------------------------------------------------------------
/aliyun.js:
--------------------------------------------------------------------------------
1 | //阿里云盘连续签到活动
2 |
3 | const $ = API();
4 | const refresh_token = '';//抓包搜请求体关键字:refresh_token
5 |
6 | !(async () => {
7 |
8 | if (!refresh_token) {
9 | console.log('先填写refresh_token!');
10 | return
11 | }
12 | await main();
13 |
14 | })().catch(async (e) => {
15 | console.log('', '❌失败! 原因:' + e + '!', '');
16 | }).finally(() => {
17 | $.done();
18 | });
19 |
20 | var token = "";
21 | async function main() {
22 | try {
23 | const url = `https://auth.aliyundrive.com/v2/account/token`;
24 | const method = `POST`;
25 | const headers = {
26 | 'Connection': `keep-alive`,
27 | 'Content-Type': `application/json; charset=UTF-8`,
28 | 'X-Canary': `client=iOS,app=adrive,version=v4.1.3`,
29 | 'User-Agent': `AliApp(AYSD/4.1.3) com.alicloud.smartdrive/4.1.3 Version/16.3 Channel/201200 Language/zh-Hans-CN /iOS Mobile/iPhone15,2`,
30 | 'Host': `auth.aliyundrive.com`,
31 | 'Accept-Language': `zh-CN,zh-Hans;q=0.9`,
32 | 'Accept': `*/*`
33 | };
34 | const body = `{"grant_type":"refresh_token","app_id":"pJZInNHN2dZWk8qg","refresh_token":"${refresh_token}"}`;
35 |
36 | const myRequest = {
37 | url: url,
38 | method: method,
39 | headers: headers,
40 | body: body
41 | };
42 |
43 | let a = await $.http.post(myRequest);
44 | let data = JSON.parse(a.body);
45 | if (data.code == 'InvalidParameter.RefreshToken') {
46 | //{"code":"InvalidParameter.RefreshToken","message":"The input parameter refresh_token is not valid. ","requestId":null}
47 | console.log(`token刷新失败,${data.message}`);
48 | }
49 | else{
50 | console.log(data.nick_name);
51 | token = data.access_token;
52 | await sign();
53 | }
54 |
55 | } catch (error) {
56 | console.log('error:' + error);
57 | }
58 | }
59 |
60 | async function sign() {
61 | try {
62 | const url = `https://member.aliyundrive.com/v1/activity/sign_in_list`;
63 | const method = `POST`;
64 | const headers = {
65 | 'Connection': `keep-alive`,
66 | 'Content-Type': `application/json`,
67 | 'Origin': `https://pages.aliyundrive.com`,
68 | 'X-Canary': `client=web,app=other,version=v0.1.0`,
69 | 'User-Agent': `Mozilla/5.0 (iPhone; CPU iPhone OS 16_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/20D5024e iOS16.3 (iPhone15,2;zh-Hans-CN) App/4.1.3 AliApp(yunpan/4.1.3) com.alicloud.smartdrive/28278449 Channel/201200 AliApp(AYSD/4.1.3) com.alicloud.smartdrive/4.1.3 Version/16.3 Channel/201200 Language/zh-Hans-CN /iOS Mobile/iPhone15,2 language/zh-Hans-CN`,
70 | 'Authorization': `Bearer ${token}`,
71 | 'Host': `member.aliyundrive.com`,
72 | 'Referer': `https://pages.aliyundrive.com/`,
73 | 'Accept-Language': `zh-CN,zh-Hans;q=0.9`,
74 | 'Accept': `application/json, text/plain, */*`
75 | };
76 | const body = `{"isReward":false}`;
77 |
78 | const myRequest = {
79 | url: url,
80 | method: method,
81 | headers: headers,
82 | body: body
83 | };
84 | let a = await $.http.post(myRequest);
85 | let data = JSON.parse(a.body);
86 | if (data.success) {
87 | console.log(`已连续签到${data.result.signInCount}天!`);
88 | await sign_in_reward(data.result.signInCount);
89 | }
90 | else {
91 | console.log(`签到失败,${data.message}!`);
92 | }
93 |
94 | } catch (error) {
95 | console.log(error);
96 | }
97 | }
98 |
99 | async function sign_in_reward(day) {
100 | try {
101 | const url = `https://member.aliyundrive.com/v1/activity/sign_in_reward`;
102 | const method = `POST`;
103 | const headers = {
104 | 'Connection': `keep-alive`,
105 | 'Content-Type': `application/json`,
106 | 'Origin': `https://pages.aliyundrive.com`,
107 | 'X-Canary': `client=web,app=other,version=v0.1.0`,
108 | 'User-Agent': `Mozilla/5.0 (iPhone; CPU iPhone OS 16_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/20D5024e iOS16.3 (iPhone15,2;zh-Hans-CN) App/4.1.3 AliApp(yunpan/4.1.3) com.alicloud.smartdrive/28278449 Channel/201200 AliApp(AYSD/4.1.3) com.alicloud.smartdrive/4.1.3 Version/16.3 Channel/201200 Language/zh-Hans-CN /iOS Mobile/iPhone15,2 language/zh-Hans-CN`,
109 | 'Authorization': `Bearer ${token}`,
110 | 'Host': `member.aliyundrive.com`,
111 | 'Referer': `https://pages.aliyundrive.com/`,
112 | 'Accept-Language': `zh-CN,zh-Hans;q=0.9`,
113 | 'Accept': `application/json, text/plain, */*`
114 | };
115 | const body = `{"signInDay":${day}}`;
116 |
117 | const myRequest = {
118 | url: url,
119 | method: method,
120 | headers: headers,
121 | body: body
122 | };
123 |
124 | let a = await $.http.post(myRequest);
125 | let data = JSON.parse(a.body);
126 | if (data.success) {
127 | console.log(`奖励:${data.result.name},${data.result.description},${data.result.notice}!`);
128 | }
129 | else {
130 | console.log(`奖励获取失败:${data.message}!`);
131 | }
132 |
133 | } catch (error) {
134 | console.log(error);
135 | }
136 | }
137 |
138 |
139 | /*********************************** API *************************************/
140 | function ENV() { const e = "undefined" != typeof $task, t = "undefined" != typeof $loon, s = "undefined" != typeof $httpClient && !t, i = "function" == typeof require && "undefined" != typeof $jsbox; return { isQX: e, isLoon: t, isSurge: s, isNode: "function" == typeof require && !i, isJSBox: i, isRequest: "undefined" != typeof $request, isScriptable: "undefined" != typeof importModule } } function HTTP(e = { baseURL: "" }) { const { isQX: t, isLoon: s, isSurge: i, isScriptable: n, isNode: o } = ENV(), r = /https?:\/\/(www\.)?[-a-zA-Z0-9@:%._\+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9()@:%_\+.~#?&\/\/=]*)/; const u = {}; return ["GET", "POST", "PUT", "DELETE", "HEAD", "OPTIONS", "PATCH"].forEach(l => u[l.toLowerCase()] = (u => (function (u, l) { l = "string" == typeof l ? { url: l } : l; const h = e.baseURL; h && !r.test(l.url || "") && (l.url = h ? h + l.url : l.url); const a = (l = { ...e, ...l }).timeout, c = { onRequest: () => { }, onResponse: e => e, onTimeout: () => { }, ...l.events }; let f, d; if (c.onRequest(u, l), t) f = $task.fetch({ method: u, ...l }); else if (s || i || o) f = new Promise((e, t) => { (o ? require("request") : $httpClient)[u.toLowerCase()](l, (s, i, n) => { s ? t(s) : e({ statusCode: i.status || i.statusCode, headers: i.headers, body: n }) }) }); else if (n) { const e = new Request(l.url); e.method = u, e.headers = l.headers, e.body = l.body, f = new Promise((t, s) => { e.loadString().then(s => { t({ statusCode: e.response.statusCode, headers: e.response.headers, body: s }) }).catch(e => s(e)) }) } const p = a ? new Promise((e, t) => { d = setTimeout(() => (c.onTimeout(), t(`${u} URL: ${l.url} exceeds the timeout ${a} ms`)), a) }) : null; return (p ? Promise.race([p, f]).then(e => (clearTimeout(d), e)) : f).then(e => c.onResponse(e)) })(l, u))), u } function API(e = "untitled", t = !1) { const { isQX: s, isLoon: i, isSurge: n, isNode: o, isJSBox: r, isScriptable: u } = ENV(); return new class { constructor(e, t) { this.name = e, this.debug = t, this.http = HTTP(), this.env = ENV(), this.node = (() => { if (o) { return { fs: require("fs") } } return null })(), this.initCache(); Promise.prototype.delay = function (e) { return this.then(function (t) { return ((e, t) => new Promise(function (s) { setTimeout(s.bind(null, t), e) }))(e, t) }) } } initCache() { if (s && (this.cache = JSON.parse($prefs.valueForKey(this.name) || "{}")), (i || n) && (this.cache = JSON.parse($persistentStore.read(this.name) || "{}")), o) { let e = "root.json"; this.node.fs.existsSync(e) || this.node.fs.writeFileSync(e, JSON.stringify({}), { flag: "wx" }, e => console.log(e)), this.root = {}, e = `${this.name}.json`, this.node.fs.existsSync(e) ? this.cache = JSON.parse(this.node.fs.readFileSync(`${this.name}.json`)) : (this.node.fs.writeFileSync(e, JSON.stringify({}), { flag: "wx" }, e => console.log(e)), this.cache = {}) } } persistCache() { const e = JSON.stringify(this.cache, null, 2); s && $prefs.setValueForKey(e, this.name), (i || n) && $persistentStore.write(e, this.name), o && (this.node.fs.writeFileSync(`${this.name}.json`, e, { flag: "w" }, e => console.log(e)), this.node.fs.writeFileSync("root.json", JSON.stringify(this.root, null, 2), { flag: "w" }, e => console.log(e))) } write(e, t) { if (this.log(`SET ${t}`), -1 !== t.indexOf("#")) { if (t = t.substr(1), n || i) return $persistentStore.write(e, t); if (s) return $prefs.setValueForKey(e, t); o && (this.root[t] = e) } else this.cache[t] = e; this.persistCache() } read(e) { return this.log(`READ ${e}`), -1 === e.indexOf("#") ? this.cache[e] : (e = e.substr(1), n || i ? $persistentStore.read(e) : s ? $prefs.valueForKey(e) : o ? this.root[e] : void 0) } delete(e) { if (this.log(`DELETE ${e}`), -1 !== e.indexOf("#")) { if (e = e.substr(1), n || i) return $persistentStore.write(null, e); if (s) return $prefs.removeValueForKey(e); o && delete this.root[e] } else delete this.cache[e]; this.persistCache() } notify(e, t = "", l = "", h = {}) { const a = h["open-url"], c = h["media-url"]; if (s && $notify(e, t, l, h), n && $notification.post(e, t, l + `${c ? "\n多媒体:" + c : ""}`, { url: a }), i) { let s = {}; a && (s.openUrl = a), c && (s.mediaUrl = c), "{}" === JSON.stringify(s) ? $notification.post(e, t, l) : $notification.post(e, t, l, s) } if (o || u) { const s = l + (a ? `\n点击跳转: ${a}` : "") + (c ? `\n多媒体: ${c}` : ""); if (r) { require("push").schedule({ title: e, body: (t ? t + "\n" : "") + s }) } else console.log(`${e}\n${t}\n${s}\n\n`) } } log(e) { this.debug && console.log(`[${this.name}] LOG: ${this.stringify(e)}`) } info(e) { console.log(`[${this.name}] INFO: ${this.stringify(e)}`) } error(e) { console.log(`[${this.name}] ERROR: ${this.stringify(e)}`) } wait(e) { return new Promise(t => setTimeout(t, e)) } done(e = {}) { s || i || n ? $done(e) : o && !r && "undefined" != typeof $context && ($context.headers = e.headers, $context.statusCode = e.statusCode, $context.body = e.body) } stringify(e) { if ("string" == typeof e || e instanceof String) return e; try { return JSON.stringify(e, null, 2) } catch (e) { return "[object Object]" } } }(e, t) }
141 | /*****************************************************************************/
--------------------------------------------------------------------------------
/5_6152272864604063310-20220922-224410.js:
--------------------------------------------------------------------------------
1 |
2 | /*
3 | 羊了个羊群 资金盘 不要投资
4 |
5 | (抓header里面的unionid和token的值)
6 |
7 | 格式 unionid#token
8 | 例如 oEgG85#123456
9 |
10 | ck填到yqCookie里,多账号 换行 或者@隔开
11 | */
12 |
13 | const $ = new Env("羊群");
14 | let envSplitor = ['@','\n']
15 | let httpResult, httpReq, httpResp
16 | let ckName = 'yqCookie'
17 | let userCookie = ($.isNode() ? process.env[ckName] : $.getdata(ckName)) || '';
18 |
19 | let userList = []
20 | let userIdx=0
21 | let userCount = 0
22 |
23 | ///////////////////////////////////////////////////////////////////
24 | class UserInfo {
25 | constructor(str) {
26 | this.index = ++userIdx
27 | try {
28 | this.ck = str.split('#')
29 | this.u=this.ck[0]
30 | this.t=this.ck[1]
31 | } catch (e) {
32 | }
33 | }
34 |
35 |
36 | async getuseinfo() {
37 | try {
38 | let url = `http://www.ieddoq.cn/user/getuseinfo`;
39 | let body = `{"unionid":"${this.u}"}`;
40 |
41 | let h={
42 | "unionid": this.u,
43 | "token": this.t,
44 | "Content-Type": "application/json"
45 | }
46 |
47 | let urlObject = popu(url, h,body)
48 | await httpRequest('post',urlObject )
49 | let result = httpResult;
50 | this.nickname=result.result.nickname
51 | this.money=result.result.money
52 | this.cashnum=result.result.cashnum
53 | if(!result.result.alipay)var x='未绑定'
54 | if(result.result.alipay){
55 | var x='已绑定'
56 | this.my=1
57 | }
58 | console.log(`用户 ${this.nickname} 余额${this.money} 支付宝${x}`)
59 | } catch (e) {
60 | console.log(e)
61 | } finally {
62 | return Promise.resolve(1);
63 | }
64 | }
65 |
66 |
67 |
68 |
69 | async addmoney() {
70 | try {
71 | let url = `http://www.ieddoq.cn/user/addmyorder0`;
72 | let body = `{
73 | "unionid" : "${this.u}"
74 | }`;
75 |
76 | let h={
77 | "unionid": this.u,
78 | "token": this.t,
79 | "Content-Type": "application/json"
80 | }
81 |
82 | let urlObject = popu(url, h,body)
83 | await httpRequest('post',urlObject )
84 | let result = httpResult;
85 |
86 | result.data==0&&console.log(`用户 ${this.nickname} 今天已经领取了`)
87 | if(this.money>=0.2&&this.my==1&&this.cashnum>0){
88 | await this.cash()
89 | }else console.log(`用户 ${this.nickname} 你今天还可以提现 ${this.cashnum} 次\n用户 ${this.nickname} 你的余额不足或者没绑定支付宝 跳过提现`)
90 | } catch (e) {
91 | console.log(e)
92 | } finally {
93 | return Promise.resolve(1);
94 | }
95 | }
96 |
97 | async cash() {
98 | try {
99 | let url = `http://www.ieddoq.cn/trade/pushcash`;
100 | let body = `{"unionid":"${this.u}","money":${this.money}}`;
101 |
102 | let h={
103 | "unionid": this.u,
104 | "token": this.t,
105 | "Content-Type": "application/json"
106 | }
107 |
108 | let urlObject = popu(url, h,body)
109 | await httpRequest('post',urlObject )
110 | let result = httpResult;
111 | result.data==0&&console.log(`用户 ${this.nickname} 你没绑定支付宝怎么提现?`)
112 | result.data==1&&console.log(`用户 ${this.nickname} 提现成功了 具体到账没有请打开支付宝查看吧!`)
113 |
114 | } catch (e) {
115 | console.log(e)
116 | } finally {
117 | return Promise.resolve(1);
118 | }
119 | }
120 |
121 |
122 |
123 |
124 | }
125 |
126 | !(async () => {
127 | if (typeof $request !== "undefined") {
128 | await GetRewrite()
129 | } else {
130 |
131 | if (!(await checkEnv())) return;
132 |
133 |
134 |
135 | if (userList.length > 0) {
136 | console.log('\n------- 登陆和余额 -------\n')
137 | taskall = []
138 | for (let user of userList) {
139 | taskall.push(user.getuseinfo())
140 | }
141 | await Promise.all(taskall)
142 |
143 | }
144 | if (userList.length > 0) {
145 | console.log('\n------- 分红和提现 -------\n')
146 | taskall = []
147 | for (let user of userList) {
148 | taskall.push(user.addmoney())
149 | }
150 | await Promise.all(taskall)
151 |
152 | }
153 | }
154 | })()
155 | .catch((e) => console.log(e))
156 | .finally(() => $.done())
157 |
158 | ///////////////////////////////////////////////////////////////////
159 | async function GetRewrite() {
160 |
161 | }
162 |
163 |
164 | async function checkEnv() {
165 | if (userCookie) {
166 | let splitor = envSplitor[0];
167 | for (let sp of envSplitor) {
168 | if (userCookie.indexOf(sp) > -1) {
169 | splitor = sp;
170 | break;
171 | }
172 | }
173 | for (let userCookies of userCookie.split(splitor)) {
174 | if (userCookies)
175 | userList.push(new UserInfo(userCookies))
176 |
177 | }
178 | userCount = userList.length
179 | } else {
180 | }
181 |
182 | console.log(`找到${userCount}个账号`)
183 |
184 |
185 |
186 | return true
187 | }
188 |
189 | ////////////////////////////////////////////////////////////////////
190 | function popu(url, h,body = '') {
191 | let host = url.replace('//', '/').split('/')[1]
192 | let urlObject = {
193 | url: url,
194 | headers: h,
195 | timeout: 5000,
196 | }
197 | if (body) {
198 | urlObject.body = body
199 | }
200 |
201 | return urlObject;
202 | }
203 |
204 |
205 | async function httpRequest(method, url) {
206 | httpResult = null, httpReq = null, httpResp = null;
207 | return new Promise((resolve) => {
208 | $.send(method, url, async (err, req, resp) => {
209 | try {
210 | httpReq = req;
211 | httpResp = resp;
212 | if (err) {
213 | } else {
214 | if (resp.body) {
215 | if (typeof resp.body == "object") {
216 | httpResult = resp.body;
217 | } else {
218 | try {
219 | httpResult = JSON.parse(resp.body);
220 | } catch (e) {
221 | httpResult = resp.body;
222 | }
223 | }
224 | }
225 | }
226 | } catch (e) {
227 | console.log(e);
228 | } finally {
229 | resolve();
230 | }
231 | });
232 | });
233 | }
234 | ////////////////////////////////////////////////////////////////////
235 | function Env(a,b){return"undefined"!=typeof process&&JSON.stringify(process.env).indexOf("GITHUB")> -1&&process.exit(0),new class{constructor(a,b){this.name=a,this.notifyStr="",this.startTime=(new Date).getTime(),Object.assign(this,b),console.log(`${this.name} 开始运行:
236 | `)}isNode(){return"undefined"!=typeof module&&!!module.exports}isQuanX(){return"undefined"!=typeof $task}isSurge(){return"undefined"!=typeof $httpClient&&"undefined"==typeof $loon}isLoon(){return"undefined"!=typeof $loon}getdata(b){let a=this.getval(b);if(/^@/.test(b)){let[,c,f]=/^@(.*?)\.(.*?)$/.exec(b),d=c?this.getval(c):"";if(d)try{let e=JSON.parse(d);a=e?this.lodash_get(e,f,""):a}catch(g){a=""}}return a}setdata(c,d){let a=!1;if(/^@/.test(d)){let[,b,e]=/^@(.*?)\.(.*?)$/.exec(d),f=this.getval(b),i=b?"null"===f?null:f||"{}":"{}";try{let g=JSON.parse(i);this.lodash_set(g,e,c),a=this.setval(JSON.stringify(g),b)}catch(j){let h={};this.lodash_set(h,e,c),a=this.setval(JSON.stringify(h),b)}}else a=this.setval(c,d);return a}getval(a){return this.isSurge()||this.isLoon()?$persistentStore.read(a):this.isQuanX()?$prefs.valueForKey(a):this.isNode()?(this.data=this.loaddata(),this.data[a]):this.data&&this.data[a]||null}setval(b,a){return this.isSurge()||this.isLoon()?$persistentStore.write(b,a):this.isQuanX()?$prefs.setValueForKey(b,a):this.isNode()?(this.data=this.loaddata(),this.data[a]=b,this.writedata(),!0):this.data&&this.data[a]||null}send(b,a,f=()=>{}){if("get"!=b&&"post"!=b&&"put"!=b&&"delete"!=b){console.log(`无效的http方法:${b}`);return}if("get"==b&&a.headers?(delete a.headers["Content-Type"],delete a.headers["Content-Length"]):a.body&&a.headers&&(a.headers["Content-Type"]||(a.headers["Content-Type"]="application/x-www-form-urlencoded")),this.isSurge()||this.isLoon()){this.isSurge()&&this.isNeedRewrite&&(a.headers=a.headers||{},Object.assign(a.headers,{"X-Surge-Skip-Scripting":!1}));let c={method:b,url:a.url,headers:a.headers,timeout:a.timeout,data:a.body};"get"==b&&delete c.data,$axios(c).then(a=>{let{status:b,request:c,headers:d,data:e}=a;f(null,c,{statusCode:b,headers:d,body:e})}).catch(a=>console.log(a))}else if(this.isQuanX())a.method=b.toUpperCase(),this.isNeedRewrite&&(a.opts=a.opts||{},Object.assign(a.opts,{hints:!1})),$task.fetch(a).then(a=>{let{statusCode:b,request:c,headers:d,body:e}=a;f(null,c,{statusCode:b,headers:d,body:e})},a=>f(a));else if(this.isNode()){this.got=this.got?this.got:require("got");let{url:d,...e}=a;this.instance=this.got.extend({followRedirect:!1}),this.instance[b](d,e).then(a=>{let{statusCode:b,request:c,headers:d,body:e}=a;f(null,c,{statusCode:b,headers:d,body:e})},b=>{let{message:c,response:a}=b;f(c,a,a&&a.body)})}}time(a){let b={"M+":(new Date).getMonth()+1,"d+":(new Date).getDate(),"h+":(new Date).getHours(),"m+":(new Date).getMinutes(),"s+":(new Date).getSeconds(),"q+":Math.floor(((new Date).getMonth()+3)/3),S:(new Date).getMilliseconds()};for(let c in/(y+)/.test(a)&&(a=a.replace(RegExp.$1,((new Date).getFullYear()+"").substr(4-RegExp.$1.length))),b)new RegExp("("+c+")").test(a)&&(a=a.replace(RegExp.$1,1==RegExp.$1.length?b[c]:("00"+b[c]).substr((""+b[c]).length)));return a}async showmsg(){if(!this.notifyStr)return;let a=this.name+" \u8FD0\u884C\u901A\u77E5\n\n"+this.notifyStr;if($.isNode()){var b=require("./sendNotify");console.log("\n============== \u63A8\u9001 =============="),await b.sendNotify(this.name,a)}else this.msg(a)}logAndNotify(a){console.log(a),this.notifyStr+=a,this.notifyStr+="\n"}msg(d=t,a="",b="",e){let f=a=>{if(!a)return a;if("string"==typeof a)return this.isLoon()?a:this.isQuanX()?{"open-url":a}:this.isSurge()?{url:a}:void 0;if("object"==typeof a){if(this.isLoon()){let b=a.openUrl||a.url||a["open-url"],c=a.mediaUrl||a["media-url"];return{openUrl:b,mediaUrl:c}}if(this.isQuanX()){let d=a["open-url"]||a.url||a.openUrl,e=a["media-url"]||a.mediaUrl;return{"open-url":d,"media-url":e}}if(this.isSurge())return{url:a.url||a.openUrl||a["open-url"]}}};this.isMute||(this.isSurge()||this.isLoon()?$notification.post(d,a,b,f(e)):this.isQuanX()&&$notify(d,a,b,f(e)));let c=["","============== \u7CFB\u7EDF\u901A\u77E5 =============="];c.push(d),a&&c.push(a),b&&c.push(b),console.log(c.join("\n"))}getMin(a,b){return aa.length?b-a.length:0,c="";for(let d=0;dsetTimeout(b,a))}done(a={}){let b=(new Date).getTime(),c=(b-this.startTime)/1e3;console.log(`
237 | ${this.name} 运行结束,共运行了 ${c} 秒!`),(this.isSurge()||this.isQuanX()||this.isLoon())&&$done(a)}}(a,b)}
238 |
--------------------------------------------------------------------------------
/TieBa.js:
--------------------------------------------------------------------------------
1 | /*
2 | 百度贴吧签到脚本
3 |
4 | 脚本修改自: https://github.com/sazs34/TaskConfig
5 | 兼容: QuantumultX, Surge4, Loon
6 |
7 | 获取Cookie说明:
8 | 打开百度贴吧App后(AppStore中国区, 非内部版),点击"我的", 如通知成功获取cookie, 则可以使用此签到脚本.
9 | 获取Cookie后, 请将Cookie脚本禁用并移除主机名,以免产生不必要的MITM.
10 | 脚本将在每天上午9:00执行, 您可以修改执行时间。
11 |
12 | ************************
13 | Surge 4.2.0+ 脚本配置:
14 | ************************
15 |
16 | [Script]
17 | 贴吧签到 = type=cron,cronexp=0 9 * * *,script-path=https://raw.githubusercontent.com/NobyDa/Script/master/BDTieBa-DailyBonus/TieBa.js
18 |
19 | 贴吧获取Cookie = type=http-request,pattern=https?:\/\/(c\.tieba\.baidu\.com|180\.97\.\d+\.\d+)\/c\/s\/login,script-path=https://raw.githubusercontent.com/NobyDa/Script/master/BDTieBa-DailyBonus/TieBa.js
20 |
21 | [MITM]
22 | hostname= c.tieba.baidu.com
23 |
24 | ************************
25 | QuantumultX 本地脚本配置:
26 | ************************
27 |
28 | [task_local]
29 | # 贴吧签到
30 | 0 9 * * * TieBa.js
31 |
32 | [rewrite_local]
33 | # 获取Cookie
34 | https?:\/\/(c\.tieba\.baidu\.com|180\.97\.\d+\.\d+)\/c\/s\/login url script-request-header TieBa.js
35 |
36 | [mitm]
37 | hostname= c.tieba.baidu.com
38 |
39 | ************************
40 | Loon 2.1.0+ 脚本配置:
41 | ************************
42 |
43 | [Script]
44 | # 贴吧签到
45 | cron "0 9 * * *" script-path=https://raw.githubusercontent.com/NobyDa/Script/master/BDTieBa-DailyBonus/TieBa.js
46 |
47 | # 获取Cookie
48 | http-request https?:\/\/(c\.tieba\.baidu\.com|180\.97\.\d+\.\d+)\/c\/s\/login script-path=https://raw.githubusercontent.com/NobyDa/Script/master/BDTieBa-DailyBonus/TieBa.js
49 |
50 | [Mitm]
51 | hostname= c.tieba.baidu.com
52 |
53 |
54 | */
55 | var $nobyda = nobyda();
56 | var cookieVal = $nobyda.read("CookieTB");
57 | var useParallel = 0; //0自动切换,1串行,2并行(当贴吧数量大于30个以后,并行可能会导致QX崩溃,所以您可以自动切换)
58 | var singleNotifyCount = 20; //想签到几个汇总到一个通知里,这里就填几个(比如我有13个要签到的,这里填了5,就会分三次消息通知过去)
59 | var process = {
60 | total: 0,
61 | result: [
62 | // {
63 | // bar:'',
64 | // level:0,
65 | // exp:0,
66 | // errorCode:0,
67 | // errorMsg:''
68 | // }
69 | ]
70 | };
71 | var url_fetch_sign = {
72 | url: "https://tieba.baidu.com/mo/q/newmoindex",
73 | headers: {
74 | "Content-Type": "application/octet-stream",
75 | Referer: "https://tieba.baidu.com/index/tbwise/forum",
76 | Cookie: cookieVal,
77 | "User-Agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 12_0 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/16A366"
78 | }
79 | };
80 | var url_fetch_add = {
81 | url: "https://tieba.baidu.com/sign/add",
82 | method: "POST",
83 | headers: {
84 | "Content-Type": "application/x-www-form-urlencoded",
85 | Cookie: cookieVal,
86 | "User-Agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 10_1_1 like Mac OS X; zh-CN) AppleWebKit/537.51.1 (KHTML, like Gecko) Mobile/14B100 UCBrowser/10.7.5.650 Mobile"
87 | },
88 | body: ""
89 | };
90 | if ($nobyda.isRequest) {
91 | GetCookie()
92 | } else {
93 | signTieBa()
94 | }
95 |
96 |
97 | function signTieBa() {
98 | useParallel = $nobyda.read("BDTB_DailyBonus_Mode") || useParallel
99 | singleNotifyCount = $nobyda.read("BDTB_DailyBonus_notify") || singleNotifyCount
100 | if (!cookieVal) {
101 | $nobyda.notify("贴吧签到", "签到失败", "未获取到cookie");
102 | return $nobyda.done()
103 | }
104 | $nobyda.get(url_fetch_sign, function(error, response, data) {
105 | if (error) {
106 | $nobyda.notify("贴吧签到", "签到失败", "未获取到签到列表");
107 | $nobyda.done()
108 | } else {
109 | // $nobyda.notify("贴吧签到", "贴吧列表", response.body);
110 | var body = JSON.parse(data);
111 | var isSuccessResponse = body && body.no == 0 && body.error == "success" && body.data.tbs;
112 | if (!isSuccessResponse) {
113 | $nobyda.notify("贴吧签到", "签到失败", (body && body.error) ? body.error : "接口数据获取失败");
114 | return $nobyda.done()
115 | }
116 | process.total = body.data.like_forum.length;
117 | if (body.data.like_forum && body.data.like_forum.length > 0) {
118 | if (useParallel == 1 || (useParallel == 0 && body.data.like_forum.length >= 30)) {
119 | signBars(body.data.like_forum, body.data.tbs, 0);
120 | } else {
121 | for (const bar of body.data.like_forum) {
122 | signBar(bar, body.data.tbs);
123 | }
124 | }
125 | } else {
126 | $nobyda.notify("贴吧签到", "签到失败", "请确认您有关注的贴吧");
127 | return $nobyda.done()
128 | }
129 | }
130 | })
131 | }
132 |
133 | function signBar(bar, tbs) {
134 | if (bar.is_sign == 1) { //已签到的,直接不请求接口了
135 | process.result.push({
136 | bar: `${bar.forum_name}`,
137 | level: bar.user_level,
138 | exp: bar.user_exp,
139 | errorCode: 9999,
140 | errorMsg: "已签到"
141 | });
142 | checkIsAllProcessed();
143 | } else {
144 | url_fetch_add.body = `tbs=${tbs}&kw=${bar.forum_name}&ie=utf-8`;
145 | $nobyda.post(url_fetch_add, function(error, response, data) {
146 | if (error) {
147 | process.result.push({
148 | bar: bar.forum_name,
149 | errorCode: 999,
150 | errorMsg: '接口错误'
151 | });
152 | checkIsAllProcessed();
153 | } else {
154 | try {
155 | var addResult = JSON.parse(data);
156 | if (addResult.no == 0) {
157 | process.result.push({
158 | bar: bar.forum_name,
159 | errorCode: 0,
160 | errorMsg: `获得${addResult.data.uinfo.cont_sign_num}积分,第${addResult.data.uinfo.user_sign_rank}个签到`
161 | });
162 | } else {
163 | process.result.push({
164 | bar: bar.forum_name,
165 | errorCode: addResult.no,
166 | errorMsg: addResult.error
167 | });
168 | }
169 | } catch (e) {
170 | $nobyda.notify("贴吧签到", "贴吧签到数据处理异常", JSON.stringify(e));
171 | $nobyda.done()
172 | }
173 | checkIsAllProcessed();
174 | }
175 | })
176 | }
177 | }
178 |
179 | function signBars(bars, tbs, index) {
180 | //$nobyda.notify("贴吧签到", `进度${index}/${bars.length}`, "");
181 | if (index >= bars.length) {
182 | //$nobyda.notify("贴吧签到", "签到已满", `${process.result.length}`);
183 | checkIsAllProcessed();
184 | } else {
185 | var bar = bars[index];
186 | if (bar.is_sign == 1) { //已签到的,直接不请求接口了
187 | process.result.push({
188 | bar: `${bar.forum_name}`,
189 | level: bar.user_level,
190 | exp: bar.user_exp,
191 | errorCode: 9999,
192 | errorMsg: "已签到"
193 | });
194 | signBars(bars, tbs, ++index);
195 | } else {
196 | url_fetch_add.body = `tbs=${tbs}&kw=${bar.forum_name}&ie=utf-8`;
197 | $nobyda.post(url_fetch_add, function(error, response, data) {
198 | if (error) {
199 | process.result.push({
200 | bar: bar.forum_name,
201 | errorCode: 999,
202 | errorMsg: '接口错误'
203 | });
204 | signBars(bars, tbs, ++index);
205 | } else {
206 | try {
207 | var addResult = JSON.parse(data);
208 | if (addResult.no == 0) {
209 | process.result.push({
210 | bar: bar.forum_name,
211 | errorCode: 0,
212 | errorMsg: `获得${addResult.data.uinfo.cont_sign_num}积分,第${addResult.data.uinfo.user_sign_rank}个签到`
213 | });
214 | } else {
215 | process.result.push({
216 | bar: bar.forum_name,
217 | errorCode: addResult.no,
218 | errorMsg: addResult.error
219 | });
220 | }
221 | } catch (e) {
222 | $nobyda.notify("贴吧签到", "贴吧签到数据处理异常", JSON.stringify(e));
223 | $nobyda.done()
224 | }
225 | signBars(bars, tbs, ++index)
226 | }
227 | })
228 | }
229 | }
230 | }
231 |
232 | function checkIsAllProcessed() {
233 | //$nobyda.notify("贴吧签到", `最终进度${process.result.length}/${process.total}`, "");
234 | if (process.result.length != process.total) return;
235 | for (var i = 0; i < Math.ceil(process.total / singleNotifyCount); i++) {
236 | var notify = "";
237 | var spliceArr = process.result.splice(0, singleNotifyCount);
238 | var notifySuccessCount = 0;
239 | for (const res of spliceArr) {
240 | if (res.errorCode == 0 || res.errorCode == 9999) {
241 | notifySuccessCount++;
242 | }
243 | if (res.errorCode == 9999) {
244 | notify += `【${res.bar}】已经签到,当前等级${res.level},经验${res.exp}
245 | `;
246 | } else {
247 | notify += `【${res.bar}】${res.errorCode==0?'签到成功':'签到失败'},${res.errorCode==0?res.errorMsg:('原因:'+res.errorMsg)}
248 | `;
249 | }
250 | }
251 | $nobyda.notify("贴吧签到", `签到${spliceArr.length}个,成功${notifySuccessCount}个`, notify);
252 | $nobyda.done()
253 | }
254 | }
255 |
256 | function GetCookie() {
257 | var headerCookie = $request.headers["Cookie"];
258 | if (headerCookie) {
259 | if ($nobyda.read("CookieTB") != undefined) {
260 | if ($nobyda.read("CookieTB") != headerCookie) {
261 | if (headerCookie.indexOf("BDUSS") != -1) {
262 | var cookie = $nobyda.write(headerCookie, "CookieTB");
263 | if (!cookie) {
264 | $nobyda.notify("更新贴吧Cookie失败‼️", "", "");
265 | } else {
266 | $nobyda.notify("更新贴吧Cookie成功 🎉", "", "");
267 | }
268 | }
269 | }
270 | } else {
271 | if (headerCookie.indexOf("BDUSS") != -1) {
272 | var cookie = $nobyda.write(headerCookie, "CookieTB");
273 | if (!cookie) {
274 | $nobyda.notify("首次写入贴吧Cookie失败‼️", "", "");
275 | } else {
276 | $nobyda.notify("首次写入贴吧Cookie成功 🎉", "", "");
277 | }
278 | }
279 | }
280 | }
281 | $nobyda.done()
282 | }
283 |
284 | function nobyda() {
285 | const isRequest = typeof $request != "undefined"
286 | const isSurge = typeof $httpClient != "undefined"
287 | const isQuanX = typeof $task != "undefined"
288 | const notify = (title, subtitle, message) => {
289 | if (isQuanX) $notify(title, subtitle, message)
290 | if (isSurge) $notification.post(title, subtitle, message)
291 | }
292 | const write = (value, key) => {
293 | if (isQuanX) return $prefs.setValueForKey(value, key)
294 | if (isSurge) return $persistentStore.write(value, key)
295 | }
296 | const read = (key) => {
297 | if (isQuanX) return $prefs.valueForKey(key)
298 | if (isSurge) return $persistentStore.read(key)
299 | }
300 | const adapterStatus = (response) => {
301 | if (response) {
302 | if (response.status) {
303 | response["statusCode"] = response.status
304 | } else if (response.statusCode) {
305 | response["status"] = response.statusCode
306 | }
307 | }
308 | return response
309 | }
310 | const get = (options, callback) => {
311 | if (isQuanX) {
312 | if (typeof options == "string") options = {
313 | url: options
314 | }
315 | options["method"] = "GET"
316 | $task.fetch(options).then(response => {
317 | callback(null, adapterStatus(response), response.body)
318 | }, reason => callback(reason.error, null, null))
319 | }
320 | if (isSurge) $httpClient.get(options, (error, response, body) => {
321 | callback(error, adapterStatus(response), body)
322 | })
323 | }
324 | const post = (options, callback) => {
325 | if (isQuanX) {
326 | if (typeof options == "string") options = {
327 | url: options
328 | }
329 | options["method"] = "POST"
330 | $task.fetch(options).then(response => {
331 | callback(null, adapterStatus(response), response.body)
332 | }, reason => callback(reason.error, null, null))
333 | }
334 | if (isSurge) {
335 | $httpClient.post(options, (error, response, body) => {
336 | callback(error, adapterStatus(response), body)
337 | })
338 | }
339 | }
340 | const done = (value = {}) => {
341 | if (isQuanX) return $done(value)
342 | if (isSurge) isRequest ? $done(value) : $done()
343 | }
344 | return {
345 | isRequest,
346 | notify,
347 | write,
348 | read,
349 | get,
350 | post,
351 | done
352 | }
353 | };
--------------------------------------------------------------------------------
/dy安卓.py:
--------------------------------------------------------------------------------
1 | """
2 | 安卓正常跑,苹果自己找原版
3 | 改自by Pearson大佬,修复安卓
4 | 开宝箱,宝箱广告,视频广告,走路
5 | 6.2
6 | url是链接?后面的
7 | 变量名(dyjsb) url#cookie#x-argus#x-ladon
8 | 多账号@
9 | ua换成自己的
10 | """
11 | ua = ""
12 |
13 | import os
14 | from urllib.parse import unquote
15 | import time
16 | import random
17 | import base64
18 | import requests
19 | import json
20 | import threading
21 |
22 | cookies = os.getenv("dyjsb")
23 |
24 |
25 | class DY:
26 | def __init__(self, cookie):
27 | self.url = cookie.split("#")[0]
28 | self.cookie = cookie.split("#")[1]
29 | self.argus = cookie.split("#")[2]
30 | self.ladon = cookie.split("#")[3]
31 | self.nickname = self.get_nickname()
32 |
33 | def run(self):
34 | self.get_info()
35 | self.sign_in()
36 | time.sleep(1.5)
37 | self.read()
38 | time.sleep(1.5)
39 | self.open_box()
40 | print(f"•••准备看广告,假装看15s•••")
41 | time.sleep(random.randint(20, 30))
42 | self.box_ad()
43 | self.detail_info()
44 | time.sleep(random.randint(20, 30))
45 | self.detail_ad()
46 | step = self.get_step()
47 | time.sleep(0.5)
48 | self.read()
49 | time.sleep(1.5)
50 | self.upload_step(step)
51 | self.step_reward()
52 |
53 | def sign_in(self):
54 | try:
55 | url = f"https://api5-normal-c-lf.amemv.com/luckycat/aweme/v1/task/done/sign_in?{self.url}"
56 | headers = {
57 | 'Host': 'api5-normal-c-lf.amemv.com',
58 | 'Connection': 'keep-alive',
59 | 'Content-Length': '22',
60 | 'Accept': 'application/json',
61 | 'Cookie': self.cookie,
62 | 'User-Agent': ua,
63 | 'passport-sdk-version': '5.12.1',
64 | 'X-Argus': self.argus,
65 | 'X-Ladon': self.ladon,
66 | 'Content-Type': 'text/plain'}
67 | payload = base64.b64decode("ewogICJpbl9zcF90aW1lIiA6IDAKfQ==")
68 | response = requests.request("POST", url=url, headers=headers, data=payload)
69 | print(f"[{self.nickname}]签到成功,获取金币{response.json().get('data').get('amount')}")
70 | except:
71 | print("签到失败,可能今日已签到")
72 | def get_info(self):
73 | url = f"https://api5-normal-c-lf.amemv.com/luckycat/aweme/v1/task/page?{self.url}"
74 | headers = {'Host': 'api5-normal-c-lq.amemv.com',
75 | 'Accept': 'application/json',
76 | 'Cookie': self.cookie,
77 | 'User-Agent': ua}
78 | response = requests.request("GET", url=url, headers=headers)
79 | if response.json().get("data").get("is_login"):
80 | print(f"[{self.nickname}]登录成功\n"
81 | f"[{self.nickname}]今日金币{response.json().get('data').get('income_data').get('amount1')}")
82 |
83 | def get_nickname(self):
84 | now = str(time.time()).replace(".", "")[:10]
85 | url = f"https://api5-core-c-lf.amemv.com/aweme/v1/user/profile/self/?{self.url}"
86 | headers = {'Host': 'api5-normal-c-lq.amemv.com',
87 | 'Content-Type': 'application/json; encoding=utf-8',
88 | 'Accept': 'application/json',
89 | 'tt-request-time': now,
90 | 'X-Argus': self.argus,
91 | 'X-Ladon': self.ladon,
92 | 'Cookie': self.cookie,
93 | 'User-Agent': ua}
94 | payload = None
95 | try:
96 | response = requests.request("GET", url=url, headers=headers, data=payload)
97 | i = 1
98 | for cookie in cookies:
99 | nickname = f"账号{i}"
100 | # nickname = response.json().get("user").get("nickname")
101 | return nickname
102 | except:
103 | print("获取用户名失败")
104 |
105 | def read(self):
106 | url = f"https://api5-normal-c-lf.amemv.com/luckycat/aweme/v1/task/done/read?{self.url}"
107 | headers = {
108 | 'Host': 'api5-normal-c-lf.amemv.com',
109 | 'Connection': 'keep-alive',
110 | 'Content-Length': '22',
111 | 'Accept': 'application/json',
112 | 'Cookie': self.cookie,
113 | 'User-Agent': ua,
114 | 'passport-sdk-version': '5.12.1',
115 | 'X-Argus': self.argus,
116 | 'X-Ladon': self.ladon,
117 | 'Content-Type': 'text/plain'}
118 | payload = base64.b64decode("ewogICJpbl9zcF90aW1lIiA6IDAsCiAgInRhc2tfa2V5IiA6ICJyZWFkIgp9")
119 | response = requests.request("POST", url=url, headers=headers, data=payload)
120 | if response.json().get("err_tips") == "成功":
121 | print(f"[{self.nickname}]刷视频奖励--{response.json().get('data').get('score_amount')}")
122 |
123 |
124 |
125 | def open_box(self):
126 | url = f"https://api5-normal-c-lf.amemv.com/luckycat/aweme/v1/task/done/treasure_task?{self.url}"
127 | headers = {
128 | 'Host': 'api5-normal-c-lf.amemv.com',
129 | 'Connection': 'keep-alive',
130 | 'Content-Length': '22',
131 | 'Accept': 'application/json',
132 | 'Cookie': self.cookie,
133 | 'User-Agent': ua,
134 | 'passport-sdk-version': '5.12.1',
135 | 'X-Argus': self.argus,
136 | 'X-Ladon': self.ladon,
137 | 'Content-Type': 'text/plain'}
138 | payload = base64.b64decode("ewogICJpbl9zcF90aW1lIiA6IDAKfQ==")
139 | response = requests.request("POST", url=url, headers=headers, data=payload)
140 | if response.json().get("err_tips") == "成功":
141 | print(f"[{self.nickname}]开宝箱奖励金币--{response.json().get('data').get('amount')}")
142 | elif response.json().get("err_no") == 10006:
143 | print(response.json().get("err_tips"))
144 | else:
145 | print("开宝箱"+response.text)########
146 |
147 | def box_ad(self):
148 | url = f"https://api5-normal-c-lf.amemv.com/luckycat/aweme/v1/task/done/excitation_ad_treasure_box?{self.url}"
149 | headers = {
150 | 'Host': 'api5-normal-c-lf.amemv.com',
151 | 'Connection': 'keep-alive',
152 | 'Accept': 'application/json',
153 | 'Cookie': self.cookie,
154 | 'User-Agent': ua,
155 | 'X-Argus': self.argus,
156 | 'X-Ladon': self.ladon}
157 | response = requests.request("POST", url=url, headers=headers)
158 | if response.json().get("err_tips") == "成功":
159 | print(f"[{self.nickname}]看宝箱广告--{response.json().get('data').get('amount')}")
160 | elif response.json().get("err_no") == 10006:
161 | print(response.json().get("err_tips"))
162 | else:
163 | print("宝箱广告"+response.text)#########
164 |
165 | def detail_info(self):
166 | now = str(time.time()).replace(".", "")[:13]
167 | url = f"https://api5-normal-c-lf.amemv.com/luckycat/aweme/v1/task/sign_in/detail?{self.url}"
168 | headers = {'Host': 'api5-normal-c-lq.amemv.com',
169 | 'Content-Type': 'application/json; encoding=utf-8',
170 | 'Accept': 'application/json',
171 | 'tt-request-time': now,
172 | 'X-Argus': self.argus,
173 | 'X-Ladon': self.ladon,
174 | 'Cookie': self.cookie,
175 | 'User-Agent': ua}
176 | response = requests.request("GET", url=url, headers=headers)
177 | score_amount = response.json().get("data").get("calendar_reminder_button").get("score_amount")
178 | if response.json().get("err_tips") == "成功":
179 | print(f"[{self.nickname}]获取广告视频成功,预计获得{score_amount},假装看15秒")
180 |
181 | else:
182 | print("获取广告视频"+response.text)
183 | def detail_ad(self):
184 | now = str(time.time()).replace(".", "")[:13]
185 | url = f"https://api3-normal-c.amemv.com/luckycat/aweme/v1/task/done/excitation_ad?{self.url}"
186 | headers = {
187 | 'Host': 'api3-normal-c-lf.amemv.com',
188 | 'Connection': 'keep-alive',
189 | 'Accept': 'application/json',
190 | 'Cookie': self.cookie,
191 | 'User-Agent': ua,
192 | 'passport-sdk-version': '203100',
193 | 'X-Argus': self.argus,
194 | 'X-Ladon': self.ladon}
195 | response = requests.request("POST", url=url, headers=headers)
196 | if response.json().get("err_tips") == "成功":
197 | print(f"[{self.nickname}]看视频奖励金币成功--{response.json().get('data').get('amount')}")
198 | else:
199 | print("看视频奖励"+response.text)
200 |
201 | def get_step(self):
202 | now = str(time.time()).replace(".", "")[:13]
203 | url = f"https://api5-normal-c-lf.amemv.com/luckycat/aweme/v1/task/walk/page?{self.url}"
204 | headers = {
205 | 'Host': 'api5-normal-c-lf.amemv.com',
206 | 'Connection': 'keep-alive',
207 | 'Accept': 'application/json',
208 | 'Cookie': self.cookie,
209 | 'User-Agent': ua,
210 | 'passport-sdk-version': '5.12.1',
211 | 'X-Argus': self.argus,
212 | 'X-Ladon': self.ladon}
213 | response = requests.request("GET", url=url, headers=headers)
214 | if response.json().get("err_tips") == "成功":
215 | step = response.json().get("data").get("continue_walk_list")[0].get("step")
216 | print(f"[{self.nickname}]当前步数{step}")
217 | return step
218 | else:
219 | print("走路出错")
220 |
221 | def upload_step(self, steps):
222 | now = str(time.time()).replace(".", "")[:10]
223 | url = f"https://api5-normal-c-lf.amemv.com/luckycat/aweme/v1/task/walk/step_submit?{self.url}"
224 | headers = {
225 | 'Host': 'api5-normal-c-lf.amemv.com',
226 | 'Connection': 'keep-alive',
227 | 'Accept': 'application/json',
228 | 'Cookie': self.cookie,
229 | 'User-Agent': ua,
230 | 'passport-sdk-version': '5.12.1',
231 | 'X-Argus': self.argus,
232 | 'X-Ladon': self.ladon}
233 | step = random.randint(steps, steps+1200)
234 | payload = {"step": step,
235 | "submit_time": int(now),
236 | "in_sp_time": 0}
237 | payload = json.dumps(payload)
238 | response = requests.request("POST", url=url, headers=headers, data=payload)
239 | if response.json().get("err_tips") == "成功":
240 | print(f"[{self.nickname}]上传步数成功,当前步数--{response.json().get('data').get('today_step')}")
241 |
242 | def step_reward(self):
243 | now = str(time.time()).replace(".", "")[:13]
244 | url = f"https://api5-normal-c-lf.amemv.com/luckycat/aweme/v1/task/walk/receive_step_reward?{self.url}"
245 | headers = {
246 | 'Host': 'api5-normal-c-lf.amemv.com',
247 | 'Connection': 'keep-alive',
248 | 'Accept': 'application/json',
249 | 'Cookie': self.cookie,
250 | 'User-Agent': ua,
251 | 'passport-sdk-version': '5.12.1',
252 | 'X-Argus': self.argus,
253 | 'X-Ladon': self.ladon}
254 | payload = base64.b64decode("ewogICJpbl9zcF90aW1lIiA6IDAKfQ==")
255 | response = requests.request("POST", url=url, headers=headers, data=payload)
256 | if response.json().get("err_tips") == "成功":
257 | print(f"[{self.nickname}]领取步数奖励成功--{response.json().get('data').get('reward_amount')}")
258 | elif response.json().get("err_no") == 10009:
259 | print(response.json().get("err_tips"))
260 | else:
261 | print(response.text)
262 |
263 |
264 |
265 | if __name__ == "__main__":
266 | cookies = cookies.split("@")
267 | print(f"抖音极速版共获取到{len(cookies)}个账号,偷撸冲")
268 | print("\n"+unquote('%40%E4%B8%8D%E6%89%8D%E4%BF%AE%E5%A4%8D%EF%BC%8C%E5%AE%89%E5%8D%93%E6%AD%A3%E5%B8%B8','utf-8'))
269 | i = 1
270 | for cookie in cookies:
271 | print(f"\n---开始第{i}个账号---")
272 | i += 1
273 | DY(cookie).run()
274 | print("\n随机等待30s进行下一个账号")
275 | time.sleep(random.randint(30,60))
276 |
--------------------------------------------------------------------------------
/raw_main_dftt.js:
--------------------------------------------------------------------------------
1 | /*
2 | 邀请码: 003584319
3 | 感谢填写! 感谢填写!! 感谢填写!!!
4 | 1.15 完成签到,感谢群里大佬指导
5 | 1.18 更新签到 可能需要重新抓包
6 | 平台: 青龙
7 | 软件: 东方头条
8 | 收益: 10000金币=1元
9 | [Script]
10 | cron "8 8 * * *" https://raw.githubusercontent.com/yml2213/javascript/master/dftt/dfttqd.js,tag=东方头条签到
11 |
12 | 注意事项 : 一定要仔细阅读一下内容
13 | =============青龙变量格式=============
14 | export dfttua=''
15 | export dfttqdbd='params=XXXXX'
16 |
17 | =============青龙变量实例=============
18 | export dfttua='Mozilla/5.0 (iPhone; CPU iPhone OS 12_4_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148'
19 | export dfttqdbd='params=H0QHGzkHERoCAFZeRCAbKicMAh1HWEYWGwc2BwwMHEdORoPFxbvL+UFeRxUHBR0QfUldW0VRRlVRQUJzUQwQBQwSDUROVigaAwpQSVYHDwANfUlHhcfrkenxkczdUUlBAwwQRlxWNS8DNhcdFxFWVERFbkdHT1AEFQ0CVk59HRAPHkdYRgkHVmVRDAwBR1hGFRsSKx0EDhdHTkYiMiALOiowUElWCBJWTn0+CTkCARkUExAaEQUwUxUcEAk8Hi0lMTcuNQkzNlQALj40Lw0jMBMdKDAubyYhOSIrIxRTLiw0AQEwSy8WICA4FzUxUTknXDorMD0OPR0JEyAyDFYwDU1qPVYlKDYhCBcmMAU2AQ0aEhEIKw0iCTFWABgzQDZWLiEMQRENJS0ENwUfMjQiVARHBkcuLiBEagooJAIcFywOGhAzMTI0Jy8jKSMyOwVCPyogDhdZRFhWKwcEABEMEEZcTExoR1dSRVBCSEQbETJRX0E2IyAwRFhWKRYXQUhHRkpQWkF9X0cMEwwQRlxWGiofCUFeRxkLBB0YOlFfQRwQGAhEWFYvGwoNFwsBCUROVjEGCQ9QSVYLFSsCOgEWCh0LVl5EHTsMU1RWXFdWSEQdGTpRX0EzUDUgUkc2bV5XJkchWVAjRjZyMVFXS0hBJiJDTBw3XFpLIUVGSlYVMRcXDBsBPQBETlZvQ1VTQlVEVEtERG9DSFNCVURJVkREb15VU0JVRFRWRERvQ1VBXkcXFQ8QVmVRJBMCNgALFBFWc1EBBgQMFwE5FgY+HQFBSEcaEQoYVnNRAQYEDBcBRE5WNiMNDBwARVBKRlYi'
20 | =============变量解释==========
21 | dfttua:UA 这个不需要解释了吧
22 | dfttqdbd:变量中的xxxx是你的body包数据,,可以从 关键词 new_user_sign 包里找到所有变量
23 |
24 | =============变量获取==========
25 | 懒得写了,自己研究吧
26 | 不会的请百度或者群里求助:QQ群:1001401060 tg:https://t.me/yml_tg
27 |
28 | */
29 |
30 | const $ = new Env('东方头条签到');
31 | const host = 'sign.dftoutiao.com';
32 | const notify = $.isNode() ? require('./sendNotify') : '';
33 | let dfttua = process.env.dfttua;
34 | let body = process.env.dfttqdbd;
35 |
36 | //开始运行
37 | !(async () => {
38 | console.log(`交流群:1001401060 by-yml`);
39 | await yml()
40 |
41 | })()
42 | .catch((e) => $.logErr(e))
43 | .finally(() => $.done())
44 |
45 |
46 | // https://sign2.dftoutiao.com/sign/signv4/new_user_sign
47 | //这里是要执行的代码 ====== 如果有您不需要的 请自行注释 使用 // 注释就行 ========
48 | async function yml() {
49 | await wyy();
50 | await qd();
51 |
52 | //每日网抑云
53 | function wyy(timeout = 3*1000) {
54 | return new Promise((resolve) => {
55 | let url = {
56 | url: `https://keai.icu/apiwyy/api`
57 | }
58 | $.get(url, async (err, resp, data) => {
59 | try {
60 | data = JSON.parse(data)
61 | $.log(`\n【网抑云时间】: ${data.content} by--${data.music}`);
62 |
63 | } catch (e) {
64 | $.logErr(e, resp);
65 | } finally {
66 | resolve()
67 | }
68 | }, timeout)
69 | })
70 | }
71 |
72 |
73 | // https://sign.dftoutiao.com/sign/news_take_s
74 | // https://sign2.dftoutiao.com/sign/signv4/new_user_sign
75 | // 签到任务
76 | function qd(timeout = 0) {
77 | return new Promise((resolve) => {
78 | let url = {
79 | url: `https://${host}/sign/news_take_s`,
80 | headers: {
81 | 'User-Agent': dfttua,
82 | },
83 | body: body
84 | }
85 | // console.log(url);
86 |
87 | $.post(url, async (err, resp, data) => {
88 | try {
89 |
90 | // console.log(`输出data开始===================`);
91 | // console.log(data);
92 | // console.log(`输出data结束===================`);
93 |
94 | result = JSON.parse(data);
95 | if (result.status == true) {
96 | $.log(`\n【🎉🎉🎉 恭喜您鸭 🎉🎉🎉】执行签到: 成功 ✅ 了呢 , 获得积分${result.bonus}`)
97 | await $.wait(3 * 1000)
98 | } else {
99 | $.log(`\n【🎉 恭喜个屁 🎉】执行签到:失败 ❌ 了呢,原因未知!`)
100 | }
101 | } catch (e) {
102 | $.logErr(e, resp);
103 | } finally {
104 | resolve()
105 | }
106 | }, timeout)
107 |
108 | })
109 |
110 | }
111 | }
112 |
113 |
114 |
115 |
116 | //固定板块,无需动
117 | function Env(t, e) { class s { constructor(t) { this.env = t } send(t, e = "GET") { t = "string" == typeof t ? { url: t } : t; let s = this.get; return "POST" === e && (s = this.post), new Promise((e, i) => { s.call(this, t, (t, s, r) => { t ? i(t) : e(s) }) }) } get(t) { return this.send.call(this.env, t) } post(t) { return this.send.call(this.env, t, "POST") } } return new class { constructor(t, e) { this.name = t, this.http = new s(this), this.data = null, this.dataFile = "box.dat", this.logs = [], this.isMute = !1, this.isNeedRewrite = !1, this.logSeparator = "\n", this.encoding = "utf-8", this.startTime = (new Date).getTime(), Object.assign(this, e), this.log("", `\ud83d\udd14${this.name}, \u5f00\u59cb!`) } isNode() { return "undefined" != typeof module && !!module.exports } isQuanX() { return "undefined" != typeof $task } isSurge() { return "undefined" != typeof $httpClient && "undefined" == typeof $loon } isLoon() { return "undefined" != typeof $loon } isShadowrocket() { return "undefined" != typeof $rocket } toObj(t, e = null) { try { return JSON.parse(t) } catch { return e } } toStr(t, e = null) { try { return JSON.stringify(t) } catch { return e } } getjson(t, e) { let s = e; const i = this.getdata(t); if (i) try { s = JSON.parse(this.getdata(t)) } catch { } return s } setjson(t, e) { try { return this.setdata(JSON.stringify(t), e) } catch { return !1 } } getScript(t) { return new Promise(e => { this.get({ url: t }, (t, s, i) => e(i)) }) } runScript(t, e) { return new Promise(s => { let i = this.getdata("@chavy_boxjs_userCfgs.httpapi"); i = i ? i.replace(/\n/g, "").trim() : i; let r = this.getdata("@chavy_boxjs_userCfgs.httpapi_timeout"); r = r ? 1 * r : 20, r = e && e.timeout ? e.timeout : r; const [o, h] = i.split("@"), n = { url: `http://${h}/v1/scripting/evaluate`, body: { script_text: t, mock_type: "cron", timeout: r }, headers: { "X-Key": o, Accept: "*/*" } }; this.post(n, (t, e, i) => s(i)) }).catch(t => this.logErr(t)) } loaddata() { if (!this.isNode()) return {}; { this.fs = this.fs ? this.fs : require("fs"), this.path = this.path ? this.path : require("path"); const t = this.path.resolve(this.dataFile), e = this.path.resolve(process.cwd(), this.dataFile), s = this.fs.existsSync(t), i = !s && this.fs.existsSync(e); if (!s && !i) return {}; { const i = s ? t : e; try { return JSON.parse(this.fs.readFileSync(i)) } catch (t) { return {} } } } } writedata() { if (this.isNode()) { this.fs = this.fs ? this.fs : require("fs"), this.path = this.path ? this.path : require("path"); const t = this.path.resolve(this.dataFile), e = this.path.resolve(process.cwd(), this.dataFile), s = this.fs.existsSync(t), i = !s && this.fs.existsSync(e), r = JSON.stringify(this.data); s ? this.fs.writeFileSync(t, r) : i ? this.fs.writeFileSync(e, r) : this.fs.writeFileSync(t, r) } } lodash_get(t, e, s) { const i = e.replace(/\[(\d+)\]/g, ".$1").split("."); let r = t; for (const t of i) if (r = Object(r)[t], void 0 === r) return s; return r } lodash_set(t, e, s) { return Object(t) !== t ? t : (Array.isArray(e) || (e = e.toString().match(/[^.[\]]+/g) || []), e.slice(0, -1).reduce((t, s, i) => Object(t[s]) === t[s] ? t[s] : t[s] = Math.abs(e[i + 1]) >> 0 == +e[i + 1] ? [] : {}, t)[e[e.length - 1]] = s, t) } getdata(t) { let e = this.getval(t); if (/^@/.test(t)) { const [, s, i] = /^@(.*?)\.(.*?)$/.exec(t), r = s ? this.getval(s) : ""; if (r) try { const t = JSON.parse(r); e = t ? this.lodash_get(t, i, "") : e } catch (t) { e = "" } } return e } setdata(t, e) { let s = !1; if (/^@/.test(e)) { const [, i, r] = /^@(.*?)\.(.*?)$/.exec(e), o = this.getval(i), h = i ? "null" === o ? null : o || "{}" : "{}"; try { const e = JSON.parse(h); this.lodash_set(e, r, t), s = this.setval(JSON.stringify(e), i) } catch (e) { const o = {}; this.lodash_set(o, r, t), s = this.setval(JSON.stringify(o), i) } } else s = this.setval(t, e); return s } getval(t) { return this.isSurge() || this.isLoon() ? $persistentStore.read(t) : this.isQuanX() ? $prefs.valueForKey(t) : this.isNode() ? (this.data = this.loaddata(), this.data[t]) : this.data && this.data[t] || null } setval(t, e) { return this.isSurge() || this.isLoon() ? $persistentStore.write(t, e) : this.isQuanX() ? $prefs.setValueForKey(t, e) : this.isNode() ? (this.data = this.loaddata(), this.data[e] = t, this.writedata(), !0) : this.data && this.data[e] || null } initGotEnv(t) { this.got = this.got ? this.got : require("got"), this.cktough = this.cktough ? this.cktough : require("tough-cookie"), this.ckjar = this.ckjar ? this.ckjar : new this.cktough.CookieJar, t && (t.headers = t.headers ? t.headers : {}, void 0 === t.headers.Cookie && void 0 === t.cookieJar && (t.cookieJar = this.ckjar)) } get(t, e = (() => { })) { if (t.headers && (delete t.headers["Content-Type"], delete t.headers["Content-Length"]), this.isSurge() || this.isLoon()) this.isSurge() && this.isNeedRewrite && (t.headers = t.headers || {}, Object.assign(t.headers, { "X-Surge-Skip-Scripting": !1 })), $httpClient.get(t, (t, s, i) => { !t && s && (s.body = i, s.statusCode = s.status), e(t, s, i) }); else if (this.isQuanX()) this.isNeedRewrite && (t.opts = t.opts || {}, Object.assign(t.opts, { hints: !1 })), $task.fetch(t).then(t => { const { statusCode: s, statusCode: i, headers: r, body: o } = t; e(null, { status: s, statusCode: i, headers: r, body: o }, o) }, t => e(t)); else if (this.isNode()) { let s = require("iconv-lite"); this.initGotEnv(t), this.got(t).on("redirect", (t, e) => { try { if (t.headers["set-cookie"]) { const s = t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString(); s && this.ckjar.setCookieSync(s, null), e.cookieJar = this.ckjar } } catch (t) { this.logErr(t) } }).then(t => { const { statusCode: i, statusCode: r, headers: o, rawBody: h } = t; e(null, { status: i, statusCode: r, headers: o, rawBody: h }, s.decode(h, this.encoding)) }, t => { const { message: i, response: r } = t; e(i, r, r && s.decode(r.rawBody, this.encoding)) }) } } post(t, e = (() => { })) { const s = t.method ? t.method.toLocaleLowerCase() : "post"; if (t.body && t.headers && !t.headers["Content-Type"] && (t.headers["Content-Type"] = "application/x-www-form-urlencoded"), t.headers && delete t.headers["Content-Length"], this.isSurge() || this.isLoon()) this.isSurge() && this.isNeedRewrite && (t.headers = t.headers || {}, Object.assign(t.headers, { "X-Surge-Skip-Scripting": !1 })), $httpClient[s](t, (t, s, i) => { !t && s && (s.body = i, s.statusCode = s.status), e(t, s, i) }); else if (this.isQuanX()) t.method = s, this.isNeedRewrite && (t.opts = t.opts || {}, Object.assign(t.opts, { hints: !1 })), $task.fetch(t).then(t => { const { statusCode: s, statusCode: i, headers: r, body: o } = t; e(null, { status: s, statusCode: i, headers: r, body: o }, o) }, t => e(t)); else if (this.isNode()) { let i = require("iconv-lite"); this.initGotEnv(t); const { url: r, ...o } = t; this.got[s](r, o).then(t => { const { statusCode: s, statusCode: r, headers: o, rawBody: h } = t; e(null, { status: s, statusCode: r, headers: o, rawBody: h }, i.decode(h, this.encoding)) }, t => { const { message: s, response: r } = t; e(s, r, r && i.decode(r.rawBody, this.encoding)) }) } } time(t, e = null) { const s = e ? new Date(e) : new Date; let i = { "M+": s.getMonth() + 1, "d+": s.getDate(), "H+": s.getHours(), "m+": s.getMinutes(), "s+": s.getSeconds(), "q+": Math.floor((s.getMonth() + 3) / 3), S: s.getMilliseconds() }; /(y+)/.test(t) && (t = t.replace(RegExp.$1, (s.getFullYear() + "").substr(4 - RegExp.$1.length))); for (let e in i) new RegExp("(" + e + ")").test(t) && (t = t.replace(RegExp.$1, 1 == RegExp.$1.length ? i[e] : ("00" + i[e]).substr(("" + i[e]).length))); return t } msg(e = t, s = "", i = "", r) { const o = t => { if (!t) return t; if ("string" == typeof t) return this.isLoon() ? t : this.isQuanX() ? { "open-url": t } : this.isSurge() ? { url: t } : void 0; if ("object" == typeof t) { if (this.isLoon()) { let e = t.openUrl || t.url || t["open-url"], s = t.mediaUrl || t["media-url"]; return { openUrl: e, mediaUrl: s } } if (this.isQuanX()) { let e = t["open-url"] || t.url || t.openUrl, s = t["media-url"] || t.mediaUrl; return { "open-url": e, "media-url": s } } if (this.isSurge()) { let e = t.url || t.openUrl || t["open-url"]; return { url: e } } } }; if (this.isMute || (this.isSurge() || this.isLoon() ? $notification.post(e, s, i, o(r)) : this.isQuanX() && $notify(e, s, i, o(r))), !this.isMuteLog) { let t = ["", "==============\ud83d\udce3\u7cfb\u7edf\u901a\u77e5\ud83d\udce3=============="]; t.push(e), s && t.push(s), i && t.push(i), console.log(t.join("\n")), this.logs = this.logs.concat(t) } } log(...t) { t.length > 0 && (this.logs = [...this.logs, ...t]), console.log(t.join(this.logSeparator)) } logErr(t, e) { const s = !this.isSurge() && !this.isQuanX() && !this.isLoon(); s ? this.log("", `\u2757\ufe0f${this.name}, \u9519\u8bef!`, t.stack) : this.log("", `\u2757\ufe0f${this.name}, \u9519\u8bef!`, t) } wait(t) { return new Promise(e => setTimeout(e, t)) } done(t = {}) { const e = (new Date).getTime(), s = (e - this.startTime) / 1e3; this.log("", `\ud83d\udd14${this.name}, \u7ed3\u675f! \ud83d\udd5b ${s} \u79d2`), this.log(), (this.isSurge() || this.isQuanX() || this.isLoon()) && $done(t) } }(t, e) }
--------------------------------------------------------------------------------
/mtml.py:
--------------------------------------------------------------------------------
1 | import json
2 | import os
3 | from sendNotify import gg
4 | from urllib.parse import quote,unquote
5 | import requests,time,datetime
6 | #需要库里的依赖sendNotify.py自己在频道或者库下载
7 |
8 | #美团米粒签到和三餐,变量mttoken=xxxx,不要token=,多号&分割
9 |
10 | token0 = os.getenv("mttoken")
11 | token1 = token0.split('&')
12 | sjtime = str(round(time.time()*1000))
13 |
14 | print(gg())
15 | for b in range (len (token1 )):#line:6
16 | token =token1 [b ]#line:7
17 | url0 ="https://wx.waimai.meituan.com/mtandroid_wmgroup/v1/wlwc/signintask/signin?ui=2425758028®ion_id=1000431100®ion_version=1685183676441"#line:9
18 | url1 ="https://wx.waimai.meituan.com/mtandroid_wmgroup/v1/wlwc/dinnersignin/sign?ui=2425758028®ion_id=1000431100®ion_version=1685241430077"#line:11
19 | data0 ='wm_dtype=V2055A&wm_dversion=6.6.3&wm_dplatform=android&wm_uuid=0000000000000435E7EBB5B5D4E35A28BDB8DB9E7A9C3A167570057842939010&wm_visitid=2b2d2d50-9f50-41f6-a266-479c613e0e8b&wm_appversion=9.22.3&wm_logintoken='+token +'&userToken='+token +'&req_time='+sjtime +'&waimai_sign=%2F&userid=2425758028&user_id=2425758028&lch=1001&sessionId=RYY9AA&province=%E9%95%BF%E6%B2%99&nickName=%E9%BB%91%E6%9A%97%E9%9D%A2182&gender=0&country=%E4%B8%AD%E5%9B%BD&city=%E9%95%BF%E6%B2%99&vatarUrl=https%3A%2F%2Fimg.meituan.net%2Favatar%2Fddcd13692022b8d5e31020988b38299514234.jpg&optimusCode=20&riskLevel=71&partner=4&platform=13&uuid=0000000000000435E7EBB5B5D4E35A28BDB8DB9E7A9C3A167570057842939010&open_id=2425758028&rc_app=4&rc_platform=13&host_version=12.9.404&fpApp=0&fpPlatform=4&host_ctype=mtandroid&wm_uuid_source=client&sdkVersion=2.2.3&wxPrint=WX__ver1.2.0_CCCC_fcD9ZMAVg%2BgPZVbBxMC2CpiSZxaxYmT4tj6qknbdw4a%2BOpidKPfLRpF0qAe8i9yvXkU8gn7BKE71hesT9yiZYt2Sw6oDX4h6MHclI4m98EFgVoPB%2BF8uBAv0mUTxxo6JAsk6IWxvjQuPW8Rx2ZpHFP70bqscIa%2BMtLiyke8zmmpya%2BWPE1JcwTHSEERgMBpyc3jhwywHfd1WBVrOfo4JATqzzZs16Yg%2F6H%2BYLAEghjqjFXhR9Rs19A%2FhnN3FLVyk09MVMKY2CpQrVUlrg5tnVKRxfU19XZZxWtctX7v8wEOV8IrANE7TXlAdc%2BZIlVHuf3gkSgAL0zyvG%2Bvhk%2BUKqN6OjjPcYDqs%2Feikl7r%2F%2FQ1YW2enoHD%2FaRMXCF%2FQUuxcbYsxZqosFbVUnoKxPI7POO4NwJ7Jv%2B0hB5%2Bz2oVbsBAut2g86nnkMbPsZEkzjmrQJB%2BB7r8N6rvxij8ygXaOWc1g2HQlfIQYRlcYhfkoqknFM8cCDTO4pAsyrr11zPYiJXGKNZOixnWx9IQf6rQsIu%2BIFr9nBHQuRNuFJPtKBelPd8Ad9m%2B4bdhtkuElZ6cwNud%2BfeP8Y4OItb7MBTNVUNNI3ERx8fCEO%2FoKJe%2BDXDEMasvLkOdwohapA9LW%2FaUgBICbf9FcrfAaj5hiGMmmyiBYBk7CAXfwrg0RHalLgY9lUY2l6mMWjIajBeacjBvmh1UbZpl4yY8Pn7agDqV2rI4cX4a4i2gGJ0A0pb%2BNT%2FDdZKd8IR6jbe2io6oRtHbC2z%2FMdPJ8Nu%2F%2FPXQj0vQ7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s9YFejZux7g8PstPjqOzIRdlsNiDENYoBG8pO7f3WfEE6Ljf7ArAfdpda4Uku1cxXyVUXGR0D32RDG44gKPlxy5NUG166MUB%2BhoZhOhfvvELS%2BGEo4CWadpMarPweFLwberD4gPgGa95SbV2yE%2F6vETUzxbq5K7HNFRMKefvXHLFAdHEaay4ZdbTXfk4U7TZwPQWQi7RhWGFBGrtFBNaPxMPu6kKGQ7uMawsVP334zuT7DoGXXpDhGH6QRDgCwwszadCn%2BCweNq%2BJCYuAPaNfVKj6ZRydLzE1kJgM6rgfjCp5qQyiOGEWg9NmdZ6ozBPiEvVkADEDqVp0hKIb7PpA%2F4Aamt8C2ecSBve4IFSJCp6uUrELc0MA%2FJt2b2oWd86gXkKfW9Qdip3rqpR%2BT4LWVcdG8b2zrr6xExlOa%2BZPohNTSnr%2BO%2Fwt%2FIzxosKpQyVm%2Fp%2BnM5p2Xz4HZ%2FjO9YfWdV%2F01%2Bz5QlLQB%2FqH3A1llJ9TruaXsqTMtO%2BeVoawJ84Qmz5LHGFLxlCf%2BMSKBAlsgzY2Mn4qMuS8jLgFUpzWlhpuLB%2F0hi8s1D%2FNzZ5rI0fDMNetQ9d5yQm1FSGWUyObIRERsjTnz48VaYqhAwMOEMzyuy564l4eMM%2BneIk%2FmgTQg0eahsjI6FFq9i%2FLSUujjR2M49qZ8qovPV6u4d0h9Xw1Yyloel1&wxNickName=%E9%BB%91%E6%9A%97%E9%9D%A2182&wxAvatar=https%3A%2F%2Fimg.meituan.net%2Favatar%2Fddcd13692022b8d5e31020988b38299514234.jpg&city_id_level2=430100&city_id_level3=430102&actual_city_id_level2=430100&actual_city_id_level3=430102&rank_list_id=134b18045ae336624b867a9c3a167570&wm_ctype=mtandroid_wmgroup'#line:14
20 | data1 ="wm_dtype=V2055A&wm_dversion=6.6.3&wm_dplatform=android&wm_uuid=0000000000000435E7EBB5B5D4E35A28BDB8DB9E7A9C3A167570057842939010&wm_visitid=d42cb97f-ed43-4263-a713-6b07cb99fa34&wm_appversion=9.22.3&wm_logintoken="+token +"&userToken="+token +"&req_time="+sjtime +"&waimai_sign=%2F&userid=2425758028&user_id=2425758028&lch=1001&sessionId=ALXSYU&province=%E9%95%BF%E6%B2%99&nickName=%E9%BB%91%E6%9A%97%E9%9D%A2182&gender=0&country=%E4%B8%AD%E5%9B%BD&city=%E9%95%BF%E6%B2%99&vatarUrl=https%3A%2F%2Fimg.meituan.net%2Favatar%2Fddcd13692022b8d5e31020988b38299514234.jpg&optimusCode=20&riskLevel=71&partner=4&platform=13&uuid=0000000000000435E7EBB5B5D4E35A28BDB8DB9E7A9C3A167570057842939010&open_id=2425758028&rc_app=4&rc_platform=13&host_version=12.9.404&fpApp=0&fpPlatform=4&host_ctype=mtandroid&wm_uuid_source=client&sdkVersion=2.2.3&wxPrint=WX__ver1.2.0_CCCC_fcD9ZMAVg%2BgPZVbBxMC2CpiSZxaxYmT4tj6qknbdw4a%2BOpidKPfLRpF0qAe8i9yvXkU8gn7BKE71hesT9yiZYt2Sw6oDX4h6MHclI4m98EFgVoPB%2BF8uBAv0mUTxxo6JlzI6T1yGK7385OCFqHZDnZeYZC5pk7L6nyhLtG1HXsteavM9qrKI%2BxU3kBiYvvb%2BsOlxG4EaO2xaMnl2LK93PEvQhtaAPVmK%2F2PPqyhr1UAm9Lhm6esPolCikBga%2FCZ%2Fw%2F3aqsZ7L9x%2B%2F020POVcgkR6sPO0iMpNPegvZMAgyAB7EUCCDNnlD7iWxfkBgJGO%2BTt9KQBNDtMkp7vhz2fJjDcT5h42IbFBbBCXhFb8Pj5JH9GATByFy9CGC97V3gslMy7XPBVF16F%2Fpk2xBZHjXu5Q2a%2BJo23yJ%2B36Nt4%2FeHNvsTehcIr%2Frme1VJQqyhPVmSFRZXbsyuoxwSq0MdCljJE785XAbtu9GYZwePeUvl14qger6QdWBCGb06hX1OvoCqYtAG4TlYwX%2B9Li5eRMjp4c5RJzWnEUBEoUWc4N9v95kCWSvj256PLOwri7GqUy3TcEAp4z7dwBKJs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=430102&actual_city_id_level2=430100&actual_city_id_level3=430102&rank_list_id=134b1801f53bd469e3f04435e7ebb5b5&wm_ctype=mtandroid_wmgroup"#line:15
21 | headers0 ={'Host':'wx.waimai.meituan.com','Connection':'keep-alive','Content-Length':'5192','content-type':'application/x-www-form-urlencoded','R2X-Referer':'https://servicewechat.com/wx2c348cf579062e56/0/page-frame.html','retrofit_exec_time':sjtime ,'User-Agent':'Mozilla/5.0 (Linux; Android 13; V2055A Build/TP1A.220624.014; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/101.0.4951.74 Mobile Safari/537.36 MicroMessenger/6.5.7 miniprogram MMP/1.24.0.4.335 group/12.9.404','uuid':'0000000000000435E7EBB5B5D4E35A28BDB8DB9E7A9C3A167570057842939010','wm-ctype':'wxapp','Accept-Encoding':'gzip, deflate',}#line:29
22 | headers1 ={'Host':'wx.waimai.meituan.com','Connection':'keep-alive','Content-Length':'5204','content-type':'application/x-www-form-urlencoded','R2X-Referer':'https://servicewechat.com/wx2c348cf579062e56/0/page-frame.html','retrofit_exec_time':sjtime ,'User-Agent':'Mozilla/5.0 (Linux; Android 13; V2055A Build/TP1A.220624.014; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/101.0.4951.74 Mobile Safari/537.36 MicroMessenger/6.5.7 miniprogram MMP/1.24.0.4.335 group/12.9.404','uuid':'0000000000000435E7EBB5B5D4E35A28BDB8DB9E7A9C3A167570057842939010','wm-ctype':'wxapp','Accept-Encoding':'gzip, deflate',}#line:42
23 | print ("不才提醒您----------"+"账号"+str (b +1 )+"美团米粒中心执行----------\n")#line:46
24 | res0 =requests .request ("POST",url0 ,headers =headers0 ,data =data0 )#line:47
25 | qddata =json .loads (res0 .text )#line:48
26 | qddata1 =qddata .get ("code")#line:49
27 | qddata2 =qddata .get ("msg")#line:50
28 | if qddata1 ==0 and qddata2 =='成功':#line:51
29 | print ("开始签到:"+qddata2 )#line:52
30 | elif qddata1 ==1 :#line:53
31 | print ("开始签到:"+qddata2 )#line:54
32 | else :#line:55
33 | print (res0 .text )#line:56
34 | continue #line:57
35 | res1 =requests .request ("POST",url1 ,headers =headers1 ,data =data1 )#line:59
36 | scdata =json .loads (res1 .text )#line:60
37 | scdata1 =scdata .get ("code")#line:61
38 | scdata2 =scdata .get ("data")#line:62
39 | scdata5 =scdata .get ("msg")#line:63
40 | if scdata1 ==0 and scdata5 =="成功":#line:64
41 | if 7 <=datetime .datetime .now ().hour <=9 :#line:65
42 | sctime ="早餐米粒"#line:66
43 | elif 10 <=datetime .datetime .now ().hour <=14 :#line:67
44 | sctime ="午餐米粒"#line:68
45 | elif 16 <=datetime .datetime .now ().hour <=21 :#line:69
46 | sctime ="晚餐米粒"#line:70
47 | scdata3 =scdata2 .get ("get_points")#line:71
48 | print (sctime ,"领取:"+str (scdata3 ))#line:72
49 | elif scdata1 ==5 :#line:73
50 | if 7 <=datetime .datetime .now ().hour <=9 :#line:74
51 | sctime ="早餐米粒"#line:75
52 | elif 10 <=datetime .datetime .now ().hour <=14 :#line:76
53 | sctime ="午餐米粒"#line:77
54 | elif 16 <=datetime .datetime .now ().hour <=21 :#line:78
55 | sctime ="晚餐米粒"#line:79
56 | scdata4 =scdata .get ("msg")#line:80
57 | print (sctime ,scdata4 )#line:81
58 | else :#line:82
59 | print (res1 .text )
60 | continue
61 |
--------------------------------------------------------------------------------