├── .gitignore
├── README.md
├── invalid
├── .DS_Store
├── bsly
│ └── bsly.js
├── cdlm
│ └── cdlm.js
├── cyh
│ ├── cyh.jpg
│ └── cyh.js
├── dftt
│ ├── dfttbox.js
│ ├── dfttdt.js
│ ├── dfttdzp.js
│ ├── dfttksp.js
│ ├── dfttqd.js
│ ├── dfttsdjl.js
│ ├── dfttwz.js
│ └── 东方头条.jpg
├── dygy
│ ├── dygy.jpg
│ └── dygy.js
├── ffqc
│ └── ffqc.js
├── fksj
│ ├── fksj.jpg
│ └── fksj.js
├── gjjjhyjlb
│ └── gjjjhyjlb.js
├── gqcq.png
├── gqcq
│ └── gqcq.js
├── hfhx
│ └── hfhx.js
├── jfjlb
│ └── jfjlb.js
├── jieda
│ ├── jieda.js
│ └── thank.jpg
├── jrttjsb
│ └── jrttjsb.js
├── jzkg
│ ├── jzkg.jpg
│ └── jzkg.js
├── ks
│ └── 2.16.3
│ │ ├── 11.js
│ │ ├── kuaishou_dt_sig4_v1.jsc
│ │ └── kuaishou_dt_sign_v2.jsc
├── ksf
│ ├── ksf.jpg
│ └── ksf.js
├── ksjsb
│ └── ksjsb.js
├── lbxhy
│ └── lbxhy.js
├── ldz
│ └── ldz.js
├── lmz
│ └── lmz.js
├── lvmiao
│ ├── lvmiao.js
│ └── 感谢您的支持.jpg
├── mtyd
│ └── mtyd.js
├── qckf
│ └── qckf.js
├── sbr
│ └── sbr.js
├── shgjgf
│ ├── shgjgf.jpg
│ └── shgjgf.js
├── sxtc
│ └── sxtc.js
├── sytt
│ └── sytt.js
├── tlm
│ ├── tlm.js
│ └── 感谢支持.jpg
├── tpyqc
│ └── tpyqc.js
├── tpyqcmax
│ └── tpyqcmax.js
├── tzh
│ └── tzh.js
├── wxwp
│ └── wxwp.js
├── wyyx_app
│ └── wyyx_app.js
├── xlh
│ ├── xlh.jpg
│ └── xlh.js
├── xmly
│ └── xmly.js
├── xtwly
│ ├── xtwly.jpg
│ └── xtwly.js
├── xyytp
│ └── xyytp.js
├── yctt
│ └── yctt.js
├── ydcd
│ └── ydcd.js
├── yml
│ └── tipe.txt
├── ynhb
│ ├── ynhb.jpg
│ └── ynhb.js
├── yxd
│ └── yxd.js
├── yzjb
│ └── yzjb.js
├── zcy
│ ├── zcy.js
│ └── zcyqd.js
├── zhwl
│ └── zhwl.js
└── zzjk
│ └── zzjk.js
├── jdd
├── jdd.txt
└── jdd_tg.js
├── mcyp
├── 1.txt
└── mcyp_tg.js
└── piccnc
└── piccnc_tg.js
/.gitignore:
--------------------------------------------------------------------------------
1 | .DS_Store
2 | invalid/.DS_Store
3 | .idea
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 |
2 |
自用js学习脚本 如有帮助到你 点个★吧
3 |
4 |

5 |

6 |

7 |
8 |
9 |
10 | 
11 |
12 | ### yml's Scripts
13 |
14 | - 这里的脚本只是自己学习 js 的一个实践
15 | - 仅用于测试和学习研究,禁止用于商业用途,不能保证其合法性,准确性,完整性和有效性,请根据情况自行判断.
16 | - 仓库内所有资源文件,禁止任何公众号、自媒体进行任何形式的转载、发布。
17 | - `yml` 对任何脚本问题概不负责,包括但不限于由任何脚本错误导致的任何损失或损害.
18 | - 间接使用脚本的任何用户,包括但不限于建立 VPS 或在某些行为违反国家/地区法律或相关法规的情况下进行传播, `yml` 对于由此引起的任何隐私泄漏或其他后果概不负责.
19 | - 如果任何单位或个人认为该项目的脚本可能涉嫌侵犯其权利,则应及时通知并提供身份证明,所有权证明,我们将在收到认证文件后删除相关脚本.
20 | - 任何以任何方式查看此项目的人或直接或间接使用该 Script 项目的任何脚本的使用者都应仔细阅读此声明。 `yml` 保留随时更改或补充此免责声明的权利。一旦使用并复制了任何相关脚本或 Script 项目的规则,则视为您已接受此免责声明.
21 | - 您必须在下载后的 24 小时内从计算机或手机中完全删除以上内容.
22 |
23 | * [x] 青龙拉库
24 |
25 |
26 | ```
27 | https://github.com/yml2213/javascript.git
28 | ```
29 | 黑名单: `invalid`
30 | 黑名单: `invalid`
31 | 黑名单: `invalid`
32 | 定时: 随你 追更可以 *
33 |
34 |
35 | - [x] 脚本排错
36 |
37 | ```
38 | 1.脚本报错 no module named '***' 就是缺少青龙依赖 去青龙面板依赖管理里面右上角新建依赖 选python 添加对应的缺少的依赖就好了
39 | 2.其他报错基本就是cookie或者帐号设置问题
40 | 不懂代码的别改脚本 拉库后再青龙的配置文件config.sh里面设置变量export ****=**** 后直接运行脚本就行 一般变量是啥脚本里面都有标注
41 | ```
42 |
43 | ### 交流
44 |
45 | 电报频道
46 | 交流群 [](https://t.me/yml2213_club)
47 |
48 | ### 赞赏码 ☕️
49 |
50 | 
51 |
52 | ### Star History
53 |
54 | [](https://starchart.cc/yml2213/javascript)
55 |
--------------------------------------------------------------------------------
/invalid/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yml2213/javascript/183efd8c40788eaeb8b404a7810cc04fa0ee4423/invalid/.DS_Store
--------------------------------------------------------------------------------
/invalid/cyh/cyh.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yml2213/javascript/183efd8c40788eaeb8b404a7810cc04fa0ee4423/invalid/cyh/cyh.jpg
--------------------------------------------------------------------------------
/invalid/dftt/dfttbox.js:
--------------------------------------------------------------------------------
1 | /*
2 | 邀请码: 003584319
3 | 感谢填写! 感谢填写!! 感谢填写!!!
4 | 1.15 日常活动-开宝箱
5 | 平台: 青龙
6 | 软件: 东方头条
7 | 收益: 10000金币=1元
8 | [Script]
9 | cron "30 6-22/2 * * *" https://raw.githubusercontent.com/yml2213/javascript/master/dftt/dfttbox.js,tag=东方头条开宝箱
10 |
11 | 注意事项 : 一定要仔细阅读一下内容
12 | =============青龙变量格式=============
13 | export dfttua=''
14 | export dfttboxbd='params=XXXXX'
15 |
16 | =============青龙变量实例=============
17 | 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'
18 | export dfttboxbd='params=H0QHGzkHERoCAFZeRCAbKicMAh1HWEYWGwc2BwwMHEdORoPFxbvL+UFeRxUHBR0QfUldW0VRRlVRQUJzUQwQBQwSDUROVigaAwpQSVYHDwANfUlHhcfrkenxkczdUUlBAwwQRlxWNS8DNhcdFxFWVERFbkdHT1AKB0ZcVh0wAEdPUBYbAhIaFTIWR1lQITIwMj07DFFJQQYcBAFETlZuUUlBHhFWXkQRPBUhLlNLFCMyID07GAdWMCUdHjciPQ4+CS80JzAAHigxMi0nDjU4NEQIPiUsDQEHCEsfLjNTDiJvPSM2HwpHAQwxDQ0fCRU+VhwmBB8cMCpWJQIGLD4KOh4FQCg7KCIXDwJBEG0DNi02Lyw+CjYiCB4GWiI0SVlEWFYrBwQAEQwQRlxMTGhHV1JFUEJIRBsRMlFfQTYjIDBEWFYpFhdBSEdGSlBaQX1fRw4dBx0IA1ZOfUJWVEdRQlFWTERrUUlBAg0bCgMaATJRX0FDVkNRUkJBb0tVV1BJVgsVKwI6ARYKHQtWXkQdOwxTVFZcV1ZIRB0ZOlFfQTNQNSBSRzZtXlcmRyFZUCNGNnIxUVdLSEEmIkNMHDdcWkshRUZKVhUxFxcMGwE9AEROVm9DVVNCVURUS0REb0NIU0JVRElWRERvXlVTQlVEVFZERG9DVUFeRxcVDxBWZVEkEwI2AAsUEVZzUQEGBAwXATkWBj4dAUFIRxoRChhWc1EBBgQMFwFETlY2Iw0MHABFUEpGViI='
19 | =============变量解释==========
20 | dfttua:UA 这个不需要解释了吧
21 | dfttboxbd:变量中的xxxx是你的body包数据,,可以搜索关键词 open_treasure_box 包里找到所有变量
22 |
23 | =============变量获取==========
24 | 懒得写了,自己研究吧
25 | 不会的请百度或者群里求助:QQ群:884234287 tg:科技玩家@我即可
26 |
27 | */
28 | // https://shoutu2.dftoutiao.com/invite/open_treasure_box
29 | const $ = new Env('东方头条开宝箱');
30 | const host = 'shoutu2.dftoutiao.com';
31 | const notify = $.isNode() ? require('./sendNotify') : '';
32 | let dfttua = process.env.dfttua;
33 | let body = process.env.dfttboxbd;
34 |
35 | //开始运行
36 | !(async () => {
37 | console.log(`交流群:884234287 by-yml`);
38 | await yml()
39 |
40 | })()
41 | .catch((e) => $.logErr(e))
42 | .finally(() => $.done())
43 |
44 | //这里是要执行的代码 ====== 如果有您不需要的 请自行注释 使用 // 注释就行 ========
45 | async function yml() {
46 | await wyy();
47 | await qd();
48 |
49 | //每日网抑云
50 | function wyy(timeout = 3 * 1000) {
51 | return new Promise((resolve) => {
52 | let url = {
53 | url: `https://keai.icu/apiwyy/api`
54 | }
55 | $.get(url, async (err, resp, data) => {
56 | try {
57 | data = JSON.parse(data)
58 | $.log(`\n【网抑云时间】: ${data.content} by--${data.music}`);
59 |
60 | } catch (e) {
61 | $.logErr(e, resp);
62 | } finally {
63 | resolve()
64 | }
65 | }, timeout)
66 | })
67 | }
68 |
69 | // https://shoutu2.dftoutiao.com/invite/open_treasure_box
70 | // 开宝箱任务
71 | function qd(timeout = 0) {
72 | return new Promise((resolve) => {
73 | let url = {
74 | url: `https://${host}/invite/open_treasure_box`,
75 | headers: {
76 | 'User-Agent': dfttua,
77 | },
78 | body: body
79 | }
80 | // console.log(url);
81 | $.post(url, async (err, resp, data) => {
82 | try {
83 |
84 | console.log(`输出data开始===================`);
85 | console.log(data);
86 | console.log(`输出data结束===================`);
87 |
88 | result = JSON.parse(data);
89 | if (result.code == 0) {
90 | $.log(`\n【🎉🎉🎉 恭喜您鸭 🎉🎉🎉】执行开宝箱:${result.message} ✅ 了呢 , 获得积分${result.data.bonus}`)
91 | // await $.wait(3 * 1000)
92 | } else {
93 | $.log(`\n【🎉 恭喜个屁 🎉】冷却中,开宝箱失败啦,两小时后再试!`)
94 | }
95 | } catch (e) {
96 | $.logErr(e, resp);
97 | } finally {
98 | resolve()
99 | }
100 | }, timeout)
101 |
102 | })
103 |
104 | }
105 | }
106 |
107 |
108 |
109 |
110 | //固定板块,无需动
111 | 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) }
--------------------------------------------------------------------------------
/invalid/dftt/dfttdt.js:
--------------------------------------------------------------------------------
1 | /*
2 | 邀请码: 003584319
3 | 感谢填写! 感谢填写!! 感谢填写!!!
4 | 1.17 答题,每天跑一次即可(测试中,不可用也别找我)
5 | 平台: 青龙
6 | 软件: 东方头条
7 | 收益: 10000金币=1元
8 | [Script]
9 | cron "18 8 * * *" https://raw.githubusercontent.com/yml2213/javascript/master/dftt/dfttdt.js,tag=东方头条答题
10 |
11 | 注意事项 : 一定要仔细阅读一下内容
12 | =============青龙变量格式=============
13 | export dfttua=''
14 | export dfttdtbd='params=XXXXX'
15 |
16 | =============青龙变量实例=============
17 | 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'
18 | export dfttqdbd='params=H0QHGzkHERoCAFZeRCAbKicMAh1HWEYWGwc2BwwMHEdORoPFxbvL+UFeRxUHBR0QfUldW0VRRlVRQUJzUQwQBQwSDUROVigaAwpQSVYHDwANfUlHhcfrkenxkczdUUlBAwwQRlxWNS8DNhcdFxFWVERFbkdHT1AEFQ0CVk59HRAPHkdYRgkHVmVRDAwBR1hGFRsSKx0EDhdHTkYiMiALOiowUElWCBJWTn0+CTkCARkUExAaEQUwUxUcEAk8Hi0lMTcuNQkzNlQALj40Lw0jMBMdKDAubyYhOSIrIxRTLiw0AQEwSy8WICA4FzUxUTknXDorMD0OPR0JEyAyDFYwDU1qPVYlKDYhCBcmMAU2AQ0aEhEIKw0iCTFWABgzQDZWLiEMQRENJS0ENwUfMjQiVARHBkcuLiBEagooJAIcFywOGhAzMTI0Jy8jKSMyOwVCPyogDhdZRFhWKwcEABEMEEZcTExoR1dSRVBCSEQbETJRX0E2IyAwRFhWKRYXQUhHRkpQWkF9X0cMEwwQRlxWGiofCUFeRxkLBB0YOlFfQRwQGAhEWFYvGwoNFwsBCUROVjEGCQ9QSVYLFSsCOgEWCh0LVl5EHTsMU1RWXFdWSEQdGTpRX0EzUDUgUkc2bV5XJkchWVAjRjZyMVFXS0hBJiJDTBw3XFpLIUVGSlYVMRcXDBsBPQBETlZvQ1VTQlVEVEtERG9DSFNCVURJVkREb15VU0JVRFRWRERvQ1VBXkcXFQ8QVmVRJBMCNgALFBFWc1EBBgQMFwE5FgY+HQFBSEcaEQoYVnNRAQYEDBcBRE5WNiMNDBwARVBKRlYi'
19 | =============变量解释==========
20 | dfttua:UA 这个不需要解释了吧
21 | dfttqdbd:变量中的xxxx是你的body包数据,,可以从 关键词 nswer_question_new 包里找到所有变量
22 |
23 | =============变量获取==========
24 | 懒得写了,自己研究吧
25 | 不会的请百度或者群里求助:QQ群:884234287 tg:科技玩家@我即可
26 |
27 | */
28 |
29 | const $ = new Env('东方头条答题');
30 | const host = 'answer-question.dftoutiao.com';
31 | const notify = $.isNode() ? require('./sendNotify') : '';
32 | let dfttua = process.env.dfttua;
33 | let dfttdtbd = process.env.dfttdtbd;
34 |
35 | //开始运行
36 | !(async () => {
37 | console.log(`答题测试中,不可用也别找我;交流群:884234287 by-yml`);
38 | await yml()
39 |
40 | })()
41 | .catch((e) => $.logErr(e))
42 | .finally(() => $.done())
43 |
44 | // https://answer-question.dftoutiao.com/cheese_superman/answer_question_new/add_user_bonus
45 | //这里是要执行的代码 ====== 如果有您不需要的 请自行注释 使用 // 注释就行 ========
46 | async function yml() {
47 | await wyy();
48 | await dt1();
49 | await dt2();
50 |
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://answer-question.dftoutiao.com/cheese_superman/answer_question_new/double_bouns
74 | // https://answer-question.dftoutiao.com/cheese_superman/answer_question_new/add_user_bonus
75 |
76 | // 答题闯关任务
77 | function dt1(timeout = 0) {
78 | return new Promise((resolve) => {
79 | let url = {
80 | url: `https://${host}/cheese_superman/answer_question_new/add_user_bonus`,
81 | headers: {
82 | 'User-Agent': dfttua,
83 | },
84 | body: dfttdtbd,
85 | }
86 | console.log(url);
87 |
88 | $.post(url, async (err, resp, data) => {
89 | try {
90 |
91 | console.log(`输出data开始===================`);
92 | console.log(data);
93 | console.log(`输出data结束===================`);
94 |
95 | result = JSON.parse(data);
96 | if (result.code == 0) {
97 | $.log(`\n【🎉🎉🎉 恭喜您鸭 🎉🎉🎉】执行答题闯关: 成功 ✅ 了呢 , 获得金币${result.data.bonus}\n已累计获得金币共计${result.data.current_bonus}枚!`)
98 | await $.wait(3 * 1000)
99 | await dt();
100 | } else {
101 | $.log(`\n【🎉 恭喜个屁 🎉】执行答题闯关:失败 ❌ 了呢,原因未知!`)
102 | }
103 | } catch (e) {
104 | $.logErr(e, resp);
105 | } finally {
106 | resolve()
107 | }
108 | }, timeout)
109 |
110 | })
111 |
112 | }
113 | }
114 | function dt2(timeout = 0) {
115 | return new Promise((resolve) => {
116 | let url = {
117 | url: `https://${host}/cheese_superman/answer_question_new/double_bouns`,
118 | headers: {
119 | 'User-Agent': dfttua,
120 | },
121 | body: dfttdtbd
122 | }
123 | console.log(url);
124 |
125 | $.post(url, async (err, resp, data) => {
126 | try {
127 |
128 | console.log(`输出data开始===================`);
129 | console.log(data);
130 | console.log(`输出data结束===================`);
131 |
132 | result = JSON.parse(data);
133 | if (result.code == 0) {
134 | $.log(`\n【🎉🎉🎉 恭喜您鸭 🎉🎉🎉】执行答题闯关翻倍奖励: 成功 ✅ 了呢 , 获得金币${result.data.bonus}\n已累计获得金币共计${result.data.current_bonus}枚!`)
135 | await $.wait(3 * 1000)
136 | await dt();
137 | } else {
138 | $.log(`\n【🎉 恭喜个屁 🎉】执行答题闯关翻倍奖励:失败 ❌ 了呢,原因未知!`)
139 | }
140 | } catch (e) {
141 | $.logErr(e, resp);
142 | } finally {
143 | resolve()
144 | }
145 | }, timeout)
146 |
147 | })
148 |
149 | }
150 |
151 |
152 |
153 |
154 |
155 |
156 | //固定板块,无需动
157 | 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) }
--------------------------------------------------------------------------------
/invalid/dftt/dfttdzp.js:
--------------------------------------------------------------------------------
1 | /*
2 | 邀请码: 003584319
3 | 感谢填写! 感谢填写!! 感谢填写!!!
4 | 1.15 完成大转盘(宝箱待测试,欢迎反馈)
5 | 平台: 青龙
6 | 软件: 东方头条
7 | 收益: 10000金币=1元
8 | [Script]
9 | cron "8 8,12,16,20,21 * * *" script-path=https://raw.githubusercontent.com/yml2213/javascript/master/dftt/dfttdzp.js,tag=东方头条大转盘
10 | 注意事项 : 一定要仔细阅读一下内容
11 | =============青龙变量格式=============
12 | export dfttua=''
13 | export dfttbxbd='params=XXXXX'
14 |
15 | =============青龙变量实例=============
16 | 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'
17 | export dfttbxbd='params=H0QHGzkHERoCAFZeRCAbKicMAh1HWEYWGwc2BwwMHEdORoPFxbvL+UFeRxUHBR0QfUldW0VRRlVRQUJzUQMRUF9WFhEODH1fRwoBEh0CD1ZOfQQMBRtHWEYFHQAmUV9BlND6gevjkefxR09QFB0ARE5WHgMVMAYKBgFURkRuQlFBXkcbF0ROVjYcFkFeRwcLAAAaPh4AQUhHMCIyID0QIEdPUAkARlxWERc5NyhCXAUzMDI9EDQRUCEyDA41MD0lEh8pJTAhEBw6MRkBMQgkLyVUCiwlByEXARlcDj4xQQ4JQyslJwgbVwMeMSYhCQ8EKUcMJBYfNxw8UDQVFzMKPzozJh82OisAMVcmOzwmM1cWMjIuBQ4QHBIIAEs1JVlbVlh9BxECEQYdAEROTGdEUVFDUkFSSlYbOh5HWVAhMjAyVlh9BQARUF9WVkhCWmpRSUEcEBlGXERYfR4KARsJEUZcVkVsRFBXRFBEXFZAVnNRFQsdCxEKExlWZVFUUEVQQFJTRExvR0dPUAoHOxARBiwaCg1QX1YNKSdUbkZLUVBJVg0LEVZlUSRWMyFAVyRGWW02UCdfUTFWJFk2a0dcTkcnMFNeNzBmSlwnQ0dYRgcaEC0cDAc7AVZeREREb0NVU0JVWVRWRERyQ1VTQkhEVFZEWW9DVVNCVURUVkREb1FJQREUHQBETlYeAxUwBgoGAURYVjsWEwoRACsGFBUaO1FfQRwQGAhEWFY7FhMKEQBWXkQdJDccCwZDUVhWRAk='
18 | =============变量解释==========
19 | dfttua:UA 这个不需要解释了吧
20 | dfttbxbd:变量中的xxxx是你大转盘的变量,可以从 关键词 get_zhuanpan_new 包里找到所有变量
21 |
22 | =============变量获取==========
23 | 懒得写了,自己研究吧
24 | 不会的请百度或者群里求助:QQ群:884234287 tg:科技玩家@我即可
25 |
26 | */
27 |
28 | const $ = new Env('东方头条大转盘');
29 | const host = 'zhuanpan.dftoutiao.com';
30 | const notify = $.isNode() ? require('./sendNotify') : '';
31 | let dfttua = process.env.dfttua;
32 | let body = process.env.dfttbxbd;
33 |
34 |
35 | //开始运行
36 | !(async () => {
37 | console.log(`交流群:884234287 by-yml`);
38 | await yml()
39 |
40 | })()
41 | .catch((e) => $.logErr(e))
42 | .finally(() => $.done())
43 |
44 |
45 | //这里是要执行的代码 ====== 如果有您不需要的 请自行注释 使用 // 注释就行 ========
46 | async function yml() {
47 | await wyy();
48 | await dzp();
49 | await dzpbx();
50 |
51 |
52 | }
53 |
54 | //每日网抑云
55 | function wyy(timeout = 3 * 1000) {
56 | return new Promise((resolve) => {
57 | let url = {
58 | url: `https://keai.icu/apiwyy/api`
59 | }
60 | $.get(url, async (err, resp, data) => {
61 | try {
62 | data = JSON.parse(data)
63 | $.log(`\n【网抑云时间】: ${data.content} by--${data.music}`);
64 |
65 | } catch (e) {
66 | $.logErr(e, resp);
67 | } finally {
68 | resolve()
69 | }
70 | }, timeout)
71 | })
72 | }
73 |
74 | // https://zhuanpan.dftoutiao.com/zhuanpan_v3/get_zhuanpan_new
75 | // 大转盘任务
76 | function dzp(timeout = 0) {
77 | return new Promise((resolve) => {
78 | let url = {
79 | url: `https://${host}/zhuanpan_v3/get_zhuanpan_new`,
80 | headers: {
81 | 'User-Agent': dfttua
82 | },
83 | body: body
84 |
85 | }
86 | // console.log(url);
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.code == 0) {
96 | $.log(`\n【🎉🎉🎉 恭喜您鸭 🎉🎉🎉】大转盘发动成功 ✅ 了呢, 获得金币${result.data.gold}`)
97 | await $.wait(2 * 1000)
98 | await dzp();
99 | } else {
100 | $.log(`\n【🎉 恭喜个屁 🎉】大转盘发动:失败 ❌ 了呢,可能是:${result.message}`)
101 | }
102 | } catch (e) {
103 | $.logErr(e, resp);
104 | } finally {
105 | resolve()
106 | }
107 | }, timeout)
108 |
109 | })
110 |
111 | }
112 | // https://zhuanpan.dftoutiao.com/zhuanpan_v3/get_chest
113 | // https://zhuanpan.dftoutiao.com/zhuanpan_v3/get_chest
114 | // 大转盘宝箱任务
115 | function dzpbx(timeout = 0) {
116 | return new Promise((resolve) => {
117 | let url = {
118 | url: `https://${host}/zhuanpan_v3/get_chest`,
119 | headers: {
120 | 'User-Agent': dfttua
121 | },
122 | body: body
123 |
124 | }
125 | // console.log(url);
126 | $.post(url, async (err, resp, data) => {
127 | try {
128 | // console.log(`输出data开始===================`);
129 | // console.log(data);
130 | // console.log(`输出data结束===================`);
131 | result = JSON.parse(data);
132 | if (result.code == 0) {
133 | $.log(`\n【🎉🎉🎉 恭喜您鸭 🎉🎉🎉】大转盘宝箱了领取成功 ✅了呢, 获得金币${result.data.gold}`)
134 | await $.wait(10 * 1000)
135 | await dzpbx();
136 | } else {
137 | $.log(`\n【🎉 恭喜个屁 🎉】大转盘宝箱领取:失败 ❌ 了呢,可能是:${result.message}`)
138 | }
139 | } catch (e) {
140 | $.logErr(e, resp);
141 | } finally {
142 | resolve()
143 | }
144 | }, timeout)
145 |
146 | })
147 |
148 | }
149 |
150 |
151 |
152 |
153 |
154 | //固定板块,无需动
155 | 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) }
--------------------------------------------------------------------------------
/invalid/dftt/dfttksp.js:
--------------------------------------------------------------------------------
1 | /*
2 | 邀请码: 003584319
3 | 感谢填写! 感谢填写!! 感谢填写!!!
4 | 1.17 首页看视频(每天一次) 测试中,不能用请反馈
5 | 平台: 青龙
6 | 软件: 东方头条
7 | 收益: 10000金币=1元
8 | [Script]
9 | cron "8 9 * * *" https://raw.githubusercontent.com/yml2213/javascript/master/dftt/dfttksp.js,tag=东方头条看视频
10 |
11 | 注意事项 : 一定要仔细阅读一下内容
12 | =============青龙变量格式=============
13 | export dfttua=''
14 | export dfttkspbd='id=3<=xxx'
15 |
16 | =============青龙变量实例=============
17 | export dfttua='DFTT/2.6.5 (iPhone; iOS 15.2; Scale/3.00)'
18 | export dfttkspbd='id=3<=eHJRK09qWVFIOGt3SWxjSDIzazJWUUtzNEFrTkVJQ0lXQXRrbk9zZW5zVnpaTWhHNXErMGp6VUVIYmZVVFAweEkxZDdaS1BybjlPcTV1ZHFGTkkwbWc9PQ=='
19 | =============变量解释==========
20 | dfttua:UA 这个不需要解释了吧
21 | dfttkspbd:变量中的xxxx是你的body包数据,可以从 关键词 send_gold/bonus 包里找到所有变量(lt=xxx,与时段奖励相同,抓一次即可)
22 |
23 | =============变量获取==========
24 | 懒得写了,自己研究吧
25 | 不会的请百度或者群里求助:QQ群:884234287 tg:科技玩家@我即可
26 |
27 | */
28 |
29 | const $ = new Env('东方头条看视频');
30 | const host = 'adv-invedio.dftoutiao.com';
31 | const notify = $.isNode() ? require('./sendNotify') : '';
32 | let dfttua = process.env.dfttua;
33 | let body = process.env.dfttkspbd;
34 |
35 | //开始运行
36 | !(async () => {
37 | console.log(`交流群:884234287 by-yml`);
38 | await yml()
39 |
40 | })()
41 | .catch((e) => $.logErr(e))
42 | .finally(() => $.done())
43 |
44 | // https://adv-invedio.dftoutiao.com/adv/send_gold/bonus
45 | //这里是要执行的代码 ====== 如果有您不需要的 请自行注释 使用 // 注释就行 ========
46 | async function yml() {
47 | await wyy();
48 | await ksp();
49 |
50 | //每日网抑云
51 | function wyy(timeout = 3 * 1000) {
52 | return new Promise((resolve) => {
53 | let url = {
54 | url: `https://keai.icu/apiwyy/api`
55 | }
56 | $.get(url, async (err, resp, data) => {
57 | try {
58 | data = JSON.parse(data)
59 | $.log(`\n【网抑云时间】: ${data.content} by--${data.music}`);
60 |
61 | } catch (e) {
62 | $.logErr(e, resp);
63 | } finally {
64 | resolve()
65 | }
66 | }, timeout)
67 | })
68 | }
69 |
70 |
71 | // https://adv-invedio.dftoutiao.com/adv/send_gold/bonus
72 | // 看视频任务
73 | function ksp(timeout = 0) {
74 | return new Promise((resolve) => {
75 | let url = {
76 | url: `https://${host}/adv/send_gold/bonus`,
77 | headers: {
78 | 'User-Agent': dfttua,
79 | },
80 | body: body
81 | }
82 | console.log(url);
83 |
84 | $.post(url, async (err, resp, data) => {
85 | try {
86 |
87 | console.log(`输出data开始===================`);
88 | console.log(data);
89 | console.log(`输出data结束===================`);
90 |
91 | result = JSON.parse(data);
92 | if (result.code === 0) {
93 | $.log(`\n【🎉🎉🎉 恭喜您鸭 🎉🎉🎉】首页看视频: 成功 ✅ 了呢 , 获得金币${result.data.bonus}`)
94 | await $.wait(3 * 1000)
95 | } else {
96 | $.log(`\n【🎉 恭喜个屁 🎉】首页看视频:失败 ❌ 了呢,原因可能是:${result.message}`)
97 | }
98 | } catch (e) {
99 | $.logErr(e, resp);
100 | } finally {
101 | resolve()
102 | }
103 | }, timeout)
104 |
105 | })
106 |
107 | }
108 | }
109 |
110 |
111 |
112 |
113 | //固定板块,无需动
114 | 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) }
--------------------------------------------------------------------------------
/invalid/dftt/dfttqd.js:
--------------------------------------------------------------------------------
1 | /*
2 | 邀请码: 003584319
3 | 感谢填写! 感谢填写!! 感谢填写!!!
4 | 1.15 完成签到,感谢群里大佬指导
5 | 1.18 更新签到 可能需要重新抓包
6 | 毛很小,100提现,不建议搞了
7 | 平台: 青龙
8 | 软件: 东方头条
9 | 收益: 10000金币=1元
10 | [Script]
11 | cron "8 8 * * *" https://raw.githubusercontent.com/yml2213/javascript/master/dftt/dfttqd.js,tag=东方头条签到
12 |
13 | 注意事项 : 一定要仔细阅读一下内容
14 | =============青龙变量格式=============
15 | export dfttua=''
16 | export dfttqdbd='params=XXXXX'
17 |
18 | =============青龙变量实例=============
19 | 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'
20 | export dfttqdbd='params=H0QHGzkHERoCAFZeRCAbKicMAh1HWEYWGwc2BwwMHEdORoPFxbvL+UFeRxUHBR0QfUldW0VRRlVRQUJzUQwQBQwSDUROVigaAwpQSVYHDwANfUlHhcfrkenxkczdUUlBAwwQRlxWNS8DNhcdFxFWVERFbkdHT1AEFQ0CVk59HRAPHkdYRgkHVmVRDAwBR1hGFRsSKx0EDhdHTkYiMiALOiowUElWCBJWTn0+CTkCARkUExAaEQUwUxUcEAk8Hi0lMTcuNQkzNlQALj40Lw0jMBMdKDAubyYhOSIrIxRTLiw0AQEwSy8WICA4FzUxUTknXDorMD0OPR0JEyAyDFYwDU1qPVYlKDYhCBcmMAU2AQ0aEhEIKw0iCTFWABgzQDZWLiEMQRENJS0ENwUfMjQiVARHBkcuLiBEagooJAIcFywOGhAzMTI0Jy8jKSMyOwVCPyogDhdZRFhWKwcEABEMEEZcTExoR1dSRVBCSEQbETJRX0E2IyAwRFhWKRYXQUhHRkpQWkF9X0cMEwwQRlxWGiofCUFeRxkLBB0YOlFfQRwQGAhEWFYvGwoNFwsBCUROVjEGCQ9QSVYLFSsCOgEWCh0LVl5EHTsMU1RWXFdWSEQdGTpRX0EzUDUgUkc2bV5XJkchWVAjRjZyMVFXS0hBJiJDTBw3XFpLIUVGSlYVMRcXDBsBPQBETlZvQ1VTQlVEVEtERG9DSFNCVURJVkREb15VU0JVRFRWRERvQ1VBXkcXFQ8QVmVRJBMCNgALFBFWc1EBBgQMFwE5FgY+HQFBSEcaEQoYVnNRAQYEDBcBRE5WNiMNDBwARVBKRlYi'
21 | =============变量解释==========
22 | dfttua:UA 这个不需要解释了吧
23 | dfttqdbd:变量中的xxxx是你的body包数据,,可以从 关键词 new_user_sign 包里找到所有变量
24 |
25 | =============变量获取==========
26 | 懒得写了,自己研究吧
27 | 不会的请百度或者群里求助:QQ群:884234287 tg:https://t.me/yml_tg
28 |
29 | */
30 |
31 | const $ = new Env('东方头条签到');
32 | const host = 'sign.dftoutiao.com';
33 | const notify = $.isNode() ? require('./sendNotify') : '';
34 | let dfttua = process.env.dfttua;
35 | let body = process.env.dfttqdbd;
36 |
37 | //开始运行
38 | !(async () => {
39 | console.log(`交流群:884234287 by-yml`);
40 | await yml()
41 |
42 | })()
43 | .catch((e) => $.logErr(e))
44 | .finally(() => $.done())
45 |
46 |
47 | // https://sign2.dftoutiao.com/sign/signv4/new_user_sign
48 | //这里是要执行的代码 ====== 如果有您不需要的 请自行注释 使用 // 注释就行 ========
49 | async function yml() {
50 | await wyy();
51 | await qd();
52 |
53 | //每日网抑云
54 | function wyy(timeout = 3 * 1000) {
55 | return new Promise((resolve) => {
56 | let url = {
57 | url: `https://keai.icu/apiwyy/api`
58 | }
59 | $.get(url, async (err, resp, data) => {
60 | try {
61 | data = JSON.parse(data)
62 | $.log(`\n【网抑云时间】: ${data.content} by--${data.music}`);
63 |
64 | } catch (e) {
65 | $.logErr(e, resp);
66 | } finally {
67 | resolve()
68 | }
69 | }, timeout)
70 | })
71 | }
72 |
73 |
74 | // https://sign.dftoutiao.com/sign/news_take_s
75 | // https://sign2.dftoutiao.com/sign/signv4/new_user_sign
76 | // 签到任务
77 | function qd(timeout = 0) {
78 | return new Promise((resolve) => {
79 | let url = {
80 | url: `https://${host}/sign/news_take_s`,
81 | headers: {
82 | 'User-Agent': dfttua,
83 | },
84 | body: body
85 | }
86 | // console.log(url);
87 |
88 | $.post(url, async (err, resp, data) => {
89 | try {
90 |
91 | // console.log(`输出data开始===================`);
92 | // console.log(data);
93 | // console.log(`输出data结束===================`);
94 |
95 | result = JSON.parse(data);
96 | if (result.status == true) {
97 | $.log(`\n【🎉🎉🎉 恭喜您鸭 🎉🎉🎉】执行签到: 成功 ✅ 了呢 , 获得积分${result.bonus}`)
98 | await $.wait(3 * 1000)
99 | } else {
100 | $.log(`\n【🎉 恭喜个屁 🎉】执行签到:失败 ❌ 了呢,原因未知!`)
101 | }
102 | } catch (e) {
103 | $.logErr(e, resp);
104 | } finally {
105 | resolve()
106 | }
107 | }, timeout)
108 |
109 | })
110 |
111 | }
112 | }
113 |
114 |
115 |
116 |
117 | //固定板块,无需动
118 | 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) }
--------------------------------------------------------------------------------
/invalid/dftt/dfttsdjl.js:
--------------------------------------------------------------------------------
1 | /*
2 | 邀请码: 003584319
3 | 感谢填写! 感谢填写!! 感谢填写!!!
4 | 1.17 新闻右上角-时段奖励
5 | 平台: 青龙
6 | 软件: 东方头条
7 | 收益: 10000金币=1元
8 | [Script]
9 | cron "0-59/30 * * * *" https://raw.githubusercontent.com/yml2213/javascript/master/dftt/dfttsdjl.js,tag=东方头条开宝箱
10 |
11 | 注意事项 : 一定要仔细阅读一下内容
12 | =============青龙变量格式=============
13 | export dfttua=''
14 | export dfttsdjlbd='lt=xxx&os=xxx&ver=2.6.5'
15 |
16 | =============青龙变量实例=============
17 | export dfttua=''DFTT/2.6.5 (iPhone; iOS 15.2; Scale/3.00)'
18 | export dfttsdjlbd='lt=eHJRK09qWVFIOGt3SWxjSDIzazJWUUtzNEFrTkVJQ0lXQXRrbk9zZW5zVnpaTWhHNXErMGp6VUVIYmZVVFAweEkxZDdaS1BybjlPcTV1ZHFGTkkwbWc9PQ==&os=iOS&ver=2.6.5'
19 | =============变量解释==========
20 | dfttua:UA 这个不需要解释了吧
21 | dfttboxbd:变量中的xxxx是你的body包数据,,可以搜索关键词 timesaward/get_award 包里找到所有变量
22 |
23 | =============变量获取==========
24 | 懒得写了,自己研究吧
25 | 不会的请百度或者群里求助:QQ群:884234287 tg:科技玩家@我即可
26 | */
27 |
28 | // https://timesaward.dftoutiao.com/timesaward/timesaward/get_award
29 | const $ = new Env('东方头条时段奖励');
30 | const host = 'timesaward.dftoutiao.com';
31 | const notify = $.isNode() ? require('./sendNotify') : '';
32 | let dfttua = process.env.dfttua;
33 | let body = process.env.dfttsdjlbd;
34 |
35 | //开始运行
36 | !(async () => {
37 | console.log(`交流群:884234287 by-yml`);
38 | await yml()
39 |
40 | })()
41 | .catch((e) => $.logErr(e))
42 | .finally(() => $.done())
43 |
44 | //这里是要执行的代码 ====== 如果有您不需要的 请自行注释 使用 // 注释就行 ========
45 | async function yml() {
46 | await wyy();
47 | await dzp();
48 |
49 | //每日网抑云
50 | function wyy(timeout = 3 * 1000) {
51 | return new Promise((resolve) => {
52 | let url = {
53 | url: `https://keai.icu/apiwyy/api`
54 | }
55 | $.get(url, async (err, resp, data) => {
56 | try {
57 | data = JSON.parse(data)
58 | $.log(`\n【网抑云时间】: ${data.content} by--${data.music}`);
59 |
60 | } catch (e) {
61 | $.logErr(e, resp);
62 | } finally {
63 | resolve()
64 | }
65 | }, timeout)
66 | })
67 | }
68 |
69 |
70 | // https://timesaward.dftoutiao.com/timesaward/timesaward/get_award
71 | // 时段奖励
72 | function dzp(timeout = 0) {
73 | return new Promise((resolve) => {
74 | let url = {
75 | url: `https://${host}/timesaward/timesaward/get_award`,
76 | headers: {
77 | 'User-Agent': dfttua
78 | },
79 | body: body
80 |
81 | }
82 | // console.log(url);
83 |
84 | $.post(url, async (err, resp, data) => {
85 | try {
86 |
87 | // console.log(`输出data开始===================`);
88 | // console.log(data);
89 | // console.log(`输出data结束===================`);
90 |
91 | result = JSON.parse(data);
92 | if (result.data.status == 1) {
93 | $.log(`\n【🎉🎉🎉 恭喜您鸭 🎉🎉🎉】时段奖励领取 成功 ✅ 了呢, 获得金币${result.data.coin}`)
94 | await $.wait(2 * 1000)
95 | } else {
96 | $.log(`\n【🎉 恭喜个屁 🎉】时段奖励领取:失败 ❌ 了呢,可能是:${result.data.msg}`)
97 | }
98 | } catch (e) {
99 | $.logErr(e, resp);
100 | } finally {
101 | resolve()
102 | }
103 | }, timeout)
104 |
105 | })
106 |
107 | }
108 |
109 | }
110 |
111 |
112 |
113 |
114 | //固定板块,无需动
115 | 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) }
--------------------------------------------------------------------------------
/invalid/dftt/dfttwz.js:
--------------------------------------------------------------------------------
1 | /*
2 | 邀请码: 003584319
3 | 感谢填写! 感谢填写!! 感谢填写!!!
4 | 1.15 阅读文章
5 | 平台: 青龙
6 | 软件: 东方头条
7 | 收益: 10000金币=1元
8 | [Script]
9 | cron "20 6-20 * * *" https://raw.githubusercontent.com/yml2213/javascript/master/dftt/dfttwz.js,tag=东方头条文章
10 |
11 | 注意事项 : 一定要仔细阅读一下内容
12 | =============青龙变量格式=============
13 | export dfttua=''
14 | export dfttwzbd='params=XXXXX'
15 | =============青龙变量实例=============
16 | 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'
17 | export dfttwzbd='params=H0QHGzkHERoCAFZeRCAbKicMAh1HWEYWGwc2BwwMHEdORoPFxbvL+UFeRwAXRE5WbkVRUUBWQlZeTFZzUQQAEQwQRlxMTGhHV1JFUEJIRAAHAAAAEQQABkZcVlZzUQwQBQwSDUROVigaAwpQSVYICBNWZVFUUkRLTVJTQUFuQVVaR1ZDXERYVjwaERpQX1aC0/qR0uSA2/BHWEYXHRB9SUciAhUnEAkGEW1BVVJDUVZIRBcALFFfQUNTQFZUR0JtS11BXkcbF0ROVjYcFkFeRwcJIhECNhAAKhZHTkZUREZtQ1RSRldHVVFFQ2tFUlcRARAGVRZGbhBWVkJXTVwAQUE6RlwHQlJEXV8WRG5HXVAXB0MFB0QWOkdXW1BJVgUWBAU2F0dZUCQEFDUAGy0WV1FCVEVQRFhWLBwDFxwEGQFETlYbNTE3OyonRkpWGCtRX0EXLT42LURNLiQzJTsqMxBVJyMnGTYnOx8VHiwjIQoHHy03IwYwDSI+DkMJOyM9JhYEH00lKTJWCDMaFAcgIzc7Kzs3FzkjFkIiCiUsOh8/IjIgNQM6Ng4bKCEQBTVFNiYRDw8iBiAyVy48GTQxCBkSFjMFTSQOTlhBXkcaCwIRB31JRzgJOVYRFBgSLRwIP1BfKEYSGwErGgQMLkdYOEQADS8WOUFIOVYKAwMHA1FJP1AQBggSGyh9STlBGhEAFFwoKANcOT8uShlVSAAAcRALPy45WwkJFh0zFjk/LkpGVlZFRWpCUFJHVURcV0FaNwcIDy5HWDhEGhs7FjlBSFREGUoPKH0GFw8UFxsJOlZOA1ERDAcRHQUJKFZzL0cXCxUROEROKH0dABQBOVZIOlYBLR8RDC5HTjhEHAArA18/LjlbODooWzJCSxcGSxcKOigocB4KARsJETg6KFttQVVSQ1BFUVdBRG9LVFZcDQAJCihWcy9HDR0BEThETkZvDjhBXkcCARRWTn1BS1VcUFZIRBsRMlFfQTYjIDBEWFYrGggGADoAHRYRVmVRCwYFFisQDxkRLVFJQR0WKxIDBgc2HAtBSEcdKzVURWpdV0FeRxgFElZOfUBTTURRQlVeRkdqRlBaRlZNRkpWFS8DERoCAB0ARE5WGzUxN1BJVg0LEVZlUSRWMyFAVyRGWW02UCdfUTFWJFk2a0dcTkcnMFNeNzBmSlwnQ0dYRgUFHTtRX0EzFQQ3EhsGOlFJQRAEBwEVABUrGgoNUF9WChMYGH1fRwIcAQYLDxA9O1FfQUJVRFRWRERvXlVTQlVZVFZERHJDVVNCSERUVkREb0NVU0JVREZKVhA6BQwAF0dORg8kHDAdAFJGSUZGGw=='
18 | =============变量解释==========
19 | dfttua:UA 这个不需要解释了吧
20 | dfttwzbd:变量中的xxxx是你的body包数据,,可以从 关键词 read_news 包里找到所有变量
21 |
22 | =============变量获取==========
23 | 懒得写了,自己研究吧
24 | 不会的请百度或者群里求助:QQ群:884234287 tg:科技玩家@我即可
25 |
26 | */
27 | // https://yuedu4.dftoutiao.com/index/Yuedutimer/read_news
28 | const $ = new Env('东方头条文章');
29 | const host = 'yuedu4.dftoutiao.com';
30 | const notify = $.isNode() ? require('./sendNotify') : '';
31 | let dfttua = process.env.dfttua;
32 | let body = process.env.dfttwzbd;
33 | //==================================================这里自定义阅读文章数量==================================================
34 | let num = 30; //阅读数量(默认30)
35 | //==================================================这里自定义阅读文章数量==================================================
36 | //开始运行
37 | !(async () => {
38 | console.log(`交流群:884234287 by-yml`);
39 | await yml()
40 |
41 | })()
42 | .catch((e) => $.logErr(e))
43 | .finally(() => $.done())
44 |
45 | // https://yuedu4.dftoutiao.com/index/Yuedutimer/read_news
46 | //这里是要执行的代码 ====== 如果有您不需要的 请自行注释 使用 // 注释就行 ========
47 | async function yml() {
48 | await wyy();
49 | for (let i = 0; i < num; i++) {
50 | if (i < num) {
51 | let u = i + 1;
52 | console.log(`正在阅读第${u}篇,请耐心等待!`);
53 | await wz();
54 | }
55 | }
56 |
57 |
58 | //每日网抑云
59 | function wyy(timeout = 3 * 1000) {
60 | return new Promise((resolve) => {
61 | let url = {
62 | url: `https://keai.icu/apiwyy/api`
63 | }
64 | $.get(url, async (err, resp, data) => {
65 | try {
66 | data = JSON.parse(data)
67 | $.log(`\n【网抑云时间】: ${data.content} by--${data.music}`);
68 |
69 | } catch (e) {
70 | $.logErr(e, resp);
71 | } finally {
72 | resolve()
73 | }
74 | }, timeout)
75 | })
76 | }
77 |
78 |
79 | // https://yuedu4.dftoutiao.com/index/Yuedutimer/read_news
80 | // 阅读文章任务
81 | function wz(timeout = 0) {
82 | return new Promise((resolve) => {
83 | let url = {
84 | url: `https://${host}/index/Yuedutimer/read_news`,
85 | headers: {
86 | 'User-Agent': dfttua
87 | },
88 | body: body
89 | }
90 | // console.log(url);
91 | $.post(url, async (err, resp, data) => {
92 | try {
93 | // console.log(`输出data开始===================`);
94 | // console.log(data);
95 | // console.log(`输出data结束===================`);
96 |
97 | result = JSON.parse(data);
98 | if (result.err_code == 0) {
99 | $.log(`\n【🎉🎉🎉 恭喜您鸭 🎉🎉🎉】阅读文章: 成功 ✅ 了呢 , 获得金币${result.bonus}枚!!`)
100 | await $.wait(60 * 1000);
101 | } else {
102 | $.log(`\n【🎉 恭喜个屁 🎉】阅读文章:失败 ❌ 了呢,原因可能是是:${result.msg}`)
103 | await $.wait(5 * 1000);
104 |
105 | }
106 | } catch (e) {
107 | $.logErr(e, resp);
108 | } finally {
109 | resolve()
110 | }
111 | }, timeout)
112 |
113 | })
114 |
115 |
116 | }
117 | }
118 |
119 |
120 | //固定板块,无需动
121 | function Env(t, e) {
122 | class s {
123 | constructor(t) {
124 | this.env = t
125 | }
126 |
127 | send(t, e = "GET") {
128 | t = "string" == typeof t ? { url: t } : t;
129 | let s = this.get;
130 | return "POST" === e && (s = this.post), new Promise((e, i) => {
131 | s.call(this, t, (t, s, r) => {
132 | t ? i(t) : e(s)
133 | })
134 | })
135 | }
136 |
137 | get(t) {
138 | return this.send.call(this.env, t)
139 | }
140 |
141 | post(t) {
142 | return this.send.call(this.env, t, "POST")
143 | }
144 | }
145 |
146 | return new class {
147 | constructor(t, e) {
148 | 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!`)
149 | }
150 |
151 | isNode() {
152 | return "undefined" != typeof module && !!module.exports
153 | }
154 |
155 | isQuanX() {
156 | return "undefined" != typeof $task
157 | }
158 |
159 | isSurge() {
160 | return "undefined" != typeof $httpClient && "undefined" == typeof $loon
161 | }
162 |
163 | isLoon() {
164 | return "undefined" != typeof $loon
165 | }
166 |
167 | isShadowrocket() {
168 | return "undefined" != typeof $rocket
169 | }
170 |
171 | toObj(t, e = null) {
172 | try {
173 | return JSON.parse(t)
174 | } catch {
175 | return e
176 | }
177 | }
178 |
179 | toStr(t, e = null) {
180 | try {
181 | return JSON.stringify(t)
182 | } catch {
183 | return e
184 | }
185 | }
186 |
187 | getjson(t, e) {
188 | let s = e;
189 | const i = this.getdata(t);
190 | if (i) try {
191 | s = JSON.parse(this.getdata(t))
192 | } catch {
193 | }
194 | return s
195 | }
196 |
197 | setjson(t, e) {
198 | try {
199 | return this.setdata(JSON.stringify(t), e)
200 | } catch {
201 | return !1
202 | }
203 | }
204 |
205 | getScript(t) {
206 | return new Promise(e => {
207 | this.get({ url: t }, (t, s, i) => e(i))
208 | })
209 | }
210 |
211 | runScript(t, e) {
212 | return new Promise(s => {
213 | let i = this.getdata("@chavy_boxjs_userCfgs.httpapi");
214 | i = i ? i.replace(/\n/g, "").trim() : i;
215 | let r = this.getdata("@chavy_boxjs_userCfgs.httpapi_timeout");
216 | r = r ? 1 * r : 20, r = e && e.timeout ? e.timeout : r;
217 | const [o, h] = i.split("@"), n = {
218 | url: `http://${h}/v1/scripting/evaluate`,
219 | body: { script_text: t, mock_type: "cron", timeout: r },
220 | headers: { "X-Key": o, Accept: "*/*" }
221 | };
222 | this.post(n, (t, e, i) => s(i))
223 | }).catch(t => this.logErr(t))
224 | }
225 |
226 | loaddata() {
227 | if (!this.isNode()) return {};
228 | {
229 | this.fs = this.fs ? this.fs : require("fs"), this.path = this.path ? this.path : require("path");
230 | const t = this.path.resolve(this.dataFile), e = this.path.resolve(process.cwd(), this.dataFile),
231 | s = this.fs.existsSync(t), i = !s && this.fs.existsSync(e);
232 | if (!s && !i) return {};
233 | {
234 | const i = s ? t : e;
235 | try {
236 | return JSON.parse(this.fs.readFileSync(i))
237 | } catch (t) {
238 | return {}
239 | }
240 | }
241 | }
242 | }
243 |
244 | writedata() {
245 | if (this.isNode()) {
246 | this.fs = this.fs ? this.fs : require("fs"), this.path = this.path ? this.path : require("path");
247 | const t = this.path.resolve(this.dataFile), e = this.path.resolve(process.cwd(), this.dataFile),
248 | s = this.fs.existsSync(t), i = !s && this.fs.existsSync(e), r = JSON.stringify(this.data);
249 | s ? this.fs.writeFileSync(t, r) : i ? this.fs.writeFileSync(e, r) : this.fs.writeFileSync(t, r)
250 | }
251 | }
252 |
253 | lodash_get(t, e, s) {
254 | const i = e.replace(/\[(\d+)\]/g, ".$1").split(".");
255 | let r = t;
256 | for (const t of i) if (r = Object(r)[t], void 0 === r) return s;
257 | return r
258 | }
259 |
260 | lodash_set(t, e, s) {
261 | 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)
262 | }
263 |
264 | getdata(t) {
265 | let e = this.getval(t);
266 | if (/^@/.test(t)) {
267 | const [, s, i] = /^@(.*?)\.(.*?)$/.exec(t), r = s ? this.getval(s) : "";
268 | if (r) try {
269 | const t = JSON.parse(r);
270 | e = t ? this.lodash_get(t, i, "") : e
271 | } catch (t) {
272 | e = ""
273 | }
274 | }
275 | return e
276 | }
277 |
278 | setdata(t, e) {
279 | let s = !1;
280 | if (/^@/.test(e)) {
281 | const [, i, r] = /^@(.*?)\.(.*?)$/.exec(e), o = this.getval(i),
282 | h = i ? "null" === o ? null : o || "{}" : "{}";
283 | try {
284 | const e = JSON.parse(h);
285 | this.lodash_set(e, r, t), s = this.setval(JSON.stringify(e), i)
286 | } catch (e) {
287 | const o = {};
288 | this.lodash_set(o, r, t), s = this.setval(JSON.stringify(o), i)
289 | }
290 | } else s = this.setval(t, e);
291 | return s
292 | }
293 |
294 | getval(t) {
295 | 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
296 | }
297 |
298 | setval(t, e) {
299 | 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
300 | }
301 |
302 | initGotEnv(t) {
303 | 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))
304 | }
305 |
306 | get(t, e = (() => {
307 | })) {
308 | 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) => {
309 | !t && s && (s.body = i, s.statusCode = s.status), e(t, s, i)
310 | }); else if (this.isQuanX()) this.isNeedRewrite && (t.opts = t.opts || {}, Object.assign(t.opts, { hints: !1 })), $task.fetch(t).then(t => {
311 | const { statusCode: s, statusCode: i, headers: r, body: o } = t;
312 | e(null, { status: s, statusCode: i, headers: r, body: o }, o)
313 | }, t => e(t)); else if (this.isNode()) {
314 | let s = require("iconv-lite");
315 | this.initGotEnv(t), this.got(t).on("redirect", (t, e) => {
316 | try {
317 | if (t.headers["set-cookie"]) {
318 | const s = t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString();
319 | s && this.ckjar.setCookieSync(s, null), e.cookieJar = this.ckjar
320 | }
321 | } catch (t) {
322 | this.logErr(t)
323 | }
324 | }).then(t => {
325 | const { statusCode: i, statusCode: r, headers: o, rawBody: h } = t;
326 | e(null, { status: i, statusCode: r, headers: o, rawBody: h }, s.decode(h, this.encoding))
327 | }, t => {
328 | const { message: i, response: r } = t;
329 | e(i, r, r && s.decode(r.rawBody, this.encoding))
330 | })
331 | }
332 | }
333 |
334 | post(t, e = (() => {
335 | })) {
336 | const s = t.method ? t.method.toLocaleLowerCase() : "post";
337 | 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) => {
338 | !t && s && (s.body = i, s.statusCode = s.status), e(t, s, i)
339 | }); else if (this.isQuanX()) t.method = s, this.isNeedRewrite && (t.opts = t.opts || {}, Object.assign(t.opts, { hints: !1 })), $task.fetch(t).then(t => {
340 | const { statusCode: s, statusCode: i, headers: r, body: o } = t;
341 | e(null, { status: s, statusCode: i, headers: r, body: o }, o)
342 | }, t => e(t)); else if (this.isNode()) {
343 | let i = require("iconv-lite");
344 | this.initGotEnv(t);
345 | const { url: r, ...o } = t;
346 | this.got[s](r, o).then(t => {
347 | const { statusCode: s, statusCode: r, headers: o, rawBody: h } = t;
348 | e(null, { status: s, statusCode: r, headers: o, rawBody: h }, i.decode(h, this.encoding))
349 | }, t => {
350 | const { message: s, response: r } = t;
351 | e(s, r, r && i.decode(r.rawBody, this.encoding))
352 | })
353 | }
354 | }
355 |
356 | time(t, e = null) {
357 | const s = e ? new Date(e) : new Date;
358 | let i = {
359 | "M+": s.getMonth() + 1,
360 | "d+": s.getDate(),
361 | "H+": s.getHours(),
362 | "m+": s.getMinutes(),
363 | "s+": s.getSeconds(),
364 | "q+": Math.floor((s.getMonth() + 3) / 3),
365 | S: s.getMilliseconds()
366 | };
367 | /(y+)/.test(t) && (t = t.replace(RegExp.$1, (s.getFullYear() + "").substr(4 - RegExp.$1.length)));
368 | 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)));
369 | return t
370 | }
371 |
372 | msg(e = t, s = "", i = "", r) {
373 | const o = t => {
374 | if (!t) return t;
375 | if ("string" == typeof t) return this.isLoon() ? t : this.isQuanX() ? { "open-url": t } : this.isSurge() ? { url: t } : void 0;
376 | if ("object" == typeof t) {
377 | if (this.isLoon()) {
378 | let e = t.openUrl || t.url || t["open-url"], s = t.mediaUrl || t["media-url"];
379 | return { openUrl: e, mediaUrl: s }
380 | }
381 | if (this.isQuanX()) {
382 | let e = t["open-url"] || t.url || t.openUrl, s = t["media-url"] || t.mediaUrl;
383 | return { "open-url": e, "media-url": s }
384 | }
385 | if (this.isSurge()) {
386 | let e = t.url || t.openUrl || t["open-url"];
387 | return { url: e }
388 | }
389 | }
390 | };
391 | if (this.isMute || (this.isSurge() || this.isLoon() ? $notification.post(e, s, i, o(r)) : this.isQuanX() && $notify(e, s, i, o(r))), !this.isMuteLog) {
392 | let t = ["", "==============\ud83d\udce3\u7cfb\u7edf\u901a\u77e5\ud83d\udce3=============="];
393 | t.push(e), s && t.push(s), i && t.push(i), console.log(t.join("\n")), this.logs = this.logs.concat(t)
394 | }
395 | }
396 |
397 | log(...t) {
398 | t.length > 0 && (this.logs = [...this.logs, ...t]), console.log(t.join(this.logSeparator))
399 | }
400 |
401 | logErr(t, e) {
402 | const s = !this.isSurge() && !this.isQuanX() && !this.isLoon();
403 | s ? this.log("", `\u2757\ufe0f${this.name}, \u9519\u8bef!`, t.stack) : this.log("", `\u2757\ufe0f${this.name}, \u9519\u8bef!`, t)
404 | }
405 |
406 | wait(t) {
407 | return new Promise(e => setTimeout(e, t))
408 | }
409 |
410 | done(t = {}) {
411 | const e = (new Date).getTime(), s = (e - this.startTime) / 1e3;
412 | this.log("", `\ud83d\udd14${this.name}, \u7ed3\u675f! \ud83d\udd5b ${s} \u79d2`), this.log(), (this.isSurge() || this.isQuanX() || this.isLoon()) && $done(t)
413 | }
414 | }(t, e)
415 | }
--------------------------------------------------------------------------------
/invalid/dftt/东方头条.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yml2213/javascript/183efd8c40788eaeb8b404a7810cc04fa0ee4423/invalid/dftt/东方头条.jpg
--------------------------------------------------------------------------------
/invalid/dygy/dygy.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yml2213/javascript/183efd8c40788eaeb8b404a7810cc04fa0ee4423/invalid/dygy/dygy.jpg
--------------------------------------------------------------------------------
/invalid/fksj/fksj.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yml2213/javascript/183efd8c40788eaeb8b404a7810cc04fa0ee4423/invalid/fksj/fksj.jpg
--------------------------------------------------------------------------------
/invalid/gqcq.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yml2213/javascript/183efd8c40788eaeb8b404a7810cc04fa0ee4423/invalid/gqcq.png
--------------------------------------------------------------------------------
/invalid/jfjlb/jfjlb.js:
--------------------------------------------------------------------------------
1 | /**
2 | * 金粉俱乐部 小程序
3 | * cron 10 7 * * * yml2213_javascript_master/jfjlb.js
4 | *
5 | * 4-26 完成签到 任务 有bug及时反馈
6 | * 4-27 有问题,暂时移除
7 | *
8 | * 感谢投稿人员,感谢所有测试人员
9 | * ========= 青龙--配置文件 =========
10 | * 变量格式: export jfjlb_data=' jscode & token @ jscode & token ' 多个账号用 @分割
11 | * 签到包的 member-api/memberApplet/signLog url链接中的 "jscode" 跟 hd 中的 token
12 | *
13 | * 神秘代码: aHR0cHM6Ly90Lm1lL3ltbF90Zw==
14 | */
15 |
16 |
17 | const $ = new Env("金粉俱乐部")
18 | const notify = $.isNode() ? require('./sendNotify') : ''
19 | const Notify = 1 //0为关闭通知,1为打开通知,默认为1
20 | const debug = 0 //0为关闭调试,1为打开调试,默认为0; 求助前请打开运行一次,再发日志求助
21 | //////////////////////
22 |
23 | let msg = ''
24 | let ck = ''
25 | let ckStr = process.env.jfjlb_data
26 | /////////////////////////////////////////////////////////
27 |
28 |
29 | async function tips(ckArr) {
30 | console.log(`\n本地脚本4-26`)
31 | // console.log(`\n 脚本已恢复正常状态,请及时更新! `);
32 | console.log(`\n 求助前请打开 19 行左右的 debug 运行一次,再发日志求助 \n`)
33 | console.log(`\n 脚本测试中,有bug及时反馈! \n`)
34 | console.log(`\n 脚本测试中,有bug及时反馈! \n`)
35 | console.log(`\n 脚本测试中,有bug及时反馈! \n`)
36 |
37 | console.log(`\n================================================\n脚本执行 - 北京时间(UTC+8): ${new Date(
38 | new Date().getTime() + new Date().getTimezoneOffset() * 60 * 1000 + 8 * 60 * 60 * 1000).toLocaleString()} \n================================================\n`);
39 |
40 | await wyy()
41 | console.log(`\n=================== 共找到 ${ckArr.length} 个账号 ===================`)
42 | debugLog(`【debug】 这是你的账号数组:\n ${ckArr}`)
43 |
44 | }
45 |
46 | !(async () => {
47 |
48 | let ckArr = await getCks(ckStr, "jfjlb_data")
49 |
50 | await tips(ckArr)
51 |
52 | for (let index = 0; index < ckArr.length; index++) {
53 |
54 | let num = index + 1
55 | console.log(`\n========= 开始【第 ${num} 个账号】=========\n`)
56 |
57 |
58 | ck = ckArr[index].split('&');
59 | if (debug) {
60 | console.log(`\n 【debug】 这是你第 ${num} 账号信息:\n ${ck}\n`)
61 | }
62 |
63 | await start()
64 |
65 | }
66 | await SendMsg(msg);
67 |
68 |
69 | })()
70 | .catch((e) => $.logErr(e))
71 | .finally(() => $.done())
72 |
73 |
74 |
75 |
76 | async function start() {
77 |
78 | // let myDate = new Date()
79 | // h = myDate.getHours()
80 | // // console.log(h);
81 | // if (h == 6) {
82 | // console.log('开始 签到')
83 | // await signin(ck)
84 | // await $.wait(2 * 1000)
85 | // }
86 |
87 |
88 | console.log('开始 签到')
89 | await signin(ck[0], ck[1])
90 | await $.wait(2 * 1000)
91 |
92 |
93 | }
94 |
95 |
96 |
97 | /**
98 | * 签到 get
99 | * https://api.baijiuyun.com/member-api/memberApplet/signLog?jscode=073UlTkl2hqT394Vfznl2BssuL2UlTkT&appid=wxad89e6496de97dab&identityId=78
100 | */
101 | async function signin(jscode, token, timeout = 3 * 1000) {
102 | let url = {
103 | url: `https://api.baijiuyun.com/member-api/memberApplet/signLog?jscode=${jscode}&appid=wxad89e6496de97dab&identityId=78`,
104 | headers: {
105 | 'token': token,
106 | 'Content-Type': 'application/json'
107 | },
108 |
109 | }
110 | let result = await httpGet(url, `签到`, timeout)
111 | if (result.code == 200) {
112 | console.log(`\n 签到:${result.message} 🎉 您已经连续签到 ${result.message} 天! \n`);
113 | msg += `\n \n 签到:${result.message} 🎉 您已经连续签到 ${result.message} 天! \n\n`
114 | } else if (result.code == 400) {
115 | console.log(`\n 签到:您今天签到过了呢!\n`);
116 | } else {
117 | console.log(`\n 签到: 失败 ❌ 了呢,原因未知!\n ${result} \n `)
118 | }
119 | }
120 |
121 |
122 |
123 |
124 | //#region 固定代码
125 | // ============================================变量检查============================================ \\
126 |
127 | async function getCks(ck, str) {
128 |
129 |
130 | return new Promise((resolve, reject) => {
131 |
132 | let ckArr = []
133 | if (ck) {
134 | if (ck.indexOf("@") != -1) {
135 |
136 | ck.split("@").forEach((item) => {
137 | ckArr.push(item);
138 | });
139 | } else {
140 | ckArr.push(ck);
141 | }
142 | resolve(ckArr)
143 | } else {
144 | console.log(`\n 【${$.name}】:未填写变量 ${str}`)
145 | }
146 |
147 | }
148 | )
149 | }
150 |
151 | // ============================================发送消息============================================ \\
152 |
153 | async function SendMsg(message) {
154 | if (!message)
155 | return;
156 |
157 | if (Notify > 0) {
158 | if ($.isNode()) {
159 |
160 | var notify = require('../金粉俱乐部/sendNotify');
161 | await notify.sendNotify($.name, message);
162 | } else {
163 | $.msg(message);
164 | }
165 | } else {
166 | console.log(message);
167 | }
168 | }
169 |
170 | /**
171 | * 随机数生成
172 | */
173 |
174 | function randomString(e) {
175 | e = e || 32;
176 | var t = "QWERTYUIOPASDFGHJKLZXCVBNM1234567890",
177 | a = t.length,
178 | n = "";
179 |
180 | for (i = 0; i < e; i++)
181 | n += t.charAt(Math.floor(Math.random() * a));
182 | return n
183 | }
184 |
185 | /**
186 | * 随机整数生成
187 | */
188 |
189 | function randomInt(min, max) {
190 | return Math.round(Math.random() * (max - min) + min)
191 | }
192 |
193 | //每日网抑云
194 | function wyy(timeout = 3 * 1000) {
195 | return new Promise((resolve) => {
196 | let url = {
197 | url: `https://keai.icu/apiwyy/api`
198 | }
199 |
200 | $.get(url, async (err, resp, data) => {
201 | try {
202 | data = JSON.parse(data)
203 | console.log(`\n 【网抑云时间】: ${data.content} by--${data.music}`);
204 |
205 | } catch (e) {
206 | $.logErr(e, resp);
207 | } finally {
208 |
209 | resolve()
210 | }
211 | }, timeout)
212 | })
213 | }
214 |
215 |
216 |
217 | // ============================================ get请求 ============================================ \\
218 | async function httpGet(getUrlObject, tip, timeout = 3 * 1000) {
219 | return new Promise((resolve) => {
220 | let url = getUrlObject
221 | if (!tip) {
222 | let tmp = arguments.callee.toString()
223 | let re = /function\s*(\w*)/i
224 | let matches = re.exec(tmp)
225 | tip = matches[1]
226 | }
227 | if (debug) {
228 | console.log(`\n 【debug】=============== 这是 ${tip} 请求 url ===============`);
229 | console.log(url);
230 | }
231 |
232 | $.get(url, async (error, response, data) => {
233 | try {
234 | if (debug) {
235 | console.log(`\n\n 【debug】===============这是 ${tip} 返回data==============`);
236 | console.log(data)
237 | console.log(`======`)
238 | console.log(JSON.parse(data))
239 | }
240 | let result = JSON.parse(data)
241 | resolve(result)
242 |
243 | } catch (e) {
244 | console.log(e)
245 | } finally {
246 |
247 | resolve();
248 | }
249 | }, timeout)
250 | })
251 | }
252 |
253 | // ============================================ post请求 ============================================ \\
254 | async function httpPost(postUrlObject, tip, timeout = 3 * 1000) {
255 | return new Promise((resolve) => {
256 | let url = postUrlObject
257 | if (!tip) {
258 | let tmp = arguments.callee.toString()
259 | let re = /function\s*(\w*)/i
260 | let matches = re.exec(tmp)
261 | tip = matches[1]
262 | }
263 | if (debug) {
264 | console.log(`\n 【debug】=============== 这是 ${tip} 请求 url ===============`);
265 | console.log(url);
266 | }
267 |
268 | $.post(url, async (error, response, data) => {
269 | try {
270 | if (debug) {
271 | console.log(`\n\n 【debug】===============这是 ${tip} 返回data==============`);
272 | console.log(data)
273 | console.log(`======`)
274 | console.log(JSON.parse(data))
275 | }
276 | let result = JSON.parse(data)
277 | resolve(result)
278 |
279 | } catch (e) {
280 | console.log(e)
281 | } finally {
282 |
283 | resolve();
284 | }
285 | }, timeout)
286 | })
287 | }
288 |
289 |
290 | // ============================================ debug调试 ============================================ \\
291 | function debugLog(...args) {
292 | if (debug) {
293 | console.log(...args)
294 | }
295 | }
296 |
297 |
298 |
299 |
300 | //#endregion
301 |
302 |
303 |
304 |
305 | function MD5Encrypt(a) { function b(a, b) { return a << b | a >>> 32 - b } function c(a, b) { var c, d, e, f, g; return e = 2147483648 & a, f = 2147483648 & b, c = 1073741824 & a, d = 1073741824 & b, g = (1073741823 & a) + (1073741823 & b), c & d ? 2147483648 ^ g ^ e ^ f : c | d ? 1073741824 & g ? 3221225472 ^ g ^ e ^ f : 1073741824 ^ g ^ e ^ f : g ^ e ^ f } function d(a, b, c) { return a & b | ~a & c } function e(a, b, c) { return a & c | b & ~c } function f(a, b, c) { return a ^ b ^ c } function g(a, b, c) { return b ^ (a | ~c) } function h(a, e, f, g, h, i, j) { return a = c(a, c(c(d(e, f, g), h), j)), c(b(a, i), e) } function i(a, d, f, g, h, i, j) { return a = c(a, c(c(e(d, f, g), h), j)), c(b(a, i), d) } function j(a, d, e, g, h, i, j) { return a = c(a, c(c(f(d, e, g), h), j)), c(b(a, i), d) } function k(a, d, e, f, h, i, j) { return a = c(a, c(c(g(d, e, f), h), j)), c(b(a, i), d) } function l(a) { for (var b, c = a.length, d = c + 8, e = (d - d % 64) / 64, f = 16 * (e + 1), g = new Array(f - 1), h = 0, i = 0; c > i;)b = (i - i % 4) / 4, h = i % 4 * 8, g[b] = g[b] | a.charCodeAt(i) << h, i++; return b = (i - i % 4) / 4, h = i % 4 * 8, g[b] = g[b] | 128 << h, g[f - 2] = c << 3, g[f - 1] = c >>> 29, g } function m(a) { var b, c, d = "", e = ""; for (c = 0; 3 >= c; c++)b = a >>> 8 * c & 255, e = "0" + b.toString(16), d += e.substr(e.length - 2, 2); return d } function n(a) { a = a.replace(/\r\n/g, "\n"); for (var b = "", c = 0; c < a.length; c++) { var d = a.charCodeAt(c); 128 > d ? b += String.fromCharCode(d) : d > 127 && 2048 > d ? (b += String.fromCharCode(d >> 6 | 192), b += String.fromCharCode(63 & d | 128)) : (b += String.fromCharCode(d >> 12 | 224), b += String.fromCharCode(d >> 6 & 63 | 128), b += String.fromCharCode(63 & d | 128)) } return b } var o, p, q, r, s, t, u, v, w, x = [], y = 7, z = 12, A = 17, B = 22, C = 5, D = 9, E = 14, F = 20, G = 4, H = 11, I = 16, J = 23, K = 6, L = 10, M = 15, N = 21; for (a = n(a), x = l(a), t = 1732584193, u = 4023233417, v = 2562383102, w = 271733878, o = 0; o < x.length; o += 16)p = t, q = u, r = v, s = w, t = h(t, u, v, w, x[o + 0], y, 3614090360), w = h(w, t, u, v, x[o + 1], z, 3905402710), v = h(v, w, t, u, x[o + 2], A, 606105819), u = h(u, v, w, t, x[o + 3], B, 3250441966), t = h(t, u, v, w, x[o + 4], y, 4118548399), w = h(w, t, u, v, x[o + 5], z, 1200080426), v = h(v, w, t, u, x[o + 6], A, 2821735955), u = h(u, v, w, t, x[o + 7], B, 4249261313), t = h(t, u, v, w, x[o + 8], y, 1770035416), w = h(w, t, u, v, x[o + 9], z, 2336552879), v = h(v, w, t, u, x[o + 10], A, 4294925233), u = h(u, v, w, t, x[o + 11], B, 2304563134), t = h(t, u, v, w, x[o + 12], y, 1804603682), w = h(w, t, u, v, x[o + 13], z, 4254626195), v = h(v, w, t, u, x[o + 14], A, 2792965006), u = h(u, v, w, t, x[o + 15], B, 1236535329), t = i(t, u, v, w, x[o + 1], C, 4129170786), w = i(w, t, u, v, x[o + 6], D, 3225465664), v = i(v, w, t, u, x[o + 11], E, 643717713), u = i(u, v, w, t, x[o + 0], F, 3921069994), t = i(t, u, v, w, x[o + 5], C, 3593408605), w = i(w, t, u, v, x[o + 10], D, 38016083), v = i(v, w, t, u, x[o + 15], E, 3634488961), u = i(u, v, w, t, x[o + 4], F, 3889429448), t = i(t, u, v, w, x[o + 9], C, 568446438), w = i(w, t, u, v, x[o + 14], D, 3275163606), v = i(v, w, t, u, x[o + 3], E, 4107603335), u = i(u, v, w, t, x[o + 8], F, 1163531501), t = i(t, u, v, w, x[o + 13], C, 2850285829), w = i(w, t, u, v, x[o + 2], D, 4243563512), v = i(v, w, t, u, x[o + 7], E, 1735328473), u = i(u, v, w, t, x[o + 12], F, 2368359562), t = j(t, u, v, w, x[o + 5], G, 4294588738), w = j(w, t, u, v, x[o + 8], H, 2272392833), v = j(v, w, t, u, x[o + 11], I, 1839030562), u = j(u, v, w, t, x[o + 14], J, 4259657740), t = j(t, u, v, w, x[o + 1], G, 2763975236), w = j(w, t, u, v, x[o + 4], H, 1272893353), v = j(v, w, t, u, x[o + 7], I, 4139469664), u = j(u, v, w, t, x[o + 10], J, 3200236656), t = j(t, u, v, w, x[o + 13], G, 681279174), w = j(w, t, u, v, x[o + 0], H, 3936430074), v = j(v, w, t, u, x[o + 3], I, 3572445317), u = j(u, v, w, t, x[o + 6], J, 76029189), t = j(t, u, v, w, x[o + 9], G, 3654602809), w = j(w, t, u, v, x[o + 12], H, 3873151461), v = j(v, w, t, u, x[o + 15], I, 530742520), u = j(u, v, w, t, x[o + 2], J, 3299628645), t = k(t, u, v, w, x[o + 0], K, 4096336452), w = k(w, t, u, v, x[o + 7], L, 1126891415), v = k(v, w, t, u, x[o + 14], M, 2878612391), u = k(u, v, w, t, x[o + 5], N, 4237533241), t = k(t, u, v, w, x[o + 12], K, 1700485571), w = k(w, t, u, v, x[o + 3], L, 2399980690), v = k(v, w, t, u, x[o + 10], M, 4293915773), u = k(u, v, w, t, x[o + 1], N, 2240044497), t = k(t, u, v, w, x[o + 8], K, 1873313359), w = k(w, t, u, v, x[o + 15], L, 4264355552), v = k(v, w, t, u, x[o + 6], M, 2734768916), u = k(u, v, w, t, x[o + 13], N, 1309151649), t = k(t, u, v, w, x[o + 4], K, 4149444226), w = k(w, t, u, v, x[o + 11], L, 3174756917), v = k(v, w, t, u, x[o + 2], M, 718787259), u = k(u, v, w, t, x[o + 9], N, 3951481745), t = c(t, p), u = c(u, q), v = c(v, r), w = c(w, s); var O = m(t) + m(u) + m(v) + m(w); return O.toLowerCase() }
306 |
307 |
308 |
309 |
310 | // prettier-ignore
311 |
312 | function Env(t, e) { "undefined" != typeof process && JSON.stringify(process.env).indexOf("GITHUB") > -1 && process.exit(0); 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.startTime = (new Date).getTime(), Object.assign(this, e), this.log("", `🔔${this.name}, 开始!`) } 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 } 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 = (() => { })) { 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) })) : 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))) : this.isNode() && (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: s, statusCode: i, headers: r, body: o } = t; e(null, { status: s, statusCode: i, headers: r, body: o }, o) }, t => { const { message: s, response: i } = t; e(s, i, i && i.body) })) } post(t, e = (() => { })) { 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.post(t, (t, s, i) => { !t && s && (s.body = i, s.statusCode = s.status), e(t, s, i) }); else if (this.isQuanX()) t.method = "POST", 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()) { this.initGotEnv(t); const { url: s, ...i } = t; this.got.post(s, i).then(t => { const { statusCode: s, statusCode: i, headers: r, body: o } = t; e(null, { status: s, statusCode: i, headers: r, body: o }, o) }, t => { const { message: s, response: i } = t; e(s, i, i && i.body) }) } } 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 = ["", "==============📣系统通知📣=============="]; 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("", `❗️${this.name}, 错误!`, t.stack) : this.log("", `❗️${this.name}, 错误!`, t) } wait(t) { return new Promise(e => setTimeout(e, t)) } done(t = {}) { const e = (new Date).getTime(), s = (e - this.startTime) / 1e3; this.log("", `🔔${this.name}, 结束! 🕛 ${s} 秒`), this.log(), (this.isSurge() || this.isQuanX() || this.isLoon()) && $done(t) } }(t, e) }
--------------------------------------------------------------------------------
/invalid/jieda/thank.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yml2213/javascript/183efd8c40788eaeb8b404a7810cc04fa0ee4423/invalid/jieda/thank.jpg
--------------------------------------------------------------------------------
/invalid/jzkg/jzkg.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yml2213/javascript/183efd8c40788eaeb8b404a7810cc04fa0ee4423/invalid/jzkg/jzkg.jpg
--------------------------------------------------------------------------------
/invalid/ks/2.16.3/11.js:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yml2213/javascript/183efd8c40788eaeb8b404a7810cc04fa0ee4423/invalid/ks/2.16.3/11.js
--------------------------------------------------------------------------------
/invalid/ks/2.16.3/kuaishou_dt_sig4_v1.jsc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yml2213/javascript/183efd8c40788eaeb8b404a7810cc04fa0ee4423/invalid/ks/2.16.3/kuaishou_dt_sig4_v1.jsc
--------------------------------------------------------------------------------
/invalid/ks/2.16.3/kuaishou_dt_sign_v2.jsc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yml2213/javascript/183efd8c40788eaeb8b404a7810cc04fa0ee4423/invalid/ks/2.16.3/kuaishou_dt_sign_v2.jsc
--------------------------------------------------------------------------------
/invalid/ksf/ksf.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yml2213/javascript/183efd8c40788eaeb8b404a7810cc04fa0ee4423/invalid/ksf/ksf.jpg
--------------------------------------------------------------------------------
/invalid/lmz/lmz.js:
--------------------------------------------------------------------------------
1 | /*
2 | cron "18 8 * * *" yml_javascript/lnz.js tag=狸猫赚, enabled=fglse
3 | 20220305 tom
4 | 2022-3-15 yml瞎改(账号密码登录)
5 | 不能签到了 可以禁用脚本了
6 |
7 | 软件名称:狸猫赚
8 | tom大佬邀请:下载地址:http://www.limaozhan.com/home/auth/registerr.html?i=12064
9 | 我的邀请: 下载地址:http://www.limaozhan.com/home/auth/registerr.html?i=13849
10 |
11 | 只写了签到,每天3毛,1元提现
12 | 感谢tom大佬的项目,感谢leaf大佬指导
13 |
14 | 注意事项 : 一定要仔细阅读一下内容
15 | =============青龙变量格式=============
16 | export yml_lmz_data='username=手机号&password=密码'
17 | 多账号使用 @ 分割;
18 | =============青龙变量实例=============
19 | 我觉得已经不需要例子了 填上账号密码再不回那就别薅羊毛了吧
20 | =============变量解释==========
21 | 手机号 密码 填入自己的数据就行
22 | =============变量获取==========
23 | 懒得写了,自己研究吧
24 | 不会的请百度或者群里求助:QQ群:884234287 tg:https://t.me/yml_tg
25 |
26 | */
27 | const $ = new Env('狸猫赚');
28 | const notify = $.isNode() ? require('./sendNotify') : '';
29 | let body = '';
30 | let web_yml_lmz_data = '';
31 |
32 | !(async () => {
33 | if ($.isNode()) {
34 | //$.isNode()环境执行部分 青龙执行
35 | if (!process.env.yml_lmz_data) {
36 | console.log(`\n【${$.name}】:未填写相应变量 yml_lmz_data`);
37 | return;
38 | }
39 | if (process.env.yml_lmz_data && process.env.yml_lmz_data.indexOf('@') > -1) {
40 | web_yml_lmz_data = process.env.yml_lmz_data.split('@');
41 | } else {
42 | web_yml_lmz_data = process.env.yml_lmz_data.split();
43 | }
44 | }
45 |
46 | console.log(`-------- 共 ${web_yml_lmz_data.length} 个账号 --------`)
47 | // console.log(web_yml_lmz_data)
48 | console.log(
49 | `\n\n====== 脚本执行 - 北京时间(UTC+8):${new Date(
50 | new Date().getTime() +
51 | new Date().getTimezoneOffset() * 60 * 1000 +
52 | 8 * 60 * 60 * 1000
53 | ).toLocaleString()} ======\n`);
54 |
55 |
56 | await wyy();
57 |
58 | for (i = 0; i < web_yml_lmz_data.length; i++) {
59 | $.index = i + 1;
60 | console.log(`\n====== 开始【第 ${$.index} 个账号】======`)
61 | // console.log(`这里是分割后:${web_yml_lmz_data}`);
62 | body = web_yml_lmz_data[i];
63 | // console.log(body)
64 |
65 | //执行任务
66 | await lmzdl();
67 | await $.wait(2 * 1000);
68 | await lmzqd();
69 | await $.wait(2 * 1000);
70 | }
71 |
72 | })()
73 | .catch((e) => $.logErr(e))
74 | .finally(() => $.done())
75 |
76 |
77 | //每日网抑云
78 | function wyy(timeout = 3 * 1000) {
79 | return new Promise((resolve) => {
80 | let url = {
81 | url: `https://keai.icu/apiwyy/api`
82 | }
83 | $.get(url, async (err, resp, data) => {
84 | try {
85 | data = JSON.parse(data)
86 | $.log(`\n【网抑云时间】: ${data.content} by--${data.music}`);
87 |
88 | } catch (e) {
89 | $.logErr(e, resp);
90 | } finally {
91 | resolve()
92 | }
93 | }, timeout)
94 | })
95 | }
96 |
97 |
98 |
99 | // 登录
100 | function lmzdl(timeout = 0) {
101 | return new Promise((resolve) => {
102 | let url = {
103 | url: 'https://www.limaozhan.com/home/auth/login.html',
104 | headers: {
105 | 'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8',
106 | 'X-Requested-With': 'XMLHttpRequest'
107 | },
108 | body: body,
109 |
110 | }
111 | // console.log(url);
112 |
113 | // console.log(result.headers['set-cookie'])
114 |
115 |
116 | $.post(url, async (err, resp, data) => {
117 |
118 | try {
119 | // console.log(`输出data开始===================`);
120 | // console.log(data);
121 | // console.log(`输出data结束===================`);
122 |
123 | result = JSON.parse(data);
124 |
125 | if (result.type == "success") {
126 | $.log(`\n【🎉🎉🎉 恭喜您鸭 🎉🎉🎉】登录状态: ${result.message} ✅ `)
127 | // await $.wait(3 * 1000)
128 | } else {
129 | $.log(`\n【🎉 恭喜个屁 🎉】登录状态:${result.message} `)
130 | }
131 | } catch (e) {
132 | $.logErr(e, resp);
133 | } finally {
134 | resolve()
135 | }
136 | }, timeout)
137 |
138 | })
139 | }
140 |
141 | // 签到
142 | // 取ck
143 | var request = require('request');
144 | let options = {
145 | 'method': 'POST',
146 | 'url': 'https://www.limaozhan.com/home/auth/login.html',
147 | 'headers': {
148 | 'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8',
149 | 'X-Requested-With': 'XMLHttpRequest'
150 | },
151 | body: body,
152 | };
153 | request(options, function (error, response) {
154 | if (error) throw new Error(error);
155 | cookie = response.headers['set-cookie']
156 | });
157 |
158 |
159 |
160 | function lmzqd(timeout = 0) {
161 |
162 | return new Promise((resolve) => {
163 | let url = {
164 | url: 'https://www.limaozhan.com/index.php/home/account/index',
165 | headers: {
166 | 'X-Requested-With': 'XMLHttpRequest',
167 | 'Cookie': cookie,
168 | },
169 | body: '',
170 |
171 | }
172 | // console.log(url);
173 |
174 | $.post(url, async (err, resp, data) => {
175 |
176 | try {
177 |
178 | // console.log(`输出data开始===================`);
179 | // console.log(data);
180 | // console.log(`输出data结束===================`);
181 |
182 | result = JSON.parse(data);
183 | if (result.type == "success") {
184 | $.log(`\n【🎉🎉🎉 恭喜您鸭 🎉🎉🎉】签到状态:(${result.message}) ✅ `)
185 | // await $.wait(3 * 1000)
186 | } else if (result.type == "error") {
187 | $.log(`\n【🎉 恭喜个屁 🎉】签到状态: ${result.message} `)
188 | } else {
189 | $.log(`\n【🎉 恭喜个屁 🎉】执行签到:失败 ❌ 了呢,原因未知! `)
190 | }
191 | } catch (e) {
192 | $.logErr(e, resp);
193 | } finally {
194 | resolve()
195 | }
196 | }, timeout)
197 |
198 | })
199 | }
200 |
201 |
202 |
203 |
204 |
205 |
206 |
207 | //固定板块,无需动
208 | function Env(t, e) {
209 | class s {
210 | constructor(t) {
211 | this.env = t
212 | }
213 |
214 | send(t, e = "GET") {
215 | t = "string" == typeof t ? { url: t } : t;
216 | let s = this.get;
217 | return "POST" === e && (s = this.post), new Promise((e, i) => {
218 | s.call(this, t, (t, s, r) => {
219 | t ? i(t) : e(s)
220 | })
221 | })
222 | }
223 |
224 | get(t) {
225 | return this.send.call(this.env, t)
226 | }
227 |
228 | post(t) {
229 | return this.send.call(this.env, t, "POST")
230 | }
231 | }
232 |
233 | return new class {
234 | constructor(t, e) {
235 | 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!`)
236 | }
237 |
238 | isNode() {
239 | return "undefined" != typeof module && !!module.exports
240 | }
241 |
242 | isQuanX() {
243 | return "undefined" != typeof $task
244 | }
245 |
246 | isSurge() {
247 | return "undefined" != typeof $httpClient && "undefined" == typeof $loon
248 | }
249 |
250 | isLoon() {
251 | return "undefined" != typeof $loon
252 | }
253 |
254 | isShadowrocket() {
255 | return "undefined" != typeof $rocket
256 | }
257 |
258 | toObj(t, e = null) {
259 | try {
260 | return JSON.parse(t)
261 | } catch {
262 | return e
263 | }
264 | }
265 |
266 | toStr(t, e = null) {
267 | try {
268 | return JSON.stringify(t)
269 | } catch {
270 | return e
271 | }
272 | }
273 |
274 | getjson(t, e) {
275 | let s = e;
276 | const i = this.getdata(t);
277 | if (i) try {
278 | s = JSON.parse(this.getdata(t))
279 | } catch {
280 | }
281 | return s
282 | }
283 |
284 | setjson(t, e) {
285 | try {
286 | return this.setdata(JSON.stringify(t), e)
287 | } catch {
288 | return !1
289 | }
290 | }
291 |
292 | getScript(t) {
293 | return new Promise(e => {
294 | this.get({ url: t }, (t, s, i) => e(i))
295 | })
296 | }
297 |
298 | runScript(t, e) {
299 | return new Promise(s => {
300 | let i = this.getdata("@chavy_boxjs_userCfgs.httpapi");
301 | i = i ? i.replace(/\n/g, "").trim() : i;
302 | let r = this.getdata("@chavy_boxjs_userCfgs.httpapi_timeout");
303 | r = r ? 1 * r : 20, r = e && e.timeout ? e.timeout : r;
304 | const [o, h] = i.split("@"), n = {
305 | url: `http://${h}/v1/scripting/evaluate`,
306 | body: { script_text: t, mock_type: "cron", timeout: r },
307 | headers: { "X-Key": o, Accept: "*/*" }
308 | };
309 | this.post(n, (t, e, i) => s(i))
310 | }).catch(t => this.logErr(t))
311 | }
312 |
313 | loaddata() {
314 | if (!this.isNode()) return {};
315 | {
316 | this.fs = this.fs ? this.fs : require("fs"), this.path = this.path ? this.path : require("path");
317 | const t = this.path.resolve(this.dataFile), e = this.path.resolve(process.cwd(), this.dataFile),
318 | s = this.fs.existsSync(t), i = !s && this.fs.existsSync(e);
319 | if (!s && !i) return {};
320 | {
321 | const i = s ? t : e;
322 | try {
323 | return JSON.parse(this.fs.readFileSync(i))
324 | } catch (t) {
325 | return {}
326 | }
327 | }
328 | }
329 | }
330 |
331 | writedata() {
332 | if (this.isNode()) {
333 | this.fs = this.fs ? this.fs : require("fs"), this.path = this.path ? this.path : require("path");
334 | const t = this.path.resolve(this.dataFile), e = this.path.resolve(process.cwd(), this.dataFile),
335 | s = this.fs.existsSync(t), i = !s && this.fs.existsSync(e), r = JSON.stringify(this.data);
336 | s ? this.fs.writeFileSync(t, r) : i ? this.fs.writeFileSync(e, r) : this.fs.writeFileSync(t, r)
337 | }
338 | }
339 |
340 | lodash_get(t, e, s) {
341 | const i = e.replace(/\[(\d+)\]/g, ".$1").split(".");
342 | let r = t;
343 | for (const t of i) if (r = Object(r)[t], void 0 === r) return s;
344 | return r
345 | }
346 |
347 | lodash_set(t, e, s) {
348 | 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)
349 | }
350 |
351 | getdata(t) {
352 | let e = this.getval(t);
353 | if (/^@/.test(t)) {
354 | const [, s, i] = /^@(.*?)\.(.*?)$/.exec(t), r = s ? this.getval(s) : "";
355 | if (r) try {
356 | const t = JSON.parse(r);
357 | e = t ? this.lodash_get(t, i, "") : e
358 | } catch (t) {
359 | e = ""
360 | }
361 | }
362 | return e
363 | }
364 |
365 | setdata(t, e) {
366 | let s = !1;
367 | if (/^@/.test(e)) {
368 | const [, i, r] = /^@(.*?)\.(.*?)$/.exec(e), o = this.getval(i),
369 | h = i ? "null" === o ? null : o || "{}" : "{}";
370 | try {
371 | const e = JSON.parse(h);
372 | this.lodash_set(e, r, t), s = this.setval(JSON.stringify(e), i)
373 | } catch (e) {
374 | const o = {};
375 | this.lodash_set(o, r, t), s = this.setval(JSON.stringify(o), i)
376 | }
377 | } else s = this.setval(t, e);
378 | return s
379 | }
380 |
381 | getval(t) {
382 | 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
383 | }
384 |
385 | setval(t, e) {
386 | 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
387 | }
388 |
389 | initGotEnv(t) {
390 | 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))
391 | }
392 |
393 | get(t, e = (() => {
394 | })) {
395 | 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) => {
396 | !t && s && (s.body = i, s.statusCode = s.status), e(t, s, i)
397 | }); else if (this.isQuanX()) this.isNeedRewrite && (t.opts = t.opts || {}, Object.assign(t.opts, { hints: !1 })), $task.fetch(t).then(t => {
398 | const { statusCode: s, statusCode: i, headers: r, body: o } = t;
399 | e(null, { status: s, statusCode: i, headers: r, body: o }, o)
400 | }, t => e(t)); else if (this.isNode()) {
401 | let s = require("iconv-lite");
402 | this.initGotEnv(t), this.got(t).on("redirect", (t, e) => {
403 | try {
404 | if (t.headers["set-cookie"]) {
405 | const s = t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString();
406 | s && this.ckjar.setCookieSync(s, null), e.cookieJar = this.ckjar
407 | }
408 | } catch (t) {
409 | this.logErr(t)
410 | }
411 | }).then(t => {
412 | const { statusCode: i, statusCode: r, headers: o, rawBody: h } = t;
413 | e(null, { status: i, statusCode: r, headers: o, rawBody: h }, s.decode(h, this.encoding))
414 | }, t => {
415 | const { message: i, response: r } = t;
416 | e(i, r, r && s.decode(r.rawBody, this.encoding))
417 | })
418 | }
419 | }
420 |
421 | post(t, e = (() => {
422 | })) {
423 | const s = t.method ? t.method.toLocaleLowerCase() : "post";
424 | 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) => {
425 | !t && s && (s.body = i, s.statusCode = s.status), e(t, s, i)
426 | }); else if (this.isQuanX()) t.method = s, this.isNeedRewrite && (t.opts = t.opts || {}, Object.assign(t.opts, { hints: !1 })), $task.fetch(t).then(t => {
427 | const { statusCode: s, statusCode: i, headers: r, body: o } = t;
428 | e(null, { status: s, statusCode: i, headers: r, body: o }, o)
429 | }, t => e(t)); else if (this.isNode()) {
430 | let i = require("iconv-lite");
431 | this.initGotEnv(t);
432 | const { url: r, ...o } = t;
433 | this.got[s](r, o).then(t => {
434 | const { statusCode: s, statusCode: r, headers: o, rawBody: h } = t;
435 | e(null, { status: s, statusCode: r, headers: o, rawBody: h }, i.decode(h, this.encoding))
436 | }, t => {
437 | const { message: s, response: r } = t;
438 | e(s, r, r && i.decode(r.rawBody, this.encoding))
439 | })
440 | }
441 | }
442 |
443 | time(t, e = null) {
444 | const s = e ? new Date(e) : new Date;
445 | let i = {
446 | "M+": s.getMonth() + 1,
447 | "d+": s.getDate(),
448 | "H+": s.getHours(),
449 | "m+": s.getMinutes(),
450 | "s+": s.getSeconds(),
451 | "q+": Math.floor((s.getMonth() + 3) / 3),
452 | S: s.getMilliseconds()
453 | };
454 | /(y+)/.test(t) && (t = t.replace(RegExp.$1, (s.getFullYear() + "").substr(4 - RegExp.$1.length)));
455 | 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)));
456 | return t
457 | }
458 |
459 | msg(e = t, s = "", i = "", r) {
460 | const o = t => {
461 | if (!t) return t;
462 | if ("string" == typeof t) return this.isLoon() ? t : this.isQuanX() ? { "open-url": t } : this.isSurge() ? { url: t } : void 0;
463 | if ("object" == typeof t) {
464 | if (this.isLoon()) {
465 | let e = t.openUrl || t.url || t["open-url"], s = t.mediaUrl || t["media-url"];
466 | return { openUrl: e, mediaUrl: s }
467 | }
468 | if (this.isQuanX()) {
469 | let e = t["open-url"] || t.url || t.openUrl, s = t["media-url"] || t.mediaUrl;
470 | return { "open-url": e, "media-url": s }
471 | }
472 | if (this.isSurge()) {
473 | let e = t.url || t.openUrl || t["open-url"];
474 | return { url: e }
475 | }
476 | }
477 | };
478 | if (this.isMute || (this.isSurge() || this.isLoon() ? $notification.post(e, s, i, o(r)) : this.isQuanX() && $notify(e, s, i, o(r))), !this.isMuteLog) {
479 | let t = ["", "==============\ud83d\udce3\u7cfb\u7edf\u901a\u77e5\ud83d\udce3=============="];
480 | t.push(e), s && t.push(s), i && t.push(i), console.log(t.join("\n")), this.logs = this.logs.concat(t)
481 | }
482 | }
483 |
484 | log(...t) {
485 | t.length > 0 && (this.logs = [...this.logs, ...t]), console.log(t.join(this.logSeparator))
486 | }
487 |
488 | logErr(t, e) {
489 | const s = !this.isSurge() && !this.isQuanX() && !this.isLoon();
490 | s ? this.log("", `\u2757\ufe0f${this.name}, \u9519\u8bef!`, t.stack) : this.log("", `\u2757\ufe0f${this.name}, \u9519\u8bef!`, t)
491 | }
492 |
493 | wait(t) {
494 | return new Promise(e => setTimeout(e, t))
495 | }
496 |
497 | done(t = {}) {
498 | const e = (new Date).getTime(), s = (e - this.startTime) / 1e3;
499 | this.log("", `\ud83d\udd14${this.name}, \u7ed3\u675f! \ud83d\udd5b ${s} \u79d2`), this.log(), (this.isSurge() || this.isQuanX() || this.isLoon()) && $done(t)
500 | }
501 | }(t, e)
502 | }
--------------------------------------------------------------------------------
/invalid/lvmiao/感谢您的支持.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yml2213/javascript/183efd8c40788eaeb8b404a7810cc04fa0ee4423/invalid/lvmiao/感谢您的支持.jpg
--------------------------------------------------------------------------------
/invalid/sbr/sbr.js:
--------------------------------------------------------------------------------
1 | /*
2 | 苏泊尔会员中心 小程序
3 | cron 10 7 * * * sbr.js
4 |
5 | 7.13 完成 签到, 偷大米, 浏览菜谱 任务
6 | 10.11 更新抽奖
7 | 12.24 改用 yml2213-utils 依赖
8 |
9 | ------------------------ 青龙--配置文件-贴心复制区域 ----------------------
10 | # 苏泊尔
11 | export sbr=" token & cookie @ token & cookie "
12 |
13 | 抓 api/login/auto-login 中的参数 token 跟cookie
14 | 多账号用 换行 或 @ 分割
15 |
16 | 报错的自己下载 utils.js 放在脚本同级目录下
17 | 报错的自己下载 utils.js 放在脚本同级目录下
18 | 报错的自己下载 utils.js 放在脚本同级目录下
19 |
20 | tg频道: https://t.me/yml2213_tg
21 |
22 | */
23 |
24 | const $ = new Env("苏泊尔");
25 | const alias_name = "sbr";
26 | const utils = require("yml2213-utils");
27 |
28 | const notify = $.isNode() ? require("./sendNotify") : "";
29 | const Notify = 1; //0为关闭通知,1为打开通知,默认为1
30 | //---------------------------------------------------------------------------------------------------------
31 | let ckStr = process.env[alias_name];
32 | let msg, ck;
33 | let ck_status = 1;
34 | //---------------------------------------------------------------------------------------------------------
35 | let VersionCheck = "0.4";
36 | let Change = "\n报错的自己下载 yml2213-utils 依赖";
37 | let thank = `\n感谢 心雨大佬脚本\n`;
38 | //---------------------------------------------------------------------------------------------------------
39 |
40 | async function tips(ckArr) {
41 | // let Version_latest = await Version_Check(alias_name, '1');
42 | let Version = `\n📌 本地脚本: V ${VersionCheck}`;
43 | DoubleLog(`${Version}\n📌 🆙 更新内容: ${Change}`);
44 | // DoubleLog(`${thank}`);
45 | await utils.yiyan()
46 | DoubleLog(`\n========== 共找到 ${ckArr.length} 个账号 ==========`);
47 | }
48 |
49 | async function start() {
50 | const sbr = new Sbr(ck[0], ck[1]);
51 | await sbr.init("初始化");
52 | await sbr.login("登录刷新");
53 | await sbr.user_info("用户信息");
54 | if (ck_status) {
55 | await sbr.sign_info("签到查询");
56 | await sbr.task_list("任务列表");
57 | await sbr.prize_Info("抽奖信息");
58 | await sbr.get_index_info("获取可收取大米信息");
59 | await sbr.rice_num("查询大米数量");
60 | }
61 | }
62 |
63 | let host, hostname, apiname, sbr_hd, _id, _list, _id_list, num, collect_name;
64 | class Sbr {
65 | constructor(token, cookie) {
66 | this.token = token;
67 | this.cookie = cookie;
68 | }
69 | // 初始化
70 | async init(name) {
71 | if (!name) {
72 | name = /function\s*(\w*)/i.exec(arguments.callee.toString())[1];
73 | }
74 | DoubleLog(`\n开始 ${name}`);
75 | host = "growrice.supor.com";
76 | hostname = "https://" + host;
77 | apiname = `${hostname}/rice/backend/public/index.php/api`
78 | sbr_hd = {
79 | "Content-Type": "application/x-www-form-urlencoded",
80 | 'Host': this.host,
81 | 'Cookie': this.cookie,
82 | }
83 | }
84 |
85 | // 登录 post
86 | async login(name) {
87 | let options = {
88 | method: "get",
89 | url: `${apiname}/login/auto-login?token=${this.token}`,
90 | headers: sbr_hd,
91 | };
92 | let result = await httpResult(name, options);
93 | }
94 |
95 | // 用户信息 httpGet
96 | async user_info(name) {
97 |
98 | let options = {
99 | method: "get",
100 | url: `${apiname}/users/get-user-info`,
101 | headers: sbr_hd,
102 | };
103 | let result = await httpResult(name, options);
104 |
105 | if (result.code == 1) {
106 | DoubleLog(`${name}: ${result.msg} , 欢迎 ${result.data.nickname}`);
107 | await utils.wait(2);
108 | } else if (result.code == 0) {
109 | DoubleLog(`${name}: ${result.msg}`);
110 | ck_status = 0
111 | } else {
112 | DoubleLog(`${name}: 失败 ❌ 了呢,原因未知!`);
113 | console.log(result);
114 | ck_status = 0
115 | }
116 | }
117 |
118 | // 签到信息 get
119 | async sign_info(name) {
120 | let options = {
121 | method: "get",
122 | url: `${apiname}/signIn/sign-list`,
123 | headers: sbr_hd,
124 | };
125 | let result = await httpResult(name, options);
126 |
127 | if (result.data.is_sign == false) {
128 | DoubleLog(`${name}: 未签到 ,去签到喽!`);
129 | await this.do_sign("签到")
130 | } else if (result.data.is_sign == true) {
131 | DoubleLog(`${name}: 已签到, 明天再来吧!`);
132 | } else {
133 | DoubleLog(`${name}: 失败 ❌ 了呢,原因未知!`);
134 | console.log(result);
135 | }
136 | }
137 |
138 |
139 |
140 | // 签到 post
141 | async do_sign(name) {
142 | let options = {
143 | method: "post",
144 | url: `${apiname}/signIn/sign`,
145 | headers: sbr_hd,
146 | body: `https://growrice.supor.com/rice/backend/public/index.php/api/signIn/sign`,
147 | };
148 | let result = await httpResult(name, options);
149 |
150 | if (result.code == 1) {
151 | DoubleLog(`${name}:${result.msg} ,获得 ${result.data.get_rice_num} 大米`);
152 | await utils.wait(3);
153 |
154 | } else if (result.code == 0) {
155 | DoubleLog(`${name}:${result.msg}`);
156 | } else {
157 | DoubleLog(`${name}: 失败❌了呢`);
158 | console.log(result);
159 | }
160 | }
161 |
162 |
163 | // 任务列表 get
164 | async task_list(name) {
165 | let options = {
166 | method: "get",
167 | url: `${apiname}/task/index`,
168 | headers: sbr_hd,
169 | };
170 | let result = await httpResult(name, options);
171 |
172 |
173 | // console.log(result);
174 | if (result.code == 1) {
175 | DoubleLog(`${name}:${result.msg}`);
176 | let tasks = result.data
177 | for (let index = 0; index < tasks.length; index++) {
178 | let _id, name, is_finish
179 | [_id, name, is_finish] = [tasks[index].id, tasks[index].name, tasks[index].is_finish]
180 |
181 | if (_id == 6 && is_finish == false) {
182 | await this.get_rice("偷大米")
183 | } else if (_id == 6 && is_finish == true) {
184 | DoubleLog(`今天无法偷大米了, 明天再来吧!`)
185 | }
186 | if (_id == 8 && tasks[index].list[0].is_finish == false) {
187 | await this.browse_recipes("浏览菜谱")
188 | } else if (_id == 8 && tasks[index].list[0].is_finish == true) {
189 | DoubleLog(`今天完成 浏览菜谱 了, 明天再来吧!`)
190 | }
191 |
192 |
193 | }
194 | } else if (result.code == 0) {
195 | DoubleLog(`${name}:${result.msg}`);
196 | } else {
197 | DoubleLog(`${name}: 失败❌了呢`);
198 | console.log(result);
199 | }
200 | }
201 |
202 | // 偷好友大米
203 | async get_rice(name) {
204 | await this.get_id("获取好友大米id")
205 | for (let index = 0; index < _id_list.length; index++) {
206 | let _id = _id_list[index]
207 | let options = {
208 | method: "post",
209 | url: `${apiname}/users/get-rice`,
210 | headers: sbr_hd,
211 | body: `&friend_id=${_id}`,
212 | };
213 | let result = await httpResult(name, options);
214 |
215 | if (result.code == 1) {
216 | DoubleLog(`${name}:${result.msg} , 当前已有 ${result.data.sign_rice_num} 大米`);
217 | await utils.wait(5);
218 | } else if (result.code == 0) {
219 | DoubleLog(`${name}:${result.msg}`);
220 | } else {
221 | DoubleLog(`${name}: 失败❌了呢`);
222 | console.log(result);
223 | }
224 |
225 | }
226 |
227 | }
228 |
229 |
230 | // 获取好友大米id
231 | async get_id(name) {
232 | let options = {
233 | method: "get",
234 | url: `${apiname}/users/same-city-list`,
235 | headers: sbr_hd,
236 | };
237 | let result = await httpResult(name, options);
238 |
239 | // console.log(result);
240 | if (result.code == 1) {
241 | _list = result.data
242 | // console.log(_list);
243 |
244 | let arr1 = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9];
245 | let out = [];
246 | for (let i = 0; i < 3; i++) {
247 | var index = parseInt(Math.random() * arr1.length);
248 | out = out.concat(arr1.splice(index, 1));
249 | }
250 | // console.log(out);
251 | _id_list = []
252 | for (let index = 0; index < out.length; index++) {
253 | let _id = _list[out[index]].id
254 | _id_list.push(_id)
255 | }
256 | // console.log(_id_list);
257 |
258 | return _id_list;
259 | } else {
260 | DoubleLog(`${name}: 失败❌了呢`);
261 | console.log(result);
262 | }
263 | }
264 |
265 | // 浏览菜谱 https://growrice.supor.com/rice/backend/public/index.php/api/task/link-task
266 | async browse_recipes(name) {
267 | let options = {
268 | method: "post",
269 | url: `${apiname}/task/link-task`,
270 | headers: sbr_hd,
271 | body: `&id=8&other_id=3`,
272 | };
273 | let result = await httpResult(name, options);
274 |
275 | // console.log(result);
276 | if (result.code == 1) {
277 | DoubleLog(`${name}:${result.msg}`);
278 | await utils.wait(3)
279 | } else {
280 | DoubleLog(`${name}: 失败❌了呢`);
281 | console.log(result);
282 | }
283 | }
284 |
285 | // 获取可收取大米信息 get
286 | async get_index_info(name) {
287 | let options = {
288 | method: "get",
289 | url: `${apiname}/index/index`,
290 | headers: sbr_hd,
291 | };
292 | let result = await httpResult(name, options);
293 |
294 | // console.log(result);
295 | let rice_list = result.data.rice_list
296 | if (result.code == 1 && rice_list.length > 0) {
297 | for (let index = 0; index < rice_list.length; index++) {
298 | [_id, num, collect_name] = [rice_list[index].id, rice_list[index].num, rice_list[index].name]
299 | await this.collect_rice("收大米", _id, num, collect_name)
300 | }
301 | } else if (result.code == 1 && rice_list.length == 0) {
302 | DoubleLog(`${name}, 没有可以收获的大米`)
303 |
304 | } else if (result.code == 2) {
305 | DoubleLog(`${result['msg']}, 请自己先打开一次小程序,种大米后在执行脚本!`)
306 | } else {
307 | DoubleLog(`${name}: 失败❌了呢`);
308 | console.log(result);
309 | }
310 | }
311 |
312 | // 收大米
313 | async collect_rice(name, _id, num, collect_name) {
314 | let options = {
315 | method: "post",
316 | url: `${apiname}/index/collect-rice`,
317 | headers: sbr_hd,
318 | body: `&id=${_id}`,
319 | };
320 | let result = await httpResult(name, options);
321 |
322 | // console.log(result);
323 | if (result.code == 1) {
324 | DoubleLog(`${name}: 收取 ${collect_name} ${num} 大米, ${result.msg}`);
325 | await utils.wait(5)
326 | } else if (result.code == 0) {
327 | DoubleLog(`${name}: ${result.msg}`);
328 | } else {
329 | DoubleLog(`${name}: 失败❌了呢`);
330 | console.log(result);
331 | }
332 | }
333 |
334 | // 抽奖信息 get
335 | async prize_Info(name) {
336 | let options = {
337 | method: "get",
338 | url: `${apiname}/prize/index`,
339 | headers: sbr_hd,
340 | };
341 | let result = await httpResult(name, options);
342 |
343 | // console.log(result);
344 | if (result.code == 1) {
345 | DoubleLog(`${name}, 抽奖券${result.data.draw_num_1}张, 高级抽奖券${result.data.draw_num_2}张`)
346 | if (result.data.draw_num_1 > 0) {
347 | await this.prize('普通抽奖', '1')
348 | }
349 | if (result.data.draw_num_2 > 0) {
350 | await this.prize('高级抽奖', '2')
351 | }
352 | if (result.data.draw_num_1 == 0 && result.data.draw_num_2 == 0) {
353 | DoubleLog(`${name}:暂时无抽奖次数!`)
354 | }
355 |
356 | } else {
357 | DoubleLog(`${name}: 失败❌了呢`);
358 | console.log(result);
359 | }
360 | }
361 |
362 | // 抽奖 https://growrice.supor.com/rice/backend/public/index.php/api/prize/draw
363 | async prize(name, type) {
364 | let options = {
365 | method: "post",
366 | url: `${apiname}/prize/draw`,
367 | headers: sbr_hd,
368 | body: `cate=${type}`,
369 | };
370 | let result = await httpResult(name, options);
371 |
372 | // console.log(result);
373 | if (result.code == 1) {
374 | let prize_info = result.data.prize_info
375 | DoubleLog(`${name}: 获得 ${prize_info.prize_name} , 奖品id: ${prize_info.prize_id}, 奖品类型: ${prize_info.prize_type}, 奖品数量: ${prize_info.prize_value}`);
376 | await utils.wait(5)
377 | await this.prize_Info('抽奖信息')
378 | } else if (result.code == 0) {
379 | DoubleLog(`${name}: ${result.msg}`);
380 | await this.prize_Info('抽奖信息')
381 | } else {
382 | DoubleLog(`${name}: 失败❌了呢`);
383 | console.log(result);
384 | }
385 | }
386 |
387 |
388 | // 查询大米数量 get https://growrice.supor.com/rice/backend/public/index.php/api/index/granary?&page=1&pagesize=10
389 | async rice_num(name) {
390 | let options = {
391 | method: "get",
392 | url: `${apiname}/index/granary?&page=1&pagesize=10`,
393 | headers: sbr_hd,
394 | };
395 | let result = await httpResult(name, options);
396 |
397 | // console.log(result);
398 | if (result.code == 1) {
399 | DoubleLog(`${name}, 现在有${result.data.rice_num} 大米 , 累计获取 ${result.data.total_num} 大米`)
400 | } else {
401 | DoubleLog(`${name}: 失败❌了呢`);
402 | console.log(result);
403 | }
404 | }
405 |
406 |
407 | }
408 |
409 |
410 |
411 |
412 |
413 |
414 |
415 |
416 |
417 |
418 |
419 |
420 |
421 |
422 |
423 | // #region ******************************************************** 固定代码 ********************************************************
424 |
425 | /**
426 | * 账号处理
427 | */
428 | !(async () => {
429 | let ckArr = await utils.checkEnv(ckStr, alias_name);
430 | await tips(ckArr);
431 | for (let index = 0; index < ckArr.length; index++) {
432 | let num = index + 1;
433 | DoubleLog(`\n-------- 开始【第 ${num} 个账号】--------`);
434 | ck = ckArr[index].split("&");
435 | await start();
436 | }
437 | await SendMsg(msg);
438 | })()
439 | .catch((e) => console.log(e))
440 | .finally(() => $.done());
441 |
442 |
443 | function Env(name, e) { class s { constructor(name) { this.env = name; } } return new (class { constructor(name) { (this.name = name), (this.logs = []), (this.startTime = new Date().getTime()), this.log(`\n🔔${this.name}, 开始!`); } isNode() { return "undefined" != typeof module && !!module.exports; } log(...name) { name.length > 0 && (this.logs = [...this.logs, ...name]), console.log(name.join(this.logSeparator)); } done() { const e = new Date().getTime(), s = (e - this.startTime) / 1e3; this.log(`\n🔔${this.name}, 结束! 🕛 ${s} 秒`); } })(name, e); } async function httpResult(name, options) { if (!name) { name = /function\s*(\w*)/i.exec(arguments.callee.toString())[1]; } try { let result = await utils.httpRequest(name, options); if (result) { return result; } { DoubleLog(`未知错误(1)`); } } catch (error) { console.log(error); } } async function SendMsg(message) { if (!message) return; if (Notify > 0) { if ($.isNode()) { var notify = require("./sendNotify"); await notify.sendNotify($.name, message); } else { console.log($.name, "", message); } } else { console.log(message); } } function wait(n) { return new Promise(function (resolve) { setTimeout(resolve, n * 1000); }); } function DoubleLog(data) { console.log(` ${data}`); msg += `\n ${data}`; }
444 | //#endregion
445 |
--------------------------------------------------------------------------------
/invalid/shgjgf/shgjgf.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yml2213/javascript/183efd8c40788eaeb8b404a7810cc04fa0ee4423/invalid/shgjgf/shgjgf.jpg
--------------------------------------------------------------------------------
/invalid/tlm/感谢支持.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yml2213/javascript/183efd8c40788eaeb8b404a7810cc04fa0ee4423/invalid/tlm/感谢支持.jpg
--------------------------------------------------------------------------------
/invalid/tzh/tzh.js:
--------------------------------------------------------------------------------
1 | /*
2 | 碳账户 小程序
3 |
4 | cron 10 8,10,12 * * * tzh.js
5 |
6 | ========= 青龙--配置文件--贴心复制区域 =========
7 | # 碳账户
8 | export tzh='Authorization'
9 |
10 | 抓包 arbon-account-server.carbonstop.net 找到 Authorization 就行
11 |
12 | 10-21 完成基本任务, 自动提现
13 | 12-24 改用 yml2213-utils 依赖
14 |
15 | 多账号用 换行 或 @ 分割
16 | tg频道: https://t.me/yml2213_tg
17 | */
18 |
19 |
20 |
21 | const $ = new Env("碳账户");
22 | const ckName = "tzh";
23 | const utils = require("yml2213-utils");
24 | //---------------------------------------------------------
25 | const notify = $.isNode() ? require("./sendNotify") : "";
26 | const Notify = 1; //0为关闭通知,1为打开通知,默认为1
27 | let envSplitor = ["@", "\n"];
28 | let ck = (msg = "");
29 | let host, hostname, httpRequest;
30 | let userCookie = process.env[ckName];
31 | let userList = [];
32 | let userIdx = 0;
33 | let userCount = 0;
34 | //---------------------------------------------------------
35 |
36 | let text = (sign = "");
37 | //---------------------------------------------------------
38 |
39 | async function start() {
40 |
41 | for (let user of userList) {
42 | console.log("\n================== 用户信息 ==================\n");
43 | await user.user_info('用户信息')
44 | console.log("\n================== 任务列表 ==================\n");
45 | await user.task_list('任务列表')
46 | console.log("\n================== 库存 ==================\n");
47 | await user.goods('库存')
48 |
49 | }
50 |
51 |
52 | }
53 |
54 | class UserInfo {
55 | constructor(str) {
56 | this.index = ++userIdx;
57 | this.token = str;
58 | }
59 |
60 |
61 | async user_info(n) {
62 | let options = {
63 | method: "get",
64 | url: `https://carbon-account-server.carbonstop.net/user/info`,
65 | headers: {
66 | 'authorization': this.token,
67 | 'charset': 'utf-8',
68 | 'content-type': 'application/json'
69 | },
70 | };
71 | let result = await httpResult(n, options);
72 | if (result.code == 200) {
73 |
74 | this.realName = result.data.realName
75 | this.mobile = result.data.mobile
76 | this.currScore = result.data.currScore
77 | this.totalScore = result.data.totalScore
78 |
79 |
80 | DoubleLog(`账号[${this.index}] ${n}: ${this.realName}, 手机号${utils.phone_num(this.mobile)}, 当前${this.currScore}积分, 累计${this.totalScore}积分`);
81 |
82 | } else {
83 | DoubleLog(`账号[${this.index}] ${n} 失败❌了呢`);
84 | console.log(result);
85 | }
86 | }
87 |
88 | async task_list(name) {
89 | let options = {
90 | method: "get",
91 | url: `https://carbon-account-server.carbonstop.net/task/list_new`,
92 | headers: {
93 | 'authorization': this.token,
94 | 'charset': 'utf-8',
95 | 'content-type': 'application/json'
96 | }
97 | };
98 |
99 | let result = await httpResult(name, options);
100 | if (result.code == 200) {
101 | let tasks = result.data;
102 | // console.log(tasks);
103 | for (const task of tasks) {
104 | // console.log(task.taskList);
105 | for (const i of task.taskList) {
106 | console.log(i.sceneName);
107 | this.name = i.sceneName
108 | this.id = i.id
109 | this.sceneCode = i.sceneCode
110 | let num = utils.randomInt(10, 100)
111 | await this.do_task(this.name, this.id, this.sceneCode, num)
112 | }
113 | }
114 |
115 | } else {
116 | DoubleLog(`账号[${this.index}] ${name} 失败❌了呢`);
117 | console.log(result);
118 | }
119 | }
120 |
121 | // 低碳出行 do_task
122 | async do_task(n, id, t, num) {
123 | if (id == 119) num == utils.randomInt(30, 50) //双面打印
124 | if (id == 121) num == 1 //出差-自带洗漱用品
125 | if (id == 118) num == 2 //午休熄屏
126 |
127 | let options = {
128 | method: "post",
129 | url: `https://carbon-account-server.carbonstop.net/task/complete`,
130 | headers: {
131 | 'authorization': this.token,
132 | 'charset': 'utf-8',
133 | 'content-type': 'application/json'
134 | },
135 | body: JSON.stringify({
136 | "sceneCode": t,
137 | "value": num
138 | })
139 |
140 | };
141 | let result = await httpResult(n, options);
142 | if (result.code == 200) DoubleLog(`账号[${this.index}] ${n}: ok`), await utils.wait(3);
143 | else if (result.code == 500) DoubleLog(`账号[${this.index}] ${n}: ${result.msg}`);
144 | else DoubleLog(`账号[${this.index}] ${n} 失败❌了呢`), console.log(result)
145 |
146 | }
147 |
148 |
149 | async goods(n) {
150 | let options = {
151 | method: "get",
152 | url: `https://carbon-account-server.carbonstop.net/mall/goods/page?pageNo=1&pageSize=10`,
153 | headers: {
154 | 'authorization': this.token,
155 | 'charset': 'utf-8',
156 | 'content-type': 'application/json'
157 | },
158 |
159 | };
160 | let result = await httpResult(n, options);
161 | if (result.code == 200) {
162 | let tasks = result.data.list;
163 | // console.log(tasks);
164 | for (const task of tasks) {
165 | // console.log(task);
166 | this.goodsName = task.goodsName
167 | this.score = task.score
168 | this.id = task.id
169 | this.amount = task.amount
170 | this.usableAmount = task.usableAmount
171 | DoubleLog(`账号[${this.index}] ${n}: ${this.goodsName}--${this.score}积分, 库存${this.amount}, 今日可兑换${this.usableAmount}次`);
172 | if (this.currScore >= 1000 && this.currScore < 2000 && this.usableAmount > 0 && this.amount > 0) {
173 | if (this.usableAmount == 2) {
174 | await this.cash(`提现${this.goodsName}`, this.id)
175 | await wait(5)
176 | await this.cash(`提现${this.goodsName}`, this.id)
177 |
178 | } else if (this.usableAmount == 1) {
179 | await this.cash(`提现${this.goodsName}`, this.id)
180 | }
181 | } else if (this.currScore >= 2000 && this.currScore < 29999 && this.usableAmount > 0 && this.amount > 0) {
182 | if (this.usableAmount == 2) {
183 | await this.cash(`提现${this.goodsName}`, this.id)
184 | await wait(5)
185 | await this.cash(`提现${this.goodsName}`, this.id)
186 |
187 | } else if (this.usableAmount == 1) {
188 | await this.cash(`提现${this.goodsName}`, this.id)
189 | }
190 | } else {
191 | DoubleLog(`您只有${this.currScore}积分,攒攒再来吧!`)
192 | }
193 | }
194 |
195 | } else {
196 | DoubleLog(`账号[${this.index}] ${n} 失败❌了呢`);
197 | console.log(result);
198 | }
199 | }
200 |
201 | async cash(n, id) {
202 | let options = {
203 | method: "post",
204 | url: `https://carbon-account-server.carbonstop.net/mall/order`,
205 | headers: {
206 | 'authorization': this.token,
207 | 'charset': 'utf-8',
208 | 'content-type': 'application/json'
209 | },
210 | body: JSON.stringify({
211 | "amount": 1,
212 | "goodsId": id
213 | })
214 |
215 | };
216 | let result = await httpResult(n, options);
217 | if (result.code == 200) {
218 | DoubleLog(`账号[${this.index}] ${n}: ${result.msg}`);
219 | } else {
220 | DoubleLog(`账号[${this.index}] ${n} 失败❌了呢`);
221 | console.log(result);
222 | }
223 | }
224 | }
225 |
226 |
227 |
228 |
229 |
230 |
231 | !(async () => {
232 | if (!(await checkEnv())) return;
233 | if (userList.length > 0) {
234 | await start();
235 | }
236 | await SendMsg(msg);
237 | })()
238 | .catch((e) => console.log(e))
239 | .finally(() => $.done());
240 |
241 | ///////////////////////////////////////////////////////////////////
242 |
243 | // #region ******************************************************** 固定代码 ********************************************************
244 |
245 | // 变量检查与处理
246 | async function checkEnv() {
247 | if (userCookie) {
248 | // console.log(userCookie);
249 | let e = envSplitor[0];
250 | for (let o of envSplitor)
251 | if (userCookie.indexOf(o) > -1) {
252 | e = o;
253 | break;
254 | }
255 | for (let n of userCookie.split(e)) n && userList.push(new UserInfo(n));
256 | userCount = userList.length;
257 | } else {
258 | console.log("未找到CK");
259 | return;
260 | }
261 | return console.log(`共找到${userCount}个账号`), !0;
262 | }
263 |
264 |
265 | function Env(name, e) { class s { constructor(name) { this.env = name; } } return new (class { constructor(name) { (this.name = name), (this.logs = []), (this.startTime = new Date().getTime()), this.log(`\n🔔${this.name}, 开始!`); } isNode() { return "undefined" != typeof module && !!module.exports; } log(...name) { name.length > 0 && (this.logs = [...this.logs, ...name]), console.log(name.join(this.logSeparator)); } done() { const e = new Date().getTime(), s = (e - this.startTime) / 1e3; this.log(`\n🔔${this.name}, 结束! 🕛 ${s} 秒`); } })(name, e); } async function httpResult(name, options) { if (!name) { name = /function\s*(\w*)/i.exec(arguments.callee.toString())[1]; } try { let result = await utils.httpRequest(name, options); if (result) { return result; } { DoubleLog(`未知错误(1)`); } } catch (error) { console.log(error); } } async function SendMsg(message) { if (!message) return; if (Notify > 0) { if ($.isNode()) { var notify = require("./sendNotify"); await notify.sendNotify($.name, message); } else { console.log($.name, "", message); } } else { console.log(message); } } function wait(n) { return new Promise(function (resolve) { setTimeout(resolve, n * 1000); }); } function DoubleLog(data) { console.log(` ${data}`); msg += `\n ${data}`; }
266 |
267 | //#endregion
268 |
--------------------------------------------------------------------------------
/invalid/wxwp/wxwp.js:
--------------------------------------------------------------------------------
1 | /**
2 | * 微笑趣泡
3 | * cron 18 7 * * * yml2213_javascript_master/wxwp.js
4 | *
5 | * 微笑趣泡 微信小程序
6 | * 3-27 签到任务 、 分享小程序 点赞 完成 有效期测试中 已稳定2天
7 | * 感谢所有测试人员
8 | * ========= 青龙--配置文件 =========
9 | * 变量格式: export wxwpCookies='账号1 user_id的值 @ 账号2 user_id的值' 多个账号用 @分割
10 | * bublysmile.com 关键词 user_id在body中 基本每个包都有变量
11 | *
12 | * 还是不会的请百度或者群里求助:QQ群:884234287 tg:https://t.me/yml_tg
13 | */
14 |
15 | const $ = new Env("微笑趣泡");
16 | const notify = $.isNode() ? require('./sendNotify') : '';
17 | const Notify = 1; //0为关闭通知,1为打开通知,默认为1
18 | const debug = 0; //0为关闭调试,1为打开调试,默认为0
19 |
20 |
21 | let wxwpCookies = ($.isNode() ? process.env.wxwpCookies : $.getdata('wxwpCookies')) || "";
22 | let wxwpCookiesArr = [];
23 | let msg = '';
24 | let UA = 'Mozilla/5.0 (iPhone; CPU iPhone OS 15_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 MicroMessenger/8.0.18(0x1800123a) NetType/WIFI Language/zh_CN'
25 | let request_url = {
26 | url: 'https://mspace.gmmc.com.cn/',
27 | headers: {
28 | "Accept-Encoding": "gzip,compress,br,deflate",
29 | "Connection": "keep-alive",
30 | // "Content-Length": "281",
31 | "Host": "bublysmile.com",
32 | "Referer": "https://servicewechat.com/wx386dc9241cd9f748/27/page-frame.html",
33 | "User-Agent": `${UA}`,
34 | "content-type": "application/x-www-form-urlencoded",
35 | },
36 | body: ''
37 | }
38 |
39 |
40 | !(async () => {
41 |
42 | if (!(await Envs())) //多账号分割 判断变量是否为空 初步处理多账号
43 | return;
44 | else {
45 |
46 | console.log(
47 | `\n\n========================================= 脚本执行 - 北京时间(UTC+8):${new Date(
48 | new Date().getTime() +
49 | new Date().getTimezoneOffset() * 60 * 1000 +
50 | 8 * 60 * 60 * 1000
51 | ).toLocaleString()} =========================================\n`);
52 |
53 |
54 | await wyy();
55 | await $.wait(2 * 1000);
56 |
57 |
58 | $.log(`\n=================== 共找到 ${wxwpCookiesArr.length} 个账号 ===================`)
59 |
60 | if (debug) {
61 | console.log(`【debug】 这是你的账号数组:\n ${wxwpCookiesArr}`);
62 | }
63 |
64 | if (debug) {
65 | console.log(`\n【debug】 这是你的UA数据:\n ${UA}\n`);
66 | }
67 |
68 | for (let index = 0; index < wxwpCookiesArr.length; index++) {
69 |
70 |
71 | let num = index + 1
72 | $.log(`\n========= 开始【第 ${num} 个账号】=========\n`)
73 | msg += `\n【第 ${num} 个账号】`
74 | let user_id = wxwpCookiesArr[index]
75 | if (debug) {
76 | console.log(`\n【debug】 这是你第 ${num} 账号信息:\n user_id:${user_id}\n`);
77 | }
78 |
79 |
80 | $.log('开始 【签到】')
81 | await sign(user_id);
82 | await $.wait(2 * 1000);
83 |
84 |
85 | $.log('开始 【分享小程序】')
86 | await ShareApplet(user_id)
87 | await $.wait(3 * 1000);
88 |
89 |
90 | $.log('开始 【获取笑点列表】')
91 | await getJokeList(user_id)
92 | await $.wait(2 * 1000);
93 |
94 |
95 | $.log('开始 【点赞笑点】')
96 | await addLikeRec(user_id)
97 | await $.wait(2 * 1000);
98 |
99 |
100 | }
101 | await SendMsg(msg);
102 |
103 | }
104 |
105 | })()
106 | .catch((e) => $.logErr(e))
107 | .finally(() => $.done())
108 |
109 | //#region 固定代码
110 | // ============================================变量检查============================================ \\
111 | async function Envs() {
112 | if (wxwpCookies) {
113 | if (wxwpCookies.indexOf("@") != -1) {
114 | wxwpCookies.split("@").forEach((item) => {
115 | wxwpCookiesArr.push(item);
116 | });
117 | } else {
118 | wxwpCookiesArr.push(wxwpCookies);
119 | }
120 | } else {
121 | $.log(`\n【${$.name}】:未填写变量 wxwpCookies`)
122 | return;
123 | }
124 |
125 | return true;
126 | }
127 |
128 | // ============================================发送消息============================================ \\
129 | async function SendMsg(message) {
130 | if (!message)
131 | return;
132 |
133 | if (Notify > 0) {
134 | if ($.isNode()) {
135 | var notify = require('./sendNotify');
136 | await notify.sendNotify($.name, message);
137 | } else {
138 | $.msg(message);
139 | }
140 | } else {
141 | console.log(message);
142 | }
143 | }
144 |
145 | /**
146 | * 随机数生成
147 | */
148 | function randomString(e) {
149 | e = e || 32;
150 | var t = "QWERTYUIOPASDFGHJKLZXCVBNM1234567890",
151 | a = t.length,
152 | n = "";
153 | for (i = 0; i < e; i++)
154 | n += t.charAt(Math.floor(Math.random() * a));
155 | return n
156 | }
157 |
158 | /**
159 | * 随机整数生成
160 | */
161 | function randomInt(min, max) {
162 | return Math.round(Math.random() * (max - min) + min)
163 | }
164 |
165 | //每日网抑云
166 | function wyy(timeout = 3 * 1000) {
167 | return new Promise((resolve) => {
168 | let url = {
169 | url: `https://keai.icu/apiwyy/api`
170 | }
171 | $.get(url, async (err, resp, data) => {
172 | try {
173 | data = JSON.parse(data)
174 | $.log(`\n【网抑云时间】: ${data.content} by--${data.music}`);
175 |
176 | } catch (e) {
177 | $.logErr(e, resp);
178 | } finally {
179 | resolve()
180 | }
181 | }, timeout)
182 | })
183 | }
184 |
185 | //#endregion
186 |
187 |
188 |
189 |
190 | /**
191 | * 签到
192 | * https://bublysmile.com/Cg/Itf/Java/CmnMisItf.jsp?ItfName=addTaskExecuteRec&method=GetSqlData
193 | */
194 | function sign(user_id, timeout = 3 * 1000) {
195 | request_url.url = 'https://bublysmile.com/Cg/Itf/Java/CmnMisItf.jsp?ItfName=addTaskExecuteRec&method=GetSqlData'
196 | request_url.body = `user_id=${user_id}&task_key=CheckIn`
197 |
198 |
199 |
200 | return new Promise((resolve) => {
201 |
202 | if (debug) {
203 | console.log(`\n【debug】=============== 这是 签到 请求 url ===============`);
204 | console.log(request_url);
205 | }
206 |
207 | $.post(request_url, async (error, response, data) => {
208 | try {
209 | if (debug) {
210 | console.log(`\n\n【debug】===============这是 签到 返回data==============`);
211 | console.log(data)
212 | }
213 | let result = JSON.parse(data);
214 | if (result.IsSuccess == "1") {
215 |
216 | console.log(`\n【签到】成功了🎉 ,获得笑点${result.get_points} 个 , 签到后共有 ${result.total_points} 个笑点, 既然生活那么苦了,那就多笑笑鸭!`)
217 | msg += `\n【签到】成功了🎉 ,获得笑点${result.get_points} 个 , 签到后共有 ${result.total_points} 个笑点, 既然生活那么苦了,那就多笑笑鸭!`
218 | $.msg(`\n【签到】成功了🎉 ,获得笑点${result.get_points} 个 , 签到后共有 ${result.total_points} 个笑点, 既然生活那么苦了,那就多笑笑鸭!`)
219 |
220 | } else if (result.IsSuccess === "0") {
221 |
222 | $.log(`\n【签到】 失败 ,可能是:签到 ${result.ErrMsg}!\n `)
223 | msg += `\n【签到】 失败 ,可能是:签到 ${result.ErrMsg}!\n`
224 | $.msg(`【${$.name}】 【签到】:签到 ${result.ErrMsg}`)
225 |
226 | } else {
227 |
228 | $.log(`\n【签到】 失败 ❌ 了呢,可能是网络被外星人抓走了!\n `)
229 | msg += `\n【签到】 失败 ❌ 了呢,可能是网络被外星人抓走了!\n`
230 | $.msg(`【${$.name}】 【签到】: 失败 ❌ 了呢,可能是网络被外星人抓走了!`)
231 |
232 | }
233 |
234 | } catch (e) {
235 | console.log(e)
236 | } finally {
237 | resolve();
238 | }
239 | }, timeout)
240 | })
241 | }
242 |
243 |
244 | /**
245 | * 分享小程序
246 | * https://bublysmile.com/Cg/Itf/Java/CmnMisItf.jsp?ItfName=addShareRec&method=GetSqlData
247 | */
248 | function ShareApplet(user_id, timeout = 3 * 1000) {
249 | request_url.url = 'https://bublysmile.com/Cg/Itf/Java/CmnMisItf.jsp?ItfName=addShareRec&method=GetSqlData'
250 | request_url.body = `user_id=${user_id}&task_key=ShareApplet`
251 |
252 | return new Promise((resolve) => {
253 |
254 | if (debug) {
255 | console.log(`\n【debug】=============== 这是 分享小程序 请求 url ===============`);
256 | console.log(request_url);
257 | }
258 |
259 | $.post(request_url, async (error, response, data) => {
260 | try {
261 | if (debug) {
262 | console.log(`\n\n【debug】===============这是 分享小程序 返回data==============`);
263 | console.log(data)
264 | }
265 | let result = JSON.parse(data);
266 | if (result.overage) {
267 |
268 | console.log(`\n【分享小程序】成功了🎉 ,获得笑点${result.get_points} 个 , 分享后共有 ${result.total_points} 个笑点, 既然生活那么苦了,那就多笑笑鸭!`)
269 | msg += `\n【分享小程序】成功了🎉 ,获得笑点${result.get_points} 个 , 分享后共有 ${result.total_points} 个笑点, 既然生活那么苦了,那就多笑笑鸭!`
270 | $.msg(`\n【分享小程序】成功了🎉 ,获得笑点${result.get_points} 个 , 分享后共有 ${result.total_points} 个笑点, 既然生活那么苦了,那就多笑笑鸭!`)
271 |
272 | } else {
273 |
274 | $.log(`\n【分享小程序】 失败 ❌ 了呢,可能已经分享过了或者网络被外星人抓走了!\n `)
275 | msg += `\n【分享小程序】 失败 ❌ 了呢,可能已经分享过了或者网络被外星人抓走了!\n`
276 | $.msg(`【${$.name}】 【分享小程序】 失败 ❌ 了呢,可能已经分享过了或者网络被外星人抓走了!`)
277 |
278 | }
279 |
280 | } catch (e) {
281 | console.log(e)
282 | } finally {
283 | resolve();
284 | }
285 | }, timeout)
286 | })
287 | }
288 |
289 |
290 |
291 |
292 | /**
293 | * 获取笑点列表
294 | * https://bublysmile.com/Cg/Itf/Java/CmnMisItf.jsp?ItfName=getJokeList&method=GetSqlData
295 | */
296 | function getJokeList(user_id, timeout = 3 * 1000) {
297 | request_url.url = 'https://bublysmile.com/Cg/Itf/Java/CmnMisItf.jsp?ItfName=getJokeList&method=GetSqlData'
298 | request_url.body = `user_id=${user_id}&list_type=normal&CurPage=1&PageSize=10`
299 |
300 | return new Promise((resolve) => {
301 |
302 | if (debug) {
303 | console.log(`\n【debug】=============== 这是 获取笑点列表 请求 url ===============`);
304 | console.log(request_url);
305 | }
306 |
307 | $.post(request_url, async (error, response, data) => {
308 | try {
309 | if (debug) {
310 | console.log(`\n\n【debug】===============这是 获取笑点列表 返回data==============`);
311 | console.log(data)
312 | // console.log(`======`)
313 | // console.log(JSON.parse(data))
314 |
315 | }
316 | let result = JSON.parse(data);
317 | if (result.IsSuccess == "1") {
318 |
319 | console.log(`\n【获取笑点列表】成功了🎉 `)
320 | msg += `\n【获取笑点列表】成功了🎉 `
321 | $.msg(`\n【获取笑点列表】成功了🎉 `)
322 |
323 | console.log(`\n 请耐心等待 5 s\n`)
324 | await $.wait(5 * 1000);
325 |
326 | // 随机1-8 数字
327 | let num = randomInt(1, 8);
328 | if (debug) {
329 | console.log(`\n【debug】=============== 这是 随机数字 ===============`);
330 | console.log(num);
331 | }
332 |
333 | // 获取点赞笑点id joke_id
334 | joke_id = result.data[num].joke_id;
335 | if (debug) {
336 | console.log(`\n【debug】=============== 这是 你点赞的笑点 id ===============`);
337 | console.log(joke_id);
338 | }
339 |
340 | // 获取点赞笑点标题 joke_desc
341 | joke_desc = result.data[num].joke_desc;
342 | if (debug) {
343 | console.log(`\n【debug】=============== 这是 你点赞的笑点 标题 ===============`);
344 | console.log(joke_desc);
345 | }
346 |
347 |
348 | } else {
349 |
350 | $.log(`\n【获取笑点列表】 失败 ❌ 了呢,可能是网络被外星人抓走了!\n `)
351 | msg += `\n【获取笑点列表】 失败 ❌ 了呢,可能是网络被外星人抓走了!\n`
352 | $.msg(`【${$.name}】 【获取笑点列表】: 失败 ❌ 了呢,可能是网络被外星人抓走了!`)
353 |
354 | }
355 |
356 | } catch (e) {
357 | console.log(e)
358 | } finally {
359 | resolve();
360 | }
361 | }, timeout)
362 | })
363 | }
364 |
365 |
366 |
367 |
368 | /**
369 | * 点赞笑点
370 | * https://bublysmile.com/Cg/Itf/Java/CmnMisItf.jsp?ItfName=addLikeRec&method=GetSqlData
371 | */
372 | function addLikeRec(user_id, timeout = 3 * 1000) {
373 | request_url.url = 'https://bublysmile.com/Cg/Itf/Java/CmnMisItf.jsp?ItfName=addLikeRec&method=GetSqlData'
374 | request_url.body = `user_id=${user_id}&joke_id=${joke_id}`
375 |
376 |
377 | return new Promise((resolve) => {
378 |
379 | if (debug) {
380 | console.log(`\n【debug】=============== 这是 点赞笑点 请求 url ===============`);
381 | console.log(request_url);
382 | }
383 |
384 | $.post(request_url, async (error, response, data) => {
385 | try {
386 | if (debug) {
387 | console.log(`\n\n【debug】===============这是 点赞笑点 返回data==============`);
388 | console.log(data)
389 | // console.log(`======`)
390 | // console.log(JSON.parse(data))
391 | }
392 | let result = JSON.parse(data);
393 | if (result.IsSuccess == "1") {
394 |
395 | console.log(`\n【点赞笑点】成功了🎉 ,获得笑点${result.get_points} 个 , 点赞后共有 ${result.total_points} 个笑点, 既然生活那么苦了,那就多笑笑鸭!`)
396 | msg += `\n【点赞笑点】成功了🎉 ,获得笑点${result.get_points} 个 , 点赞后共有 ${result.total_points} 个笑点, 既然生活那么苦了,那就多笑笑鸭!`
397 | $.msg(`\n【点赞笑点】成功了🎉 ,获得笑点${result.get_points} 个 , 点赞后共有 ${result.total_points} 个笑点, 既然生活那么苦了,那就多笑笑鸭!`)
398 |
399 | } else if (result.IsSuccess === "0") {
400 |
401 | $.log(`\n 点赞笑点】 失败 ,可能是:签到 ${result.ErrMsg}!\n `)
402 | msg += `\n【点赞笑点】 失败 ,可能是:签到 ${result.ErrMsg}!\n`
403 | $.msg(`【${$.name}】 【点赞笑点】:签到 ${result.ErrMsg}`)
404 |
405 | } else {
406 |
407 | $.log(`\n【点赞笑点】 失败 ❌ 了呢,可能是网络被外星人抓走了!\n `)
408 | msg += `\n【点赞笑点】 失败 ❌ 了呢,可能是网络被外星人抓走了!\n`
409 | $.msg(`【${$.name}】 【点赞笑点】: 失败 ❌ 了呢,可能是网络被外星人抓走了!`)
410 |
411 | }
412 |
413 | } catch (e) {
414 | console.log(e)
415 | } finally {
416 | resolve();
417 | }
418 | }, timeout)
419 | })
420 | }
421 |
422 |
423 |
424 |
425 |
426 |
427 |
428 |
429 | // prettier-ignore
430 | function Env(t, e) { "undefined" != typeof process && JSON.stringify(process.env).indexOf("GITHUB") > -1 && process.exit(0); 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.startTime = (new Date).getTime(), Object.assign(this, e), this.log("", `🔔${this.name}, 开始!`) } 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 } 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 = (() => { })) { 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) })) : 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))) : this.isNode() && (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: s, statusCode: i, headers: r, body: o } = t; e(null, { status: s, statusCode: i, headers: r, body: o }, o) }, t => { const { message: s, response: i } = t; e(s, i, i && i.body) })) } post(t, e = (() => { })) { 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.post(t, (t, s, i) => { !t && s && (s.body = i, s.statusCode = s.status), e(t, s, i) }); else if (this.isQuanX()) t.method = "POST", 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()) { this.initGotEnv(t); const { url: s, ...i } = t; this.got.post(s, i).then(t => { const { statusCode: s, statusCode: i, headers: r, body: o } = t; e(null, { status: s, statusCode: i, headers: r, body: o }, o) }, t => { const { message: s, response: i } = t; e(s, i, i && i.body) }) } } 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 = ["", "==============📣系统通知📣=============="]; 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("", `❗️${this.name}, 错误!`, t.stack) : this.log("", `❗️${this.name}, 错误!`, t) } wait(t) { return new Promise(e => setTimeout(e, t)) } done(t = {}) { const e = (new Date).getTime(), s = (e - this.startTime) / 1e3; this.log("", `🔔${this.name}, 结束! 🕛 ${s} 秒`), this.log(), (this.isSurge() || this.isQuanX() || this.isLoon()) && $done(t) } }(t, e) }
431 |
432 |
--------------------------------------------------------------------------------
/invalid/xlh/xlh.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yml2213/javascript/183efd8c40788eaeb8b404a7810cc04fa0ee4423/invalid/xlh/xlh.jpg
--------------------------------------------------------------------------------
/invalid/xtwly/xtwly.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yml2213/javascript/183efd8c40788eaeb8b404a7810cc04fa0ee4423/invalid/xtwly/xtwly.jpg
--------------------------------------------------------------------------------
/invalid/yctt/yctt.js:
--------------------------------------------------------------------------------
1 | /*
2 | 邀请码: PC49JLAIF
3 | 感谢填写! 感谢填写!! 感谢填写!!!
4 | 1.14 完成签到以及积分查询 , 脚本部分内容借鉴了tom大佬的模板,感谢tom大佬的新毛及模板
5 | 平台: 青龙
6 | 软件: 永川头条
7 | 收益: 获得积分,可以兑换实物,发不发货未知
8 | 注意事项 : 一定要仔细阅读一下内容
9 |
10 | =============青龙变量=============
11 | export ycttua=''
12 | export ycttToken=''
13 | export sessionId=''
14 |
15 | =============变量解释==========
16 | ycttua:UA 这个不需要解释了吧
17 | ycttToken:变量中的xxxx是你的token,每个人是固定的,可以从 关键词 doSign 包里找到所有变量
18 | sessionId:变量中的xxxx是你的id,每个人是固定的,可以从 关键词 doSign 包里找到所有变量
19 |
20 |
21 | =============变量获取==========
22 | ios: 可以使用圈x(需要把去广告功能关闭) 也可以使用 steam , thor 等工具
23 | 圈x为例 开启http抓包
24 | 打开app,签到,然后搜索关键字 doSign , 其中post请求里可以找到所有变量
25 | ycttToken , sessionId 在请求体中 , 请求体-文本 查看里面的
26 |
27 |
28 | 安卓: 使用小黄鸟进行抓包,打开app,签到, 搜索关键字 doSign 即可获得一条记录,点击总览右侧的 请求 请求 请求 ,然后点击下方的 text text text,即可获得包内容;然后根据一下模板填写即可
29 |
30 | 还不会的请百度或者群里求助
31 |
32 | */
33 |
34 | const $ = new Env('永川头条签到');
35 | const host = 'api.cqliving.com';
36 | const notify = $.isNode() ? require('./sendNotify') : '';
37 | let ycttua = process.env.ycttua;
38 | let ycttToken = process.env.ycttToken;
39 | let sessionId = process.env.sessionId;
40 | let body = `appId=9&sessionId=${sessionId}&token=${ycttToken}&v=1`;
41 |
42 | //开始运行
43 | !(async () => {
44 | await yml()
45 |
46 | })()
47 | .catch((e) => $.logErr(e))
48 | .finally(() => $.done())
49 |
50 | // 1000 ms == 1 s 60000 ms == 1 min 600000 ms == 10 min
51 | //这里是要执行的代码 ====== 如果有您不需要的 请自行注释 使用 // 注释就行 ========
52 | async function yml() {
53 | await wyy();
54 | await qd();
55 | await cx();
56 | }
57 |
58 |
59 | //每日网抑云
60 | function wyy(timeout = 0) {
61 | return new Promise((resolve) => {
62 | let url = {
63 | url: `https://tenapi.cn/comment/`
64 | }
65 | $.get(url, async (err, resp, data) => {
66 | try {
67 | data = JSON.parse(data)
68 | $.log(`\n【网抑云时间】: ${data.data.content} by--${data.data.song}`);
69 |
70 | } catch (e) {
71 | $.logErr(e, resp);
72 | } finally {
73 | resolve()
74 | }
75 | }, timeout)
76 | })
77 | }
78 |
79 | // 签到任务
80 | function qd(timeout = 0) {
81 | return new Promise((resolve) => {
82 | let url = {
83 | url: `https://${host}/point/doSign.html`,
84 | headers: {
85 |
86 | 'User-Agent': ycttua
87 |
88 | },
89 |
90 | body: body
91 |
92 |
93 | }
94 |
95 | // console.log(url);
96 |
97 |
98 | $.post(url, async (err, resp, data) => {
99 | try {
100 |
101 | // console.log(`输出data开始===================`);
102 | // console.log(data);
103 | // console.log(`输出data结束===================`);
104 |
105 | result = JSON.parse(data);
106 | if (result.code == 0) {
107 | $.log(`\n【🎉🎉🎉 恭喜您鸭 🎉🎉🎉】执行签到: 成功 `)
108 | // await $.wait(3 * 1000)
109 | } else {
110 | $.log(`\n【🎉 恭喜个屁 🎉】执行签到:失败🙅🏻了呢,原因可能是是:${result.message}`)
111 | }
112 | } catch (e) {
113 | $.logErr(e, resp);
114 | } finally {
115 | resolve()
116 | }
117 | }, timeout)
118 |
119 | })
120 |
121 | }
122 |
123 |
124 |
125 | // 查询任务
126 | function cx(timeout = 0) {
127 | return new Promise((resolve) => {
128 | let url = {
129 | url: `https://${host}/point/myInfo.html`,
130 | headers: {
131 |
132 | 'Host': host,
133 | 'Content-Type': 'application/x-www-form-urlencoded'
134 |
135 | },
136 |
137 | body: body
138 | }
139 |
140 | // console.log(url);
141 |
142 | $.post(url, async (err, resp, data) => {
143 | try {
144 |
145 | // console.log(`输出data开始===================`);
146 | // console.log(data);
147 | // console.log(`输出data结束===================`);
148 |
149 | result = JSON.parse(data);
150 | if (result.code == 0) {
151 | console.log(`\n【🎉🎉🎉 恭喜您鸭 🎉🎉🎉】余额查询: 成功 , 已获得积分${result.data.currentPoint}`);
152 | // await $.wait(3 * 1000)
153 | } else {
154 | console.log(`\n【🎉 恭喜个屁 🎉】余额查询: 失败 `)
155 | }
156 | } catch (e) {
157 | $.logErr(e, resp);
158 | } finally {
159 | resolve()
160 | }
161 | }, timeout)
162 |
163 | })
164 |
165 | }
166 |
167 |
168 |
169 | //固定板块,无需动
170 | 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) }
--------------------------------------------------------------------------------
/invalid/yml/tipe.txt:
--------------------------------------------------------------------------------
1 | tg频道: https://t.me/yml2213_tg
2 | yml_小铺: https://yml-git.tk/
3 |
4 | 欢迎您的光临, 脚本定制 清联系 @yml2213
5 |
--------------------------------------------------------------------------------
/invalid/ynhb/ynhb.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yml2213/javascript/183efd8c40788eaeb8b404a7810cc04fa0ee4423/invalid/ynhb/ynhb.jpg
--------------------------------------------------------------------------------
/invalid/zcy/zcyqd.js:
--------------------------------------------------------------------------------
1 | /*
2 | 邀请码: XWXW0K
3 | 感谢填写! 感谢填写!! 感谢填写!!!
4 | 1.4 更新 兼容安卓平台,更新签到
5 | 基本都黑号了 不建议玩了 不提供解答
6 | 平台: 青龙
7 | 软件: 走财运app
8 | 收益: 1000能量等于0.1元 每天不到1元
9 | 注意事项 : 一定要仔细阅读一下内容
10 | [Script]
11 | cron "0 1/2 * * *" script-path=https://raw.githubusercontent.com/yml2213/javascript/master/zcyqd.js,tag=走财运签到
12 | =============变量=============
13 | export zcyhd='{"Authorization":"", "User-Agent":""}'
14 | export zcyqd='account_id=XXXX'
15 |
16 | =============变量解释==========
17 | zcyhd:跟原来的一样,可忽略不写(以前没有的请填写)
18 | zcyqd:签到变量中的xxxx是你的id,每个人是固定的,可以从步数变量直接复制
19 |
20 | =============变量获取==========
21 | ios: 可以使用圈x(需要把去广告功能关闭) 也可以使用 steam , thor 等工具
22 | 圈x为例 开启http抓包
23 | 打开app,观看一个视频,然后搜索关键字 step-money.quanxiangweilai.cn
24 | 即可找到 Authorization , User-Agent ;
25 | bd是 请求体-文本 查看里面的
26 |
27 |
28 | 安卓: 使用小黄鸟进行抓包,Authorization , User-Agent 不在赘述,直接抓包后搜索关键字 step-money.quanxiangweilai.cn 即可获取
29 | 抓取视频一,视频二时,搜索关键字 gain_common_bonus 即可获得一条记录,点击总览右侧的 请求 请求 请求 ,然后点击下方的 text text text,即可获得包内容;然后根据一下模板填写即可
30 | 以视频一举例,其他同理:
31 |
32 | 还不会的请百度或者群里求助
33 |
34 | */
35 |
36 | const $ = new Env('走财运签到');
37 | const notify = $.isNode() ? require('./sendNotify') : '';
38 |
39 | /*
40 | let status;
41 | status = (status = ($.getval(`zcystatus`) || "1")) > 1 ? `${status}` : ""; // 账号扩展字符
42 | */
43 |
44 | let zcyhdArr = []; //数组 Array
45 | let host=`https://step-money.quanxiangweilai.cn`;
46 | let zcyhd = { "Authorization": "", "User-Agent": "" };
47 | // let zcyhdstr = $.isNode() ? (process.env.zcyhd ? process.env.zcyhd : "") : ($.getdata('zcyhd') ? $.getdata('zcyhd') : ""); //字符串 str/String
48 | let zcyqd = process.env.zcyqd;
49 |
50 |
51 | //开始运行
52 |
53 | !(async () => {
54 | if (process.env.zcyhd && process.env.zcyhd.indexOf('@') > -1) {
55 | zcyhdArr = process.env.zcyhd.split('@');
56 | console.log(`您选择的是用"@"隔开\n`)
57 | } else {
58 | zcyhds = [process.env.zcyhd]
59 | };
60 | Object.keys(zcyhds).forEach((item) => {
61 | if (zcyhds[item]) {
62 | zcyhdArr.push(zcyhds[item])
63 | }
64 | })
65 |
66 | console.log(`共${zcyhdArr.length}个账号`)
67 | for (let k = 0; k < zcyhdArr.length; k++) {
68 | zcyhd = zcyhdArr[k]
69 | $.index = k + 1;
70 | console.log(`\n开始【走财运账户 ${$.index}】`)
71 | await byxiaopeng()
72 | }
73 |
74 |
75 |
76 | // message() //通知
77 | })()
78 | .catch((e) => $.logErr(e))
79 | .finally(() => $.done())
80 |
81 |
82 |
83 | // https://step-money.quanxiangweilai.cn/api/sign_in
84 | // 1000 ms == 1 s 60000 ms == 1 min 600000 ms == 10 min
85 | //这里是要执行的代码 ====== 如果有您不需要的 请自行注释 使用 // 注释就行 ========
86 | async function byxiaopeng() {
87 | await wyy();
88 | await $.wait(2000); // 延迟 2000ms 也就是2秒
89 | await qd();
90 | await $.wait(60000); // 延迟 1分钟
91 |
92 |
93 |
94 | }
95 |
96 |
97 |
98 |
99 | //每日网抑云
100 | function wyy(timeout = 0) {
101 | return new Promise((resolve) => {
102 | let url = {
103 | url: `https://tenapi.cn/comment/`
104 | }
105 | $.get(url, async (err, resp, data) => {
106 | try {
107 | data = JSON.parse(data)
108 | $.log(`\n【网抑云时间】: ${data.data.content} by--${data.data.song}`);
109 |
110 | } catch (e) {
111 | $.logErr(e, resp);
112 | } finally {
113 | resolve()
114 | }
115 | }, timeout)
116 | })
117 | }
118 |
119 |
120 | // https://step-money.quanxiangweilai.cn/api/sign_in
121 | // 签到任务
122 | function qd(timeout = 0) {
123 | return new Promise((resolve) => {
124 | let url = {
125 | url: `${host}/api/sign_in`,
126 | headers: {
127 | 'Authorization': JSON.parse(zcyhd).Authorization,
128 | 'User-Agent': JSON.parse(zcyhd)['User-Agent']
129 |
130 | },
131 | body: zcyqd
132 | }
133 |
134 | // console.log(url);
135 |
136 |
137 | $.post(url, async (err, resp, data) => {
138 | try {
139 |
140 | // console.log(`输出data开始===================`);
141 | // console.log(data);
142 | // console.log(`输出data结束===================`);
143 |
144 | result = JSON.parse(data);
145 | if (result.error_code == 0) {
146 | $.log(`\n【🎉🎉🎉 恭喜您鸭 🎉🎉🎉】执行签到:${result.message} , 获得能量${result.data.sign_bonus}`)
147 | await $.wait(10000)
148 | // await sp1();
149 | } else {
150 | $.log(`\n【🎉 恭喜个屁 🎉】执行签到:失败🙅🏻了呢,可能是:${result.message}`)
151 | }
152 | } catch (e) {
153 | $.logErr(e, resp);
154 | } finally {
155 | resolve()
156 | }
157 | }, timeout)
158 |
159 | })
160 |
161 | }
162 |
163 |
164 |
165 |
166 |
167 |
168 | //固定板块,无需动
169 | 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)}
--------------------------------------------------------------------------------
/jdd/jdd.txt:
--------------------------------------------------------------------------------
1 | 群友投稿 金杜丹 小程序
2 | 24.1.31 完成
3 | 定时 cron "14 10,12 * * *"
4 | 变量:
5 | export JDD='备注#access_token'
6 | export YMLCARD='卡密' 通用一个即可
7 |
8 | 1.31 签到, 阅读
9 |
10 |
11 | 抓包:
12 | 抓 tianxin.jmd724.com 的包, 找到 access_token 就行
13 |
14 | 积分换实物的, 一个年终奖系列 +1
15 |
--------------------------------------------------------------------------------
/mcyp/1.txt:
--------------------------------------------------------------------------------
1 | 群友投稿
2 | 24.1.31 完成
3 | 定时 cron "24 10,12 * * *"
4 | 变量:
5 |
6 | export MCYP='备注#content-openid#mobile#content_uid#unionid#content-skey'
7 | export MCYP_LT='1' 1 参与抽奖 0 不参与(默认)
8 | export YMLCARD='卡密' 通用一个即可
9 |
10 |
11 | 1.31 更新抽奖, 优化打印 v1.1
12 |
13 |
14 | 抓包: 抓 小程序 名创优品 https://cdn-storeexpress.miniso.com/wechat/login 的包, 找到 需要的就行
15 |
--------------------------------------------------------------------------------