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

Compare commits

..

71 Commits

Author SHA1 Message Date
ooo
8cd038ce72 爱的礼想型 2023-02-08 19:39:25 +08:00
ooo
d89392d8a5 1 2023-02-07 18:20:23 +08:00
ooo
685591c208 1 2023-02-06 00:38:12 +08:00
ooo
59569ea66c del 2023-01-20 02:03:52 +08:00
ooo
857bb0cacd del 2023-01-16 16:51:17 +08:00
ooo
c5b865f786 1 2023-01-13 22:29:07 +08:00
ooo
cd00939dc9 fix 2023-01-10 16:27:00 +08:00
ooo
86c88bbe84 1 2023-01-09 17:01:31 +08:00
ooo
73adc5865a del 2023-01-06 11:01:20 +08:00
ooo
89a7cd8d68 1 2023-01-04 01:29:12 +08:00
ooo
7084b6c3c6 del 2023-01-03 21:44:39 +08:00
ooo
cae8dfdd18 1 2023-01-02 22:36:08 +08:00
ooo
9a063e6ef3 1 2023-01-02 22:25:55 +08:00
ooo
2d7605fd25 1 2023-01-01 21:18:48 +08:00
ooo
d912fcd73d 1 2023-01-01 21:18:00 +08:00
ooo
b6fc59e1d7 1 2022-12-31 16:57:51 +08:00
ooo
1b18295358 1 2022-12-30 11:09:43 +08:00
ooo
360d6175e3 1 2022-12-30 11:04:00 +08:00
ooo
ddb2b022cf fix 2022-12-29 22:00:19 +08:00
ooo
7afceaa71a del 2022-12-29 12:35:15 +08:00
ooo
dbeb4be52b 1 2022-12-29 10:57:33 +08:00
ooo
3850159a6b 1 2022-12-29 10:54:09 +08:00
ooo
7d5bd99e23 1 2022-12-29 01:58:14 +08:00
ooo
c042dfc43f 1 2022-12-24 00:07:31 +08:00
ooo
975d1d9cc1 1 2022-12-23 00:14:21 +08:00
ooo
7f14a6a3b6 1 2022-12-20 01:31:03 +08:00
ooo
eca94cae44 1 2022-12-18 14:07:30 +08:00
ooo
b283a3ac0e del 2022-12-13 12:31:13 +08:00
ooo
5b2bfb3bca 1 2022-12-09 23:15:01 +08:00
ooo
cc1e0c0ef1 1 2022-12-09 21:33:46 +08:00
ooo
30ca3dad20 1 2022-12-09 19:38:52 +08:00
ooo
02a0a5921f 1 2022-12-09 18:50:08 +08:00
ooo
543db37660 1 2022-12-09 18:16:53 +08:00
ooo
73a8eef650 1 2022-12-09 18:02:17 +08:00
ooo
89c886cef0 1 2022-12-09 17:37:31 +08:00
ooo
9007f97a2d 1 2022-12-09 15:53:05 +08:00
ooo
24955732c5 1 2022-12-09 15:51:43 +08:00
ooo
6153505ba5 1 2022-12-09 15:48:43 +08:00
ooo
a0458956c9 del 2022-12-09 04:30:47 +08:00
ooo
88b92b21cc 1 2022-12-09 04:28:49 +08:00
ooo
64b0bdf102 店铺签到-并发 2022-12-09 04:22:41 +08:00
ooo
a4069a1da8 1 2022-12-09 03:42:37 +08:00
ooo
92aaee1333 del 2022-12-09 03:09:50 +08:00
ooo
0e734a3cbd jd_harmony_auto.js 2022-12-08 18:35:34 +08:00
ooo
fcaab7ddd7 update 2022-12-08 18:26:47 +08:00
ooo
4bd347a755 为我助力,领大额红包,至高1212元! 2022-12-08 13:41:45 +08:00
ooo
5ed2581eb7 特价版大赢家-老版本接口 2022-12-05 15:45:29 +08:00
ooo
d47fae11d1 赚钱大赢家 2022-12-05 12:05:24 +08:00
ooo
f61177b903 del 2022-12-05 11:25:28 +08:00
ooo
984c9bf243 del 2022-12-05 11:22:56 +08:00
ooo
b412afb9d2 组队通用瓜分 2022-12-05 11:18:58 +08:00
ooo
57a86d5160 决战12.12 足够精彩 2022-12-05 11:12:26 +08:00
ooo
9608085dc1 fix 2022-12-05 03:49:27 +08:00
ooo
a0c5facff6 1 2022-12-05 00:49:55 +08:00
ooo
fbadd85c5d 1 2022-12-04 13:07:06 +08:00
ooo
413bfe56bf 1 2022-12-04 00:21:31 +08:00
ooo
b61be4ad18 fix 2022-12-03 07:19:59 +08:00
ooo
3432610309 竞猜世界杯 2022-12-03 07:03:51 +08:00
ooo
d8f4dd62e2 del 2022-12-03 01:09:37 +08:00
ooo
ff4447832f 竞猜世界杯 2022-12-02 20:44:46 +08:00
ooo
cacebb01d8 组队-飞利浦 2022-12-01 19:57:21 +08:00
ooo
8121662e01 组队-新安怡 2022-12-01 19:52:22 +08:00
ooo
67c4549fe8 1 2022-12-01 19:49:16 +08:00
ooo
116f8d639c 组队-安佳 2022-12-01 19:42:39 +08:00
ooo
c8ae9d09e0 1 2022-12-01 19:37:23 +08:00
ooo
46d367afbc del 2022-12-01 16:54:26 +08:00
ooo
e6a6f15910 del 2022-11-30 15:41:25 +08:00
ooo
fadd50e1d0 1 2022-11-28 13:57:07 +08:00
ooo
90138f7ea5 1 2022-11-23 14:45:36 +08:00
ooo
f9b2cf9eb7 福利沸腾,足够精彩 2022-11-23 11:31:17 +08:00
ooo
61d2adf6ea jd_bean_change 2022-11-22 20:32:31 +08:00
28 changed files with 266 additions and 6370 deletions

4
docker/anjia.json Normal file
View File

@@ -0,0 +1,4 @@
[
"c014109359274de1b9c23371268183a8",
"5d4514bbede8441fa1aa120657c987b9"
]

6
docker/ct.json Normal file
View File

@@ -0,0 +1,6 @@
[
"29DREstWFlxSaSi2a-trM8tYTjk_1K03",
"gIy4HsQLR1dRby_QfqQnMC2LnLox",
"29DREcUBSlsFZXrsauxqNeQ1MBq1z10j"
]

4
docker/flp.json Normal file
View File

@@ -0,0 +1,4 @@
[
"a432d3701d9649d2bd56779d10876b89",
"7e821ae933e74bda8fd845f3825685fb"
]

12
docker/tokens.json Normal file
View File

@@ -0,0 +1,12 @@
[
"DC0E5C0609D3003DC106B73B94A4EB4F",
"776D3DAAD242B860E89DF11077F82169",
"F95A1A59A36015BE04EE37236DB6CE87",
"33D71DB237DA8C9D84DC3B34F74AAC07",
"E969CCB6A0DF9392A021E3D604D892A2",
"D4A243F51F645969EF77A35C93F686A5",
"445AF0A22B42AFE6D6ABADDE2FD161C2",
"43B0F3550B339D30B1DC1B85198F5871",
"710F970D2C9D83AE4547C6CD97754DCB",
"264D069FBD411345AC26F8173FB9ABDB"
]

4
docker/xay.json Normal file
View File

@@ -0,0 +1,4 @@
[
"c8cf903edd264d8a9f9a71358f3e8f27",
"bc489fe97b0a4965a542b69da05326b4"
]

View File

@@ -1715,6 +1715,7 @@ function getUUID(x = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", t = 0) {
})
}
function redPacket() {
return new Promise(async resolve => {
const options = {
@@ -1742,41 +1743,60 @@ function redPacket() {
$.jsRed = 0,
$.jdRed = 0,
$.jdhRed = 0,
$.jdwxRed = 0,
$.jdGeneralRed = 0,
$.jxRedExpire = 0,
$.jsRedExpire = 0,
$.jdRedExpire = 0,
$.jdhRedExpire = 0;
$.jdwxRedExpire = 0,
$.jdGeneralRedExpire = 0
let t = new Date();
t.setDate(t.getDate() + 1);
t.setHours(0, 0, 0, 0);
t = parseInt((t - 1) / 1000);
//console.log(JSON.stringify(data.useRedInfo.redList))
for (let vo of data.useRedInfo.redList || []) {
if (vo.orgLimitStr && vo.orgLimitStr.includes("京喜")) {
if (vo.limitStr && vo.limitStr.includes("京喜")) {
$.jxRed += parseFloat(vo.balance)
if (vo['endTime'] === t) {
$.jxRedExpire += parseFloat(vo.balance)
}
} else if (vo.activityName.includes("极速版") || vo.activityName.includes("京东特价")) {
} else if (vo.limitStr.includes("购物小程序")) {
$.jdwxRed += parseFloat(vo.balance)
if (vo['endTime'] === t) {
$.jdwxRedExpire += parseFloat(vo.balance)
}
} else if (vo.limitStr.includes("京东商城")) {
$.jdRed += parseFloat(vo.balance)
if (vo['endTime'] === t) {
$.jdRedExpire += parseFloat(vo.balance)
}
} else if (vo.limitStr.includes("极速版") || vo.limitStr.includes("京东特价")) {
$.jsRed += parseFloat(vo.balance)
if (vo['endTime'] === t) {
$.jsRedExpire += parseFloat(vo.balance)
}
} else if (vo.orgLimitStr && vo.orgLimitStr.includes("京东健康")) {
} else if (vo.limitStr && vo.limitStr.includes("京东健康")) {
$.jdhRed += parseFloat(vo.balance)
if (vo['endTime'] === t) {
$.jdhRedExpire += parseFloat(vo.balance)
}
} else {
$.jdRed += parseFloat(vo.balance)
$.jdGeneralRed += parseFloat(vo.balance)
if (vo['endTime'] === t) {
$.jdRedExpire += parseFloat(vo.balance)
$.jdGeneralRedExpire += parseFloat(vo.balance)
}
}
}
$.jxRed = $.jxRed.toFixed(2);
$.jsRed = $.jsRed.toFixed(2);
$.jdRed = $.jdRed.toFixed(2);
$.jdhRed = $.jdhRed.toFixed(2);
$.jdwxRed = $.jdwxRed.toFixed(2);
$.jdGeneralRed = $.jdGeneralRed.toFixed(2);
$.balance = data.balance;
$.expiredBalance = ($.jxRedExpire + $.jsRedExpire + $.jdRedExpire).toFixed(2);
$.message += `【红包总额】${$.balance}(总过期${$.expiredBalance})元 \n`;
@@ -1788,6 +1808,10 @@ function redPacket() {
$.message += `【京东红包】${$.jdRed}(将过期${$.jdRedExpire.toFixed(2)})元 \n`;
if ($.jdhRed > 0)
$.message += `【健康红包】${$.jdhRed}(将过期${$.jdhRedExpire.toFixed(2)})元 \n`;
if ($.jdwxRed > 0)
$.message += `【微信小程序】${$.jdwxRed}(将过期${$.jdwxRedExpire.toFixed(2)})元 \n`;
if ($.jdGeneralRed > 0)
$.message += `【全平台通用】${$.jdGeneralRed}(将过期${$.jdGeneralRedExpire.toFixed(2)})元 \n`;
} else {
console.log(`京东服务器返回空数据`)
}
@@ -1830,7 +1854,7 @@ function getCoupon() {
//console.log(useable[i]);
if (useable[i].limitStr.indexOf('全品类') > -1) {
$.beginTime = useable[i].beginTime;
if ($.beginTime < new Date().getTime() && useable[i].quota < 20 && useable[i].coupontype === 1) {
if ($.beginTime < new Date().getTime() && useable[i].quota <= 100 && useable[i].coupontype === 1) {
//$.couponEndTime = new Date(parseInt(useable[i].endTime)).Format('yyyy-MM-dd');
$.couponName = useable[i].limitStr;
if (useable[i].platFormInfo)
@@ -1873,7 +1897,7 @@ function getCoupon() {
}
}
if (useable[i].couponTitle.indexOf('极速版APP活动') > -1 && useable[i].limitStr=='仅可购买活动商品') {
if (useable[i].couponTitle.indexOf('特价版APP活动') > -1 && useable[i].limitStr=='仅可购买活动商品') {
$.beginTime = useable[i].beginTime;
if ($.beginTime < new Date().getTime() && useable[i].coupontype === 1) {
if (useable[i].platFormInfo)
@@ -1881,7 +1905,7 @@ function getCoupon() {
var decquota=parseFloat(useable[i].quota).toFixed(2);
var decdisc= parseFloat(useable[i].discount).toFixed(2);
$.message += `极速版券】满${decquota}${decdisc}`;
$.message += `特价版券】满${decquota}${decdisc}`;
if (useable[i].endTime < $.todayEndTime) {
$.message += `(今日过期,${$.platFormInfo})\n`;

View File

@@ -11,8 +11,8 @@ const jdCookieNode = $.isNode() ? require('./jdCookie.js') : '';
const notify = $.isNode() ? require('./sendNotify') : '';
let cookiesArr = [], cookie = '', message = '';
let activityList = [
{'activityId' : '49aad82a1afb4bd7b84eb6e79f633a67' ,'activityShopId' : '1000002527' , 'activityName':'欧乐b' , 'updateCaptainNum' : '2' , 'type' : '0'}, //0
{'activityId' : '9dfd1384e00a411cbd9e82a34cc8d803' ,'activityShopId' : '1000003691' , 'activityName':'安佳' , 'updateCaptainNum' : '2' , 'type' : '0'}, //1
{'activityId' : '5280930d84294555b7a1e61cb97ce9de' ,'activityShopId' : '1000014486' , 'activityName':'安佳' , 'updateCaptainNum' : '20', 'type' : '0'},
{'activityId' : 'd923d226bc734984a11d450912de6297' ,'activityShopId' : '1000002527' , 'activityName':'新安怡' , 'updateCaptainNum' : '20', 'type' : '0'},
]
let activityNum = process.env.captian_id ?? 0;
if ($.isNode()) {

File diff suppressed because one or more lines are too long

11
jd_dpqd_dsb.js Normal file

File diff suppressed because one or more lines are too long

View File

@@ -1,408 +0,0 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
'''
cron: 1 1 1 1 *
new Env('发财挖宝');
活动入口: 京东极速版 > 我的 > 发财挖宝
最高可得总和为10元的微信零钱和红包
脚本功能为: 挖宝,提现,没有助力功能,当血量剩余 1 时停止挖宝,领取奖励并提现
目前需要完成逛一逛任务并且下单任务才能通关不做的话大概可得1.52块的微信零钱
'''
import os,json,random,time,re,string,functools,asyncio
import sys
sys.path.append('../../tmp')
print('\n运行本脚本之前请手动进入游戏点击一个方块\n')
print('\n挖的如果都是0.01红包就是黑了,别挣扎了!\n')
print('\n默认自动领取奖励关闭请在代码383行加上#号注释即可\n')
try:
import requests
except Exception as e:
print(str(e) + "\n缺少requests模块, 请执行命令pip3 install requests\n")
requests.packages.urllib3.disable_warnings()
linkId="pTTvJeSTrpthgk9ASBVGsw"
# 获取pin
cookie_findall=re.compile(r'pt_pin=(.+?);')
def get_pin(cookie):
try:
return cookie_findall.findall(cookie)[0]
except:
print('ck格式不正确请检查')
# 读取环境变量
def get_env(env):
try:
if env in os.environ:
a=os.environ[env]
elif '/ql' in os.path.abspath(os.path.dirname(__file__)):
try:
a=v4_env(env,'/ql/config/config.sh')
except:
a=eval(env)
elif '/jd' in os.path.abspath(os.path.dirname(__file__)):
try:
a=v4_env(env,'/jd/config/config.sh')
except:
a=eval(env)
else:
a=eval(env)
except:
a=''
return a
# v4
def v4_env(env,paths):
b=re.compile(r'(?:export )?'+env+r' ?= ?[\"\'](.*?)[\"\']', re.I)
with open(paths, 'r') as f:
for line in f.readlines():
try:
c=b.match(line).group(1)
break
except:
pass
return c
# 随机ua
def ua():
sys.path.append(os.path.abspath('.'))
try:
from jdEnv import USER_AGENTS as a
except:
a='jdpingou;android;5.5.0;11;network/wifi;model/M2102K1C;appBuild/18299;partner/lcjx11;session/110;pap/JA2019_3111789;brand/Xiaomi;Mozilla/5.0 (Linux; Android 11; M2102K1C Build/RKQ1.201112.002; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/92.0.4515.159 Mobile Safari/537.36'
return a
# 13位时间戳
def gettimestamp():
return str(int(time.time() * 1000))
## 获取cooie
class Judge_env(object):
def main_run(self):
if '/jd' in os.path.abspath(os.path.dirname(__file__)):
cookie_list=self.v4_cookie()
else:
cookie_list=os.environ["JD_COOKIE"].split('&') # 获取cookie_list的合集
if len(cookie_list)<1:
print('请填写环境变量JD_COOKIE\n')
return cookie_list
def v4_cookie(self):
a=[]
b=re.compile(r'Cookie'+'.*?=\"(.*?)\"', re.I)
with open('/jd/config/config.sh', 'r') as f:
for line in f.readlines():
try:
regular=b.match(line).group(1)
a.append(regular)
except:
pass
return a
cookie_list=Judge_env().main_run()
def taskGetUrl(functionId, body, cookie):
url=f'https://api.m.jd.com/?functionId={functionId}&body={json.dumps(body)}&t={gettimestamp()}&appid=activities_platform&client=H5&clientVersion=1.0.0'
headers={
'Cookie': cookie,
'Host': 'api.m.jd.com',
'Connection': 'keep-alive',
'origin': 'https://bnzf.jd.com',
'Content-Type': 'application/x-www-form-urlencoded',
'accept': 'application/json, text/plain, */*',
"User-Agent": ua(),
'Accept-Language': 'zh-cn',
'Accept-Encoding': 'gzip, deflate, br',
}
for n in range(3):
try:
res=requests.get(url,headers=headers, timeout=10).json()
return res
except:
if n==2:
print('API请求失败请检查网路重试❗\n')
# 剩余血量
def xueliang(cookie):
body={"linkId":linkId,"round":1}
res=taskGetUrl("happyDigHome", body, cookie)
if not res:
return
if res['code']==0:
if res['success']:
curRound=res['data']['curRound'] # 未知
blood=res['data']['blood'] # 剩余血量
return blood
def jinge(cookie,i):
body={"linkId":linkId}
res=taskGetUrl("happyDigHome", body, cookie)
if not res:
return
if res['code']==0:
if res['success']:
curRound=res['data']['curRound'] # 未知
blood=res['data']['blood'] # 剩余血量
roundList=res['data']['roundList'] # 3个总池子
roundList_n=roundList[0]
redAmount=roundList_n['redAmount'] # 当前池已得京东红包
cashAmount=roundList_n['cashAmount'] # 当前池已得微信红包
return [blood,redAmount,cashAmount]
# 页面数据
def happyDigHome(cookie):
body={"linkId":linkId,"round":1}
res=taskGetUrl("happyDigHome", body, cookie)
exit_flag = "false"
if not res:
return
if res['code']==0:
if res['success']:
curRound=res['data']['curRound'] # 未知
incep_blood=res['data']['blood'] # 剩余血量
roundList=res['data']['roundList'] # 3个总池子
for e,roundList_n in enumerate(roundList): # 迭代每个池子
roundid=roundList_n['round'] # 池序号
state=roundList_n['state']
rows=roundList_n['rows'] # 池规模rows*rows
redAmount=roundList_n['redAmount'] # 当前池已得京东红包
cashAmount=roundList_n['cashAmount'] # 当前池已得微信红包
leftAmount=roundList_n['leftAmount'] # 剩余红包?
chunks=roundList_n['chunks'] # 当前池详情list
a=jinge(cookie,roundid)
if roundid==1:
print(f'\n开始 "入门" 难度关卡({rows}*{rows}')
elif roundid==2:
print(f'\n开始 "挑战" 难度关卡({rows}*{rows}')
elif roundid==3:
print(f'\n开始 "终极" 难度关卡({rows}*{rows}')
print(f'当前剩余血量 {a[0]}🩸')
## print(f'当前池已得京东红包 {a[2]}\n当前池已得微信红包 {a[1]}\n')
_blood=xueliang(cookie)
if _blood>1 or incep_blood>=21:
happyDigDo(cookie,roundid,0,0)
if e==0 or e==1:
roundid_n=4
else:
roundid_n=5
for n in range(roundid_n):
for i in range(roundid_n):
_blood=xueliang(cookie)
if _blood>1 or incep_blood>=21:
## print(f'当前血量为 {_blood}')
a=n+1
b=i+1
print(f'挖取坐标({a},{b})')
happyDigDo(cookie,roundid,n,i)
else:
a=jinge(cookie,roundid)
print(f'没血了,不挖了')
exit_flag = "true"
## print(f'当前池已得京东红包 {a[2]}\n当前池已得微信红包 {a[1]}\n')
break
if exit_flag == "true":
break
if exit_flag == "true":
break
else:
print(f'获取数据失败\n{res}\n')
else:
print(f'获取数据失败\n{res}\n')
# 玩一玩
def apDoTask(cookie):
print('开始做玩一玩任务')
body={"linkId":linkId,"taskType":"BROWSE_CHANNEL","taskId":454,"channel":4,"itemId":"https%3A%2F%2Fsignfree.jd.com%2F%3FactivityId%3DPiuLvM8vamONsWzC0wqBGQ","checkVersion":False}
res=taskGetUrl('apDoTask', body, cookie)
if not res:
return
try:
if res['success']:
print('玩好了')
else:
print(f"{res['errMsg']}")
except:
print(f"错误\n{res}")
# 挖宝
def happyDigDo(cookie,roundid,rowIdx,colIdx):
body={"round":roundid,"rowIdx":rowIdx,"colIdx":colIdx,"linkId":linkId}
res=taskGetUrl("happyDigDo", body, cookie)
if not res:
return
if res['code']==0:
if res['success']:
typeid=res['data']['chunk']['type']
if typeid==2:
print(f"获得极速版红包 {res['data']['chunk']['value']} 🧧\n")
elif typeid==3:
print(f"🎉 获得微信零钱 {res['data']['chunk']['value']} 💰\n")
elif typeid==4:
print(f"💥Boom💥 挖到了炸弹 💣\n")
elif typeid==1:
print(f"获得优惠券 🎟️\n")
else:
print(f'不知道挖到了什么 🎁\n')
else:
print(f'{res}\n挖宝失败\n')
else:
print(f'{res}\n挖宝失败\n')
# # 助力码
# def inviteCode(cookie):
# global inviteCode_1_list,inviteCode_2_list
# body={"linkId":linkId}
# res=taskGetUrl("happyDigHome", body, cookie)
# if not res:
# return
# try:
# if res['success']:
# print(f"账号{get_pin(cookie)}助力码为{res['data']['inviteCode']}")
# inviteCode_1_list.append(res['data']['inviteCode'])
# print(f"账号{get_pin(cookie)}助力码为{res['data']['markedPin']}")
# inviteCode_2_list.append(res['data']['markedPin'])
# else:
# print('快去买买买吧')
# except:
# print(f"错误\n{res}\n")
# # 助力
# def happyDigHelp(cookie,fcwbinviter,fcwbinviteCode):
# print(f"账号 {get_pin(cookie)} 去助力{fcwbinviteCode}")
# xueliang(cookie)
# body={"linkId":linkId,"inviter":fcwbinviter,"inviteCode":fcwbinviteCode}
# res=taskGetUrl("happyDigHelp", body, cookie)
# if res['success']:
# print('助力成功')
# else:
# print(res['errMsg'])
# 领取奖励
def happyDigExchange(cookie):
for n in range(1,4):
xueliang(cookie)
print(f"\n开始领取第{n}场的奖励")
body={"round":n,"linkId":linkId}
res=taskGetUrl("happyDigExchange", body, cookie)
if not res:
return
if res['code']==0:
if res['success']:
try:
print(f"已领取极速版红包 {res['data']['redValue']} 🧧")
except:
print('')
if res['data']['wxValue'] != "0":
try:
print(f"可提现微信零钱 {res['data']['wxValue']} 💰")
except:
pass
else:
print(res['errMsg'])
else:
print(res['errMsg'])
# 微信现金id
def spring_reward_list(cookie):
happyDigExchange(cookie)
xueliang(cookie)
body={"linkId":linkId,"pageNum":1,"pageSize":6}
res=taskGetUrl("spring_reward_list", body, cookie)
if res['code']==0:
if res['success']:
items=res['data']['items']
for _items in items:
amount=_items['amount'] # 金额
prizeDesc=_items['prizeDesc'] # 金额备注
amountid=_items['id'] # 金额id
poolBaseId=_items['poolBaseId']
prizeGroupId=_items['prizeGroupId']
prizeBaseId=_items['prizeBaseId']
if '红包' in f"{prizeDesc}":
continue
if '' in f"{prizeDesc}":
continue
else:
print('\n去提现微信零钱 💰')
time.sleep(3.2)
wecat(cookie,amountid,poolBaseId,prizeGroupId,prizeBaseId)
else:
print(f'获取数据失败\n{res}\n')
else:
print(f'获取数据失败\n{res}\n')
# 微信提现
def wecat(cookie,amountid,poolBaseId,prizeGroupId,prizeBaseId):
xueliang(cookie)
url='https://api.m.jd.com'
headers={
'Cookie': cookie,
'Host': 'api.m.jd.com',
'Connection': 'keep-alive',
'origin': 'https://bnzf.jd.com',
'Content-Type': 'application/x-www-form-urlencoded',
"User-Agent": ua(),
'Accept-Language': 'zh-cn',
'Accept-Encoding': 'gzip, deflate, br',
}
body={"businessSource":"happyDiggerH5Cash","base":{"id":amountid,"business":"happyDigger","poolBaseId":poolBaseId,"prizeGroupId":prizeGroupId,"prizeBaseId":prizeBaseId,"prizeType":4},"linkId":linkId}
data=f"functionId=apCashWithDraw&body={json.dumps(body)}&t=1635596380119&appid=activities_platform&client=H5&clientVersion=1.0.0"
for n in range(3):
try:
res=requests.post(url,headers=headers,data=data,timeout=10).json()
break
except:
if n==2:
print('API请求失败请检查网路重试❗\n')
try:
if res['code']==0:
if res['success']:
print(res['data']['message']+'\n')
except:
print(res)
print('')
def main():
print('🔔发财挖宝,开始!\n')
# print('获取助力码\n')
# global inviteCode_1_list,inviteCode_2_list
# inviteCode_1_list=list()
# inviteCode_2_list=list()
# for cookie in cookie_list:
# inviteCode(cookie)
# print('互助\n')
# inviteCode_2_list=inviteCode_2_list[:2]
# for e,fcwbinviter in enumerate(inviteCode_2_list):
# fcwbinviteCode=inviteCode_1_list[e]
# for cookie in cookie_list:
# happyDigHelp(cookie,fcwbinviter,fcwbinviteCode)
print(f'====================共{len(cookie_list)}京东个账号Cookie=========\n')
for e,cookie in enumerate(cookie_list,start=1):
print(f'******开始【账号 {e}{get_pin(cookie)} *********\n')
apDoTask(cookie)
happyDigHome(cookie)
spring_reward_list(cookie)
if __name__ == '__main__':
main()

File diff suppressed because one or more lines are too long

11
jd_harmony_auto.js Normal file

File diff suppressed because one or more lines are too long

7
jd_lzdz1.js Normal file

File diff suppressed because one or more lines are too long

31
jd_lzdz1_joinCommon_jm.js Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -7,12 +7,13 @@
运行流程设置助力码--过滤黑号--助力--领取任务奖励
助理吗变量多个用&号隔开
DYJSHAREID = 'xxx&xxx&xxx'
10 10 10 10 * https://raw.githubusercontent.com/6dylan6/jdpro/main/jd_makemoneyshop.js
修改来自 https://raw.githubusercontent.com/6dylan6/jdpro/main/jd_makemoneyshop.js
By: https://github.com/6dylan6/jdpro
updatetime: 2022/11/13 不过滤黑号了直接助力
10 10 * * * jd_makemoneyshop_award.js
*/
const $ = new Env('特价版大赢家');
const $ = new Env('特价版大赢家日常任务');
const notify = $.isNode() ? require('./sendNotify') : '';
const jdCookieNode = $.isNode() ? require('./jdCookie.js') : '';
//IOS等用户直接用NobyDa的jd cookie
@@ -26,82 +27,12 @@ if ($.isNode()) {
} else {
cookiesArr = [$.getdata('CookieJD'), $.getdata('CookieJD2'), ...jsonParse($.getdata('CookiesJD') || "[]").map(item => item.cookie)].filter(item => !!item);
}
if (process.env.DYJSHAREID) {
if (process.env.DYJSHAREID.indexOf('&') > -1) {
shareId = process.env.DYJSHAREID.split('&');
} else {
shareId = [process.env.DYJSHAREID];
}
}
let helpinfo = {};
!(async () => {
if (!cookiesArr[0]) {
$.msg($.name, '【提示】请先获取京东账号一cookie\n直接使用NobyDa的京东签到获取', 'https://bean.m.jd.com/bean/signIndex.action', { "open-url": "https://bean.m.jd.com/bean/signIndex.action" });
return;
}
console.log('\n运行一遍可以看到助力码然后设置需要助力的')
console.log('\n运行流程助力--领取任务奖励!!!\n')
// for (let i = 0; i < cookiesArr.length; i++) {
// if (cookiesArr[i]) {
// cookie = cookiesArr[i];
// $.UserName = decodeURIComponent(cookie.match(/pt_pin=([^; ]+)(?=;?)/) && cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1])
// $.index = i + 1;
// $.isLogin = true;
// $.nickName = '';
// $.canUseCoinAmount = 0;
// helpinfo[$.UserName] = {};
// UA = require('./USER_AGENTS').UARAM();
// helpinfo[$.UserName].ua = UA;
// await TotalBean();
// console.log(`\n******开始【京东账号${$.index}】${$.nickName || $.UserName}*********\n`);
// if (!$.isLogin) {
// $.msg($.name, `【提示】cookie已失效`, `京东账号${$.index} ${$.nickName || $.UserName}\n请重新登录获取\nhttps://bean.m.jd.com/bean/signIndex.action`, { "open-url": "https://bean.m.jd.com/bean/signIndex.action" });
// if ($.isNode()) {
// await notify.sendNotify(`${$.name}cookie已失效 - ${$.UserName}`, `京东账号${$.index} ${$.UserName}\n请重新登录获取cookie`);
// }
// continue
// }
// await getinfo(1);
// await $.wait(1000);
// }
// }
if (shareId.length > 0) {
console.log('\n\n开始助力...')
$.index = 1;
$.fullhelp = false;
let k = 0;
let m = cookiesArr.length;
$.ADID = getUUID("xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", 1);
$.UUID = getUUID("xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx");
for (let j = 0; j < shareId.length; j++) {
console.log('\n去助力--> ' + shareId[j]);
helpnum = 0;
if ($.index === m) { console.log('已无账号可用于助力!结束\n'); break };
for (let i = k; i < m; i++) {
if (helpnum == 10) { console.log('助力已满,跳出!\n'); k = i; break };
if ($.fullhelp) { console.log('助力已满,跳出!\n'); k = i - 1; break };
if (cookiesArr[i]) {
cookie = cookiesArr[i];
$.UserName = decodeURIComponent(cookie.match(/pt_pin=([^; ]+)(?=;?)/) && cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]);
$.index = i + 1;
helpinfo[$.UserName] = {};
UA = `jdapp;iPhone;9.5.4;13.6;${$.UUID};network/wifi;ADID/${$.ADID};model/iPhone10,3;addressid/0;appBuild/167668;jdSupportDarkMode/0;Mozilla/5.0 (iPhone; CPU iPhone OS 13_6 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1`
helpinfo[$.UserName].ua = UA;
console.log(`\n开始【账号${$.index}${$.nickName || $.UserName}`);
if (helpinfo[$.UserName].nohelp) { console.log('已无助力次数了'); continue };
//if (helpinfo[$.UserName].hot) { console.log('可能黑了,跳过!'); continue };
await help(shareId[j]);
//console.log('随机等待1-2秒');
await $.wait(parseInt(Math.random() * 1000 + 1000, 10))
}
}
}
} else {
console.log('无助立马请设置!!\n')
}
console.log('开始领取任务奖励...')
for (let i = 0; i < cookiesArr.length; i++) {
@@ -110,6 +41,8 @@ let helpinfo = {};
$.UserName = decodeURIComponent(cookie.match(/pt_pin=([^; ]+)(?=;?)/) && cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1])
$.index = i + 1;
$.canUseCoinAmount = 0;
$.ADID = getUUID("xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", 1);
$.UUID = getUUID("xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx");
try {
UA = helpinfo[$.UserName].ua;
} catch (e) {
@@ -154,15 +87,25 @@ function getUUID(format = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", UpperCase
});
}
function getinfo(xc) {
let opt = {
url: `https://api.m.jd.com/api?g_ty=h5&g_tk=&appCode=msc588d6d5&body=%7B%22activeId%22%3A%2263526d8f5fe613a6adb48f03%22%2C%22isFirst%22%3A1%2C%22operType%22%3A1%7D&appid=jdlt_h5&client=jxh5&functionId=makemoneyshop_home&clientVersion=1.2.5&h5st=20221202224421183%3B5zi6yg6hy6dijtc6%3B638ee%3Btk02waef91cf118n77Hw3bHueBsVVy52Wbcx9h4HMPM7fpi9ntRoot7vaa118bRqqEnduYVLqW8kyzHpNsDp5PtrZ8tJ%3B8e13afd153316da1c4878705d9e1f17b27db283c%3B400%3B1669992261183%3Bf28308408a6bad45ead939c02e9cf1e489ad7a120db68c73bdee607bdb6db9daaf6fd9e2d4b87320f4ec869d11fb7fa97ea7bffc29059dfb373214547287d0a2f8d2de03200d84c4776d0464313a08e3488339db94ee9194cfb8237a7678d9020d0c6d9df83ea6c18193626f396ff6f9d41ff0a831b19868640ee15d264ac55bdd144f2a8323f8168cb761f298ab19b00bc20f917401a5f65df079011591dba83f9ee65e3fc211cbadb9211443680603&loginType=2&sceneval=2`,
headers: {
'Origin': 'https://wq.jd.com',
'Referer': 'https://wqs.jd.com/',
'User-Agent': UA,
'Cookie': cookie
}
};
return new Promise(async (resolve) => {
$.get(taskUrl('makemoneyshop/home', 'activeId=63526d8f5fe613a6adb48f03&_stk=activeId&_ste=1'), async (err, resp, data) => {
$.get(opt, async (err, resp, data) => {
try {
if (err) {
console.log(`${JSON.stringify(err)}`)
console.log(` API请求失败请检查网路重试`)
} else {
let tostr = data.match(/\((\{.*?\})\)/)[1];
data = eval('(' + tostr + ')');
// let tostr = data.match(/\((\{.*?\})\)/)[1];
// data = eval('(' + tostr + ')');
data = JSON.parse(data);
if (data.code == 0) {
if (xc) {
let sId = data.data.shareId;
@@ -235,89 +178,18 @@ function Award(id) {
})
}
function help(shareid) {
return new Promise(async (resolve) => {
$.get(taskUrl('makemoneyshop/guesthelp', `activeId=63526d8f5fe613a6adb48f03&shareId=${shareid}&_stk=activeId,shareId&_ste=1`), async (err, resp, data) => {
try {
if (err) {
console.log(`${JSON.stringify(err)}`)
console.log(` API请求失败请检查网路重试`)
} else {
let tostr = data.match(/\((\{.*?\})\)/)[1];
data = eval('(' + tostr + ')');
if (data.code == 0) {
console.log('助力成功!');
helpinfo[$.UserName].nohelp = 1;
helpnum++;
} else if (data.msg === '已助力') {
console.log('你已助力过TA')
helpinfo[$.UserName].nohelp = 1;
} else if (data.msg === '助力任务已完成') {
$.fullhelp = true;
} else if (data.code === 1006) {
console.log('不能助力自己!');
// $.qqq = [];
// $.qqq.push($.index);
} else if (data.code === 1008) {
console.log('今日无助力次数了!');
} else if (data.msg.indexOf('火爆') > -1) {
console.log('此CK助力可能黑了');
} else {
console.log(data.msg);
}
}
} catch (e) {
$.logErr(e, resp)
} finally {
resolve(data)
}
})
})
}
function taskUrl(fn, body) {
return {
url: `https://wq.jd.com/${fn}?g_ty=h5&g_tk=&appCode=msc588d6d5&${body}&h5st=&sceneval=2&callback=__jsonp1667344808184`,
headers: {
'Origin': 'https://wq.jd.com',
'Referer': 'https://wqs.jd.com/sns/202210/20/make-money-shop/index.html?activeId=63526d8f5fe613a6adb48f03',
'Referer': 'https://wqs.jd.com/',
'User-Agent': UA,
'Cookie': cookie
}
}
}
function TotalBean() {
return new Promise((resolve) => {
const options = {
url: 'https://plogin.m.jd.com/cgi-bin/ml/islogin',
headers: {
"Cookie": cookie,
"referer": "https://h5.m.jd.com/",
"User-Agent": UA,
},
timeout: 10000
}
$.get(options, (err, resp, data) => {
try {
if (data) {
data = JSON.parse(data);
if (data.islogin === "1") {
} else if (data.islogin === "0") {
$.isLogin = false;
}
}
} catch (e) {
console.log(e);
}
finally {
resolve();
}
});
});
}
function jsonParse(str) {
if (typeof str == "string") {
try {

File diff suppressed because one or more lines are too long

View File

@@ -1,134 +0,0 @@
/**
* 京东-新品-魔方
* rabbit log
* cron: 10 9,12,15 * * *
*/
import {requireConfig, wait, post, get} from './TS_USER_AGENTS'
import {existsSync} from "fs";
import * as dotenv from 'dotenv'
let cookie: string = '', res: any = '', UserName: string, index: number, log: string = ''
let rabbitToken: string = process.env.RABBIT_TOKEN || '', tg_id: string = process.env.TG_ID || '', mf_logs: any
!(async () => {
dotenv.config()
if (existsSync('./test/mf_log.ts')) {
mf_logs = require('./test/mf_log').mf_logs
} else {
console.log('./test/mf_log not found')
}
let cookiesArr: any = await requireConfig()
for (let i = 0; i < cookiesArr.length; i++) {
cookie = cookiesArr[i]
UserName = decodeURIComponent(cookie.match(/pt_pin=([^;]*)/)![1])
index = i + 1
console.log(`\n开始【京东账号${index}${UserName}\n`)
res = await api("functionId=getInteractionHomeInfo&body=%7B%22sign%22%3A%22u6vtLQ7ztxgykLEr%22%7D&appid=content_ecology&client=wh5&clientVersion=1.0.0")
let sign: string = res.result.taskConfig.projectId
res = await api(`functionId=queryInteractiveInfo&body=%7B%22encryptProjectId%22%3A%22${sign}%22%2C%22sourceCode%22%3A%22acexinpin0823%22%2C%22ext%22%3A%7B%7D%7D&client=wh5&clientVersion=1.0.0&appid=content_ecology`)
for (let t of res.assignmentList) {
if (t.completionCnt < t.assignmentTimesLimit) {
if (t.ext) {
if (t.assignmentName === '每日签到') {
if (t.ext.sign1.status === 1) {
let signDay: number = t.ext.sign1.signList?.length || 0,
type: number = t.rewards[signDay].rewardType
console.log(signDay, type)
log = await getLog()
res = await api(`functionId=doInteractiveAssignment&body=${JSON.stringify({
"encryptProjectId": sign, "encryptAssignmentId": t.encryptAssignmentId, "sourceCode": "acexinpin0823", "itemId": "1", "actionType": "", "completionFlag": "", "ext": {}, "extParam": {"businessData": {"random": log.match(/"random":"(\d+)"/)[1]}, "signStr": log.match(/"log":"(.*)"/)[1], "sceneid": "XMFhPageh5"}
})}&client=wh5&clientVersion=1.0.0&appid=content_ecology`)
console.log('签到成功')
} else {
console.log('已签到')
}
}
for (let proInfo of t.ext.productsInfo ?? []) {
if (proInfo.status === 1) {
console.log(t.assignmentName)
log = await getLog()
res = await api(`functionId=doInteractiveAssignment&body=${encodeURIComponent(JSON.stringify({"encryptProjectId": sign, "encryptAssignmentId": t.encryptAssignmentId, "sourceCode": "acexinpin0823", "itemId": proInfo.itemId, "actionType": 0, "completionFlag": "", "ext": {}, "extParam": {"businessData": {"random": log.match(/"random":"(\d+)"/)[1]}, "signStr": log.match(/"log":"(.*)"/)[1], "sceneid": "XMFhPageh5"}}))}&client=wh5&clientVersion=1.0.0&appid=content_ecology`)
console.log(res.msg)
if (res.msg === '任务已完成') {
break
}
}
}
for (let proInfo of t.ext.shoppingActivity ?? []) {
if (proInfo.status === 1) {
console.log(t.assignmentName)
log = await getLog()
res = await api(`functionId=doInteractiveAssignment&body=${encodeURIComponent(JSON.stringify({"encryptProjectId": sign, "encryptAssignmentId": t.encryptAssignmentId, "sourceCode": "acexinpin0823", "itemId": proInfo.itemId, "actionType": 1, "completionFlag": "", "ext": {}, "extParam": {"businessData": {"random": log.match(/"random":"(\d+)"/)[1]}, "signStr": log.match(/"log":"(.*)"/)[1], "sceneid": "XMFhPageh5"}}))}&client=wh5&clientVersion=1.0.0&appid=content_ecology`)
console.log(res.msg)
await wait(t.ext.waitDuration * 1000)
log = await getLog()
res = await api(`functionId=doInteractiveAssignment&body=${encodeURIComponent(JSON.stringify({"encryptProjectId": sign, "encryptAssignmentId": t.encryptAssignmentId, "sourceCode": "acexinpin0823", "itemId": proInfo.itemId, "actionType": 0, "completionFlag": "", "ext": {}, "extParam": {"businessData": {"random": log.match(/"random":"(\d+)"/)[1]}, "signStr": log.match(/"log":"(.*)"/)[1], "sceneid": "XMFhPageh5"}}))}&client=wh5&clientVersion=1.0.0&appid=content_ecology`)
console.log(res.msg)
}
}
for (let proInfo of t.ext.browseShop ?? []) {
if (proInfo.status === 1) {
console.log(t.assignmentName)
log = await getLog()
res = await api(`functionId=doInteractiveAssignment&body=${JSON.stringify({
"encryptProjectId": sign, "encryptAssignmentId": t.encryptAssignmentId, "sourceCode": "acexinpin0823", "itemId": proInfo.itemId, "actionType": 1, "completionFlag": "", "ext": {}, "extParam": {"businessData": {"random": log.match(/"random":"(\d+)"/)[1]}, "signStr": log.match(/"log":"(.*)"/)[1], "sceneid": "XMFhPageh5"}
})}&client=wh5&clientVersion=1.0.0&appid=content_ecology`)
console.log(res.msg)
await wait(t.ext.waitDuration * 1000)
log = await getLog()
res = await api(`functionId=doInteractiveAssignment&body=${JSON.stringify({
"encryptProjectId": sign, "encryptAssignmentId": t.encryptAssignmentId, "sourceCode": "acexinpin0823", "itemId": proInfo.itemId, "actionType": 0, "completionFlag": "", "ext": {}, "extParam": {"businessData": {"random": log.match(/"random":"(\d+)"/)[1]}, "signStr": log.match(/"log":"(.*)"/)[1], "sceneid": "XMFhPageh5"}
})}&client=wh5&clientVersion=1.0.0&appid=content_ecology`)
console.log(res.msg)
}
}
for (let proInfo of t.ext.addCart ?? []) {
if (proInfo.status === 1) {
console.log(t.assignmentName)
log = await getLog()
res = await api(`functionId=doInteractiveAssignment&body=${encodeURIComponent(JSON.stringify({"encryptProjectId": sign, "encryptAssignmentId": t.encryptAssignmentId, "sourceCode": "acexinpin0823", "itemId": proInfo.itemId, "actionType": "0", "completionFlag": "", "ext": {}, "extParam": {"businessData": {"random": log.match(/"random":"(\d+)"/)[1]}, "signStr": log.match(/"log":"(.*)"/)[1], "sceneid": "XMFJGh5"}}))}&client=wh5&clientVersion=1.0.0&appid=content_ecology`)
console.log(res.msg)
if (res.msg === '任务已完成') {
break
}
}
}
} else if (t.assignmentName === '去新品频道逛逛') {
}
}
}
}
})()
async function api(params: string) {
await wait(1000)
return await post("https://api.m.jd.com/client.action", params, {
'Content-Type': 'application/x-www-form-urlencoded',
"User-Agent": "Mozilla/5.0 (Linux; U; Android 8.0.0; zh-cn; Mi Note 2 Build/OPR1.170623.032) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/61.0.3163.128 Mobile Safari/537.36 XiaoMi/MiuiBrowser/10.1.1",
'Referer': 'https://h5.m.jd.com/babelDiy/Zeus/2bf3XEEyWG11pQzPGkKpKX2GxJz2/index.html',
'Origin': 'https://h5.m.jd.com',
'Host': 'api.m.jd.com',
'Cookie': cookie
})
}
async function getLog() {
if (rabbitToken && tg_id) {
console.log('rabbit log api')
let {data} = await get(`http://www.madrabbit.cf:8080/license/log?tg_id=${tg_id}&token=${rabbitToken}`)
return `'"random":"${data.random}","log":"${data.log}"'`
} else if (mf_logs) {
return mf_logs[Math.floor(Math.random() * mf_logs.length)]
} else {
console.log('No log')
process.exit(0)
}
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

1062
jd_pet.js

File diff suppressed because it is too large Load Diff

View File

@@ -1,64 +0,0 @@
//40 5,12,21 * * * m_jd_pet_automation.js
//问题反馈:https://t.me/Wall_E_Channel
const {Env} = require('./magic');
const $ = new Env('M萌宠自动化');
let commodityName = process.env.M_JD_PET_COMMODITY
? process.env.M_JD_PET_COMMODITY
: ''
$.log('默认4级商品生产指定商品请自行配置 M_JD_PET_COMMODITY')
$.logic = async function () {
let info = await api('initPetTown', {"version": 1});
$.log(JSON.stringify(info));
debugger
if (info?.result?.petStatus < 5) {
return
}
if (info?.result?.petStatus === 5) {
$.log(info?.result?.goodsInfo);
let activityId = info?.result?.goodsInfo.activityId;
let activityIds = info?.result?.goodsInfo.activityIds;
let data = await api('redPacketExchange',
{"activityId": activityId, "activityIds": activityIds});
$.putMsg(`${info?.result?.goodsInfo.exchangeMedalNum === 4 ? '12'
: '25'}红包,${$.formatDate(
$.timestamp() + data.result.pastDays * 24 * 60 * 60 * 1000)}过期`)
info = await api('initPetTown', {"version": 1});
}
if (info?.result?.petStatus === 6) {
info = await api('goodsInfoList', {"type": 2})
let goods = commodityName ? info.result.goodsList.filter(
o => o.goodsName.includes(commodityName))[0]
: info.result.goodsList.filter(o => o.exchangeMedalNum === 4)[0];
if (!goods) {
$.putMsg(`没找到你要生产的 ${commodityName}`)
return
}
info = await api('goodsInfoUpdate', {"goodsId": goods.goodsId})
$.putMsg(`生产【${info.result.goodsInfo.goodsName}】成功`)
}
};
$.run({
wait: [2000, 3000], whitelist: ['1-15']
}).catch(
reason => $.log(reason));
// noinspection DuplicatedCode
async function api(fn, body) {
let url = `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=pet-town`
//↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓请求头↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓
let headers = {
"Cookie": $.cookie,
"Connection": "keep-alive",
"Accept": "*/*",
"Host": "api.m.jd.com",
'User-Agent': `Mozilla/5.0 (iPhone; CPU iPhone OS 14_5_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 MicroMessenger/8.0.4(0x1800042c) NetType/4G Language/zh_CN miniProgram`,
"Accept-Encoding": "gzip, deflate, br",
"Accept-Language": "zh-cn"
}
let {data} = await $.request(url, headers)
await $.wait(1000, 3000)
return data;
}

File diff suppressed because one or more lines are too long

View File

@@ -96,7 +96,7 @@ function info() {
const nm = {
url: `${JD_API_HOST}`,
body: `functionId=initiateCoinDozer&body={"actId":"e6ad1ef1a55c440e9054e663be14e1d6","channel":"coin_dozer","antiToken":"","referer":"-1","frontendInitStatus":"s"}&appid=megatron&client=ios&clientVersion=14.3&t=1636014459632&networkType=4g&eid=&fp=-1&frontendInitStatus=s&uuid=8888&osVersion=14.3&d_brand=&d_model=&agent=-1&pageClickKey=-1&screen=400*700&platform=3&lang=zh_CN`,
body: `functionId=initiateCoinDozer&body={"actId":"ccd0447255384f06ae26690993be27f1","channel":"coin_dozer","antiToken":"","referer":"-1","frontendInitStatus":"s"}&appid=megatron&client=ios&clientVersion=14.3&t=1636014459632&networkType=4g&eid=&fp=-1&frontendInitStatus=s&uuid=8888&osVersion=14.3&d_brand=&d_model=&agent=-1&pageClickKey=-1&screen=400*700&platform=3&lang=zh_CN`,
headers: {
"Cookie": cookie,
"Origin": "https://pushgold.jd.com",
@@ -139,7 +139,7 @@ function coinDozerBackFlow() {
const nm = {
url: `${JD_API_HOST}`,
body: `functionId=coinDozerBackFlow&body={"actId":"e6ad1ef1a55c440e9054e663be14e1d6","channel":"coin_dozer","antiToken":"","referer":"-1","frontendInitStatus":"s"}&appid=megatron&client=ios&clientVersion=14.3&t=1636015617899&networkType=4g&eid=&fp=-1&frontendInitStatus=s&uuid=8888&osVersion=14.3&d_brand=&d_model=&agent=-1&pageClickKey=-1&screen=400*700&platform=3&lang=zh_CN`,
body: `functionId=coinDozerBackFlow&body={"actId":"ccd0447255384f06ae26690993be27f1","channel":"coin_dozer","antiToken":"","referer":"-1","frontendInitStatus":"s"}&appid=megatron&client=ios&clientVersion=14.3&t=1636015617899&networkType=4g&eid=&fp=-1&frontendInitStatus=s&uuid=8888&osVersion=14.3&d_brand=&d_model=&agent=-1&pageClickKey=-1&screen=400*700&platform=3&lang=zh_CN`,
headers: {
"Cookie": cookie,
@@ -180,7 +180,7 @@ function helpCoinDozer(packetId) {
return new Promise((resolve) => {
const nm = {
url: `${JD_API_HOST}`,
body: `functionId=helpCoinDozer&appid=station-soa-h5&client=H5&clientVersion=1.0.0&t=1636015855103&body={"actId":"e6ad1ef1a55c440e9054e663be14e1d6","channel":"coin_dozer","antiToken":"","referer":"-1","frontendInitStatus":"s","packetId":"${packetId}"}&_ste=1&_stk=appid,body,client,clientVersion,functionId,t&h5st=20211104165055104;9806356985655163;10005;tk01wd1ed1d5f30nBDriGzaeVZZ9vuiX+cBzRLExSEzpfTriRD0nxU6BbRIOcSQvnfh74uInjSeb6i+VHpnHrBJdVwzs;017f330f7a84896d31a8d6017a1504dc16be8001273aaea9a04a8d04aad033d9`,
body: `functionId=helpCoinDozer&appid=station-soa-h5&client=H5&clientVersion=1.0.0&t=1636015855103&body={"actId":"ccd0447255384f06ae26690993be27f1","channel":"coin_dozer","antiToken":"","referer":"-1","frontendInitStatus":"s","packetId":"${packetId}"}&_ste=1&_stk=appid,body,client,clientVersion,functionId,t&h5st=20211104165055104;9806356985655163;10005;tk01wd1ed1d5f30nBDriGzaeVZZ9vuiX+cBzRLExSEzpfTriRD0nxU6BbRIOcSQvnfh74uInjSeb6i+VHpnHrBJdVwzs;017f330f7a84896d31a8d6017a1504dc16be8001273aaea9a04a8d04aad033d9`,
headers: {
"Cookie": cookie,
@@ -220,7 +220,7 @@ function help(packetId) {
return new Promise((resolve) => {
const nm = {
url: `${JD_API_HOST}`,
body: `functionId=helpCoinDozer&appid=station-soa-h5&client=H5&clientVersion=1.0.0&t=1623120183787&body={"actId":"e6ad1ef1a55c440e9054e663be14e1d6","channel":"coin_dozer","antiToken":"","referer":"-1","frontendInitStatus":"s","packetId":"${packetId}","helperStatus":"0"}&_ste=1&_stk=appid,body,client,clientVersion,functionId,t&h5st=20210608104303790;8489907903583162;10005;tk01w89681aa9a8nZDdIanIyWnVuWFLK4gnqY+05WKcPY3NWU2dcfa73B7PBM7ufJEN0U+4MyHW5N2mT/RNMq72ycJxH;7e6b956f1a8a71b269a0038bbb4abd24bcfb834a88910818cf1bdfc55b7b96e5`,
body: `functionId=helpCoinDozer&appid=station-soa-h5&client=H5&clientVersion=1.0.0&t=1623120183787&body={"actId":"ccd0447255384f06ae26690993be27f1","channel":"coin_dozer","antiToken":"","referer":"-1","frontendInitStatus":"s","packetId":"${packetId}","helperStatus":"0"}&_ste=1&_stk=appid,body,client,clientVersion,functionId,t&h5st=20210608104303790;8489907903583162;10005;tk01w89681aa9a8nZDdIanIyWnVuWFLK4gnqY+05WKcPY3NWU2dcfa73B7PBM7ufJEN0U+4MyHW5N2mT/RNMq72ycJxH;7e6b956f1a8a71b269a0038bbb4abd24bcfb834a88910818cf1bdfc55b7b96e5`,
headers: {
"Cookie": cookie,
@@ -268,7 +268,7 @@ function getCoinDozerInfo() {
const nm = {
url: `${JD_API_HOST}`,
body: `functionId=getCoinDozerInfo&body={"actId":"e6ad1ef1a55c440e9054e663be14e1d6","channel":"coin_dozer","antiToken":"","referer":"-1","frontendInitStatus":"s"}&appid=megatron&client=ios&clientVersion=14.3&t=1636015858295&networkType=4g&eid=&fp=-1&frontendInitStatus=s&uuid=8888&osVersion=14.3&d_brand=&d_model=&agent=-1&pageClickKey=-1&screen=400*700&platform=3&lang=zh_CN`,
body: `functionId=getCoinDozerInfo&body={"actId":"ccd0447255384f06ae26690993be27f1","channel":"coin_dozer","antiToken":"","referer":"-1","frontendInitStatus":"s"}&appid=megatron&client=ios&clientVersion=14.3&t=1636015858295&networkType=4g&eid=&fp=-1&frontendInitStatus=s&uuid=8888&osVersion=14.3&d_brand=&d_model=&agent=-1&pageClickKey=-1&screen=400*700&platform=3&lang=zh_CN`,
headers: {
"Cookie": cookie,
"Origin": "https://pushgold.jd.com",

View File

@@ -1,556 +0,0 @@
/*
分享到QQ查看邀请码 packetId就是
#自定义变量
export tytpacketId=""
[task_local]
#推一推助力码
0 0 * * * jd_tyt.js, tag=推一推, img-url=https://raw.githubusercontent.com/Orz-3/mini/master/Color/jd.png, enabled=true
注意:助力码每天会变,旧的不可用。
助力逻辑:优先助力互助码变量
入口-极速版-推推赚大钱 5元无门槛卷 大概需要50人助力
*/
const $ = new Env('推推赚大钱-快速');
const notify = $.isNode() ? require('./sendNotify') : '';
//Node.js用户请在jdCookie.js处填写京东ck;
const jdCookieNode = $.isNode() ? require('./jdCookie.js') : '';
const ua = `jdltapp;iPhone;3.1.0;${Math.ceil(Math.random()*4+10)}.${Math.ceil(Math.random()*4)};${randomString(40)}`
var status = 0
//IOS等用户直接用NobyDa的jd cookie
let cookiesArr = [],
cookie = '',
message;
let tytpacketId = '';
if (process.env.tytpacketId) {
tytpacketId = process.env.tytpacketId;
}
if ($.isNode()) {
Object.keys(jdCookieNode).forEach((item) => {
cookiesArr.push(jdCookieNode[item])
})
// if (process.env.JD_DEBUG && process.env.JD_DEBUG === 'false') console.log = () => {};
} else {
cookiesArr = [$.getdata('CookieJD'), $.getdata('CookieJD2'), ...jsonParse($.getdata('CookiesJD') || "[]").map(item => item.cookie)].filter(item => !!item);
}
const JD_API_HOST = 'https://api.m.jd.com/client.action';
!(async() => {
if (!cookiesArr[0]) {
$.msg($.name, '【提示】请先获取京东账号一cookie\n直接使用NobyDa的京东签到获取', 'https://bean.m.jd.com/bean/signIndex.action', {
"open-url": "https://bean.m.jd.com/bean/signIndex.action"
});
return;
}
console.log("推一推开始")
for (let i = cookiesArr.length - 1; i > 0; i--) {
if (cookiesArr[i]) {
cookie = cookiesArr[i];
$.UserName = decodeURIComponent(cookie.match(/pt_pin=([^; ]+)(?=;?)/) && cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1])
$.index = i + 1;
$.isLogin = true;
$.nickName = '';
message = '';
await TotalBean();
console.log(`\n******开始【京东账号${$.index}${$.nickName || $.UserName}*********\n`);
if (!$.isLogin) {
$.msg($.name, `【提示】cookie已失效`, `京东账号${$.index} ${$.nickName || $.UserName}\n请重新登录获取\nhttps://bean.m.jd.com/bean/signIndex.action`, {
"open-url": "https://bean.m.jd.com/bean/signIndex.action"
});
if ($.isNode()) {
await notify.sendNotify(`${$.name}cookie已失效 - ${$.UserName}`, `京东账号${$.index} ${$.UserName}\n请重新登录获取cookie`);
}
continue
}
if (status == 1) {
break
}
await tythelp()
await $.wait(15000)
}
}
console.log("推一推结束")
})()
.catch((e) => {
$.log('', `${$.name}, 失败! 原因: ${e}!`, '')
})
.finally(() => {
$.done();
})
function tythelp() {
return new Promise(async(resolve) => {
let options = {
url: `https://api.m.jd.com/?t=1623066557140`,
body: `functionId=helpCoinDozer&appid=station-soa-h5&client=H5&clientVersion=1.0.0&t=1623120183787&body={"actId":"3075b6eab065464dad1c4042d345ac97","channel":"coin_dozer","antiToken":"","referer":"-1","frontendInitStatus":"s","packetId":"${tytpacketId}","helperStatus":"0"}&_ste=1&_stk=appid,body,client,clientVersion,functionId,t&h5st=20210608104303790;8489907903583162;10005;tk01w89681aa9a8nZDdIanIyWnVuWFLK4gnqY+05WKcPY3NWU2dcfa73B7PBM7ufJEN0U+4MyHW5N2mT/RNMq72ycJxH;7e6b956f1a8a71b269a0038bbb4abd24bcfb834a88910818cf1bdfc55b7b96e5`,
headers: {
"Origin": "https://pushgold.jd.com",
"Host": "api.m.jd.com",
"Accept": "application/json, text/plain, */*",
"User-Agent": ua,
"Cookie": cookie,
}
}
$.post(options, async(err, resp, data) => {
try {
data = JSON.parse(data);
if (data.code == 0) {
console.log("帮砍:" + data.data.amount)
} else if (data.msg.indexOf("完成") != -1) {
console.log("已完成砍价")
status = 1
} else {
if (data.msg !== "need verify"){
console.log(data.msg)
}
console.log(data.msg)
}
} catch (e) {
$.logErr(e, resp);
} finally {
resolve();
}
});
});
}
function randomString(e) {
e = e || 32;
let t = "abcdefhijkmnprstwxyz2345678",
a = t.length,
n = "";
for (i = 0; i < e; i++)
n += t.charAt(Math.floor(Math.random() * a));
return n
}
async function taskPostUrl(functionId, body) {
return {
url: `${JD_API_HOST}`,
body: `functionId=${functionId}&body=${escape(JSON.stringify(body))}&client=wh5&clientVersion=1.0.0&appid=content_ecology&uuid=6898c30638c55142969304c8e2167997fa59eb54&t=1622588448365`,
headers: {
'Cookie': cookie,
'Host': 'api.m.jd.com',
'Connection': 'keep-alive',
'Content-Type': 'application/x-www-form-urlencoded',
"User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1"),
'Accept-Language': 'zh-cn',
'Accept-Encoding': 'gzip, deflate, br',
}
}
}
async function TotalBean() {
return new Promise(async resolve => {
const options = {
"url": `https://wq.jd.com/user/info/QueryJDUserInfo?sceneval=2`,
"headers": {
"Accept": "application/json,text/plain, */*",
"Content-Type": "application/x-www-form-urlencoded",
"Accept-Encoding": "gzip, deflate, br",
"Accept-Language": "zh-cn",
"Connection": "keep-alive",
"Cookie": cookie,
"Referer": "https://wqs.jd.com/my/jingdou/my.shtml?sceneval=2",
"User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1")
}
}
$.post(options, (err, resp, data) => {
try {
if (err) {
console.log(`${JSON.stringify(err)}`)
console.log(`${$.name} API请求失败请检查网路重试`)
} else {
if (data) {
data = JSON.parse(data);
if (data["retcode"] === 13) {
$.isLogin = false; //cookie过期
return;
}
if (data["retcode"] === 0) {
$.nickName = (data["base"] && data["base"].nickname) || $.UserName;
} else {
$.nickName = $.UserName;
}
} else {
console.log(`京东服务器返回空数据`)
}
}
} catch (e) {
$.logErr(e, resp)
} finally {
resolve();
}
})
})
}
async function safeGet(data) {
try {
if (typeof JSON.parse(data) == "object") {
return true;
}
} catch (e) {
console.log(e);
console.log(`京东服务器访问数据为空,请检查自身设备网络情况`);
return false;
}
}
function jsonParse(str) {
if (typeof str == "string") {
try {
return JSON.parse(str);
} catch (e) {
console.log(e);
$.msg($.name, '', '请勿随意在BoxJs输入框修改内容\n建议通过脚本去获取cookie')
return [];
}
}
}
// prettier-ignore
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)
}

9
jd_xm.js Executable file

File diff suppressed because one or more lines are too long

View File

@@ -1,49 +0,0 @@
let common = require("./function/common");
let $ = new common.env('京喜购物返红包助力');
let min = 5,
help = $.config[$.filename(__filename)] || Math.min(min, $.config.JdMain) || min;
$.setOptions({
headers: {
'content-type': 'application/json',
'user-agent': 'jdapp;iPhone;9.4.6;14.2;965af808880443e4c1306a54afdd5d5ae771de46;network/wifi;supportApplePay/0;hasUPPay/0;hasOCPay/0;model/iPhone8,4;addressid/;supportBestPay/0;appBuild/167618;jdSupportDarkMode/0;Mozilla/5.0 (iPhone; CPU iPhone OS 14_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1',
'referer': 'https://happy.m.jd.com/babelDiy/Zeus/3ugedFa7yA6NhxLN5gw2L3PF9sQC/index.html?asid=287215626&un_area=12_904_905_57901&lng=117.612969135975&lat=23.94014745198865',
}
});
$.readme = `
在京喜下单,如订单有购物返现,脚本会自动查询返现groupid并予以助力,目前每个账号每天能助力3次
44 */6 * * * task ${$.runfile}
export ${$.runfile}=2 #如需增加被助力账号,在这边修改人数
`
eval(common.eval.mainEval($));
async function prepare() {
let url = `https://wq.jd.com/bases/orderlist/list?order_type=3&start_page=1&last_page=0&page_size=10&callersource=newbiz&t=${$.timestamp}&traceid=&g_ty=ls&g_tk=606717070`
for (let j of cookies['help']) {
$.setCookie(j);
await $.curl(url)
try {
for (let k of $.source.orderList) {
try {
let orderid = k.parentId != '0' ? k.parentId : k.orderId
let url = `https://wq.jd.com/fanxianzl/zhuli/QueryGroupDetail?isquerydraw=1&orderid=${orderid}&groupid=&sceneval=2&g_login_type=1&g_ty=ls`
let dec = await jxAlgo.dec(url)
await $.curl(dec.url)
let now = parseInt(new Date() / 1000)
let end = $.source.data.groupinfo.end_time
if (end > now && $.source.data.groupinfo.openhongbaosum != $.source.data.groupinfo.totalhongbaosum) {
let groupid = $.source.data.groupinfo.groupid;
$.sharecode.push({
'groupid': groupid
})
}
} catch (e) {}
}
} catch (e) {}
}
}
async function main(id) {
common.assert(id.groupid, '没有可助力ID')
let url = `http://wq.jd.com/fanxianzl/zhuli/Help?groupid=${id.groupid}&_stk=groupid&_ste=2&g_ty=ls&g_tk=1710198667&sceneval=2&g_login_type=1`
let dec = await jxAlgo.dec(url)
await $.curl(dec.url)
console.log($.source.data.prize.discount)
}

View File

@@ -21,7 +21,7 @@ const querystring = require('querystring');
const exec = require('child_process').exec;
const $ = new Env();
const timeout = 15000; //超时时间(单位毫秒)
console.log("加载sendNotify当前版本: 20220723");
console.log("加载sendNotify当前版本: 20221118");
// =======================================go-cqhttp通知设置区域===========================================
//gobot_url 填写请求地址http://127.0.0.1/send_private_msg
//gobot_token 填写在go-cqhttp文件设置的访问密钥
@@ -1968,7 +1968,7 @@ function GetnickName() {
Accept: "*/*",
Connection: "keep-alive",
Cookie: cookie,
"User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1"),
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/106.0.0.0 Safari/537.36 Edg/106.0.1370.42",
"Accept-Language": "zh-cn",
"Referer": "https://home.m.jd.com/myJd/newhome.action?sceneval=2&ufc=&",
"Accept-Encoding": "gzip, deflate, br"
@@ -2005,16 +2005,17 @@ function GetnickName() {
function GetnickName2() {
return new Promise(async(resolve) => {
const options = {
url: `https://wxapp.m.jd.com/kwxhome/myJd/home.json?&useGuideModule=0&bizId=&brandId=&fromType=wxapp&timestamp=${Date.now()}`,
headers: {
Cookie: cookie,
'content-type': `application/x-www-form-urlencoded`,
Connection: `keep-alive`,
'Accept-Encoding': `gzip,compress,br,deflate`,
Referer: `https://servicewechat.com/wxa5bf5ee667d91626/161/page-frame.html`,
Host: `wxapp.m.jd.com`,
'User-Agent': `Mozilla/5.0 (iPhone; CPU iPhone OS 15_0 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 MicroMessenger/8.0.10(0x18000a2a) NetType/WIFI Language/zh_CN`,
},
"url": `https://wq.jd.com/user/info/QueryJDUserInfo?sceneval=2`,
"headers": {
"Accept": "application/json,text/plain, */*",
"Content-Type": "application/x-www-form-urlencoded",
"Accept-Encoding": "gzip, deflate, br",
"Accept-Language": "zh-cn",
"Connection": "keep-alive",
"Cookie": cookie,
"Referer": "https://wqs.jd.com/my/jingdou/my.shtml?sceneval=2",
"User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1")
}
};
$.post(options, (err, resp, data) => {
try {
@@ -2023,13 +2024,12 @@ function GetnickName2() {
} else {
if (data) {
data = JSON.parse(data);
if (!data.user) {
if (data['retcode'] === 13) {
$.isLogin = false; //cookie过期
return;
return
}
const userInfo = data.user;
if (userInfo) {
$.nickName = userInfo.petName;
if (data['retcode'] === 0) {
$.nickName = (data['base'] && data['base'].nickname) || "";
}
} else {
$.log('京东服务器返回空数据');