1
0
mirror of https://github.com/okyyds/yyds.git synced 2026-07-13 18:21:16 +08:00

Compare commits

..

4 Commits

Author SHA1 Message Date
ooo
d37df7f4a2 1 2022-09-25 21:42:48 +08:00
ooo
82e1366d2e 1 2022-09-25 21:41:55 +08:00
ooo
e4f734a63e 1 2022-09-25 21:39:26 +08:00
ooo
c010aa7d6a 1 2022-09-25 21:37:51 +08:00
7 changed files with 0 additions and 226 deletions

View File

@@ -1,46 +0,0 @@
/**
* 农场自动收+种4级
*/
import USER_AGENT, {o2s, requireConfig, wait} from "./TS_USER_AGENTS"
import axios from "axios";
let cookie: string = '', UserName: string, res: any
!(async () => {
let cookiesArr: string[] = await requireConfig(true)
for (let [index, value] of cookiesArr.entries()) {
cookie = value
UserName = decodeURIComponent(cookie.match(/pt_pin=([^;]*)/)![1])
console.log(`\n开始【京东账号${index + 1}${UserName}\n`)
res = await api('initForFarm', {"version": 11, "channel": 3, "babelChannel": 0})
if (![2, 3].includes(res.farmUserPro.treeState)) {
console.log('正在种植...')
}
if (res.farmUserPro.treeState === 2) {
res = await api('gotCouponForFarm', {"version": 11, "channel": 3, "babelChannel": 0})
res = await api('initForFarm', {"version": 11, "channel": 3, "babelChannel": 0})
}
if (res.farmUserPro.treeState === 3) {
let element = res.farmLevelWinGoods[4][0];
res = await api('choiceGoodsForFarm', {"imageUrl": '', "nickName": '', "shareCode": '', "goodsType": element.type, "type": "0", "version": 11, "channel": 3, "babelChannel": 0});
o2s(res)
await api('gotStageAwardForFarm', {"type": "4", "version": 11, "channel": 3, "babelChannel": 0});
await api('waterGoodForFarm', {"type": "", "version": 11, "channel": 3, "babelChannel": 0});
await api('gotStageAwardForFarm', {"type": "1", "version": 11, "channel": 3, "babelChannel": 0});
}
}
})()
async function api(fn: string, body: object) {
let {data} = await axios.get(`https://api.m.jd.com/client.action?functionId=${fn}&body=${JSON.stringify(body)}&client=apple&clientVersion=10.0.4&osVersion=13.7&appid=wh5&loginType=2&loginWQBiz=interact`, {
headers: {
"Cookie": cookie,
"Host": "api.m.jd.com",
'User-Agent': USER_AGENT,
}
})
await wait(1000)
return data
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -1,43 +0,0 @@
/**
* 微信小程序签到红包
* cron: 8 0 * * *
*/
import {sendNotify} from './sendNotify'
import {post, requireConfig, wait} from './TS_USER_AGENTS'
import {H5ST} from "./utils/h5st"
let cookie: string = '', res: any = '', UserName: string, msg: string = '', h5stTool: H5ST = new H5ST("9a38a", 'Mozilla/5.0 (iPhone; CPU iPhone OS 11_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15F79 MicroMessenger/8.0.15(0x18000f2e) NetType/WIFI Language/zh_CN', "6468223550974529");
!(async () => {
let cookiesArr: string[] = await requireConfig()
for (let [index, value] of cookiesArr.entries()) {
cookie = value
UserName = decodeURIComponent(cookie.match(/pt_pin=([^;]*)/)![1])
console.log(`\n开始【京东账号${index + 1}${UserName}\n`)
await h5stTool.__genAlgo()
let timestamp: number = Date.now()
let h5st: string = h5stTool.__genH5st({
appid: 'hot_channel',
body: JSON.stringify({"activityId": "10002"}),
client: 'android',
clientVersion: '7.16.250',
functionId: 'SignComponent_doSignTask',
t: timestamp.toString(),
})
res = await post(`https://api.m.jd.com/signTask/doSignTask?functionId=SignComponent_doSignTask&appid=hot_channel&body={"activityId":"10002"}&client=android&clientVersion=7.16.250&t=${timestamp}&h5st=${h5st}`, '', {
'content-type': 'application/json',
'user-agent': 'Mozilla/5.0 (iPhone; CPU iPhone OS 11_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15F79 MicroMessenger/8.0.15(0x18000f2e) NetType/WIFI Language/zh_CN',
'referer': 'https://servicewechat.com/wx91d27dbf599dff74/581/page-frame.html',
'cookie': cookie
})
if (res.data) {
console.log('已签到', res.data.signDays, '天,奖励', res.data.rewardValue, '元')
msg += `【京东账号${index + 1}${UserName}\n已签到 ${res.data.signDays}\n奖励 ${res.data.rewardValue}\n\n`
} else
console.log(res.message)
await wait(3000)
}
await sendNotify('微信小程序签到红包', msg)
})()

View File

@@ -1,32 +0,0 @@
/**
* 赚赚
* cron: 30 9 * * *
*/
import {requireConfig, wait, get, randomNumString} from './TS_USER_AGENTS'
let cookie: string = '', UserName: string = '', res: any = ''
!(async () => {
let cookiesArr: string[] = await requireConfig()
for (let [index, value] of cookiesArr.entries()) {
cookie = value
UserName = decodeURIComponent(cookie.match(/pt_pin=([^;]*)/)![1])
console.log(`\n开始【京东账号${index + 1}${UserName}\n`)
let headers: object = {'Host': 'api.m.jd.com', 'wqreferer': 'http://wq.jd.com/wxapp/pages/hd-interaction/task/index', 'User-Agent': 'MQQBrowser/26 Mozilla/5.0 (Linux; U; Android 2.3.7; zh-cn; MB200 Build/GRJ22; CyanogenMod-7) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1', 'Referer': 'https://servicewechat.com/wx8830763b00c18ac3/115/page-frame.html', 'Content-Type': 'application/json', 'Cookie': cookie}
res = await get(`https://api.m.jd.com/client.action?functionId=interactTaskIndex&body=%7B%22mpVersion%22%3A%223.4.0%22%7D&appid=wh5&loginWQBiz=interact&g_ty=ls&g_tk=${randomNumString(9)}`, headers)
console.log(res.data.cashExpected)
for (let t of res.data.taskDetailResList) {
if (t.times === 0) {
console.log(t.taskName)
let taskItem: object = {...t, "fullTaskName": `${t.taskName} (0/1)`, "btnText": "去完成"}
res = await get(`https://api.m.jd.com/client.action?functionId=doInteractTask&body=${encodeURIComponent(JSON.stringify({"taskId": t.taskId, "taskItem": taskItem, "actionType": 0, "taskToken": t.taskToken, "mpVersion": "3.4.0"}))}&appid=wh5&loginWQBiz=interact&g_ty=ls&g_tk=${randomNumString(9)}`, headers)
console.log(res.message)
await wait(2000)
}
}
await wait(2000)
}
})()

File diff suppressed because one or more lines are too long