Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
shufflewzc committed Sep 14, 2021
1 parent b7eab94 commit fc5b1d4
Show file tree
Hide file tree
Showing 7 changed files with 201 additions and 19 deletions.
24 changes: 17 additions & 7 deletions function/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,20 @@ class env {
console.log(`🔔${this.name}, 结束!\n`)
}
notify(array) {
let text = '';
let text = [];
let type = 0
for (let i of array) {
text += `${i.user} -- ${i.msg}\n`
text.push(`${i.user} -- ${i.msg}`)
type = i.type
}
console.log(`\n=============================开始发送提醒消息=============================`)
notify.sendNotify(this.name + "消息提醒", text)
if (type == 1) {
for (let i of text) {
notify.sendNotify(this.name + "消息提醒", i)
}
} else {
notify.sendNotify(this.name + "消息提醒", text.join('\n'))
}
}
wait(t) {
return new Promise(e => setTimeout(e, t))
Expand Down Expand Up @@ -123,18 +131,20 @@ class env {
loads(str) {
return JSON.parse(str)
}
notice(msg) {
notice(msg, type = 0) {
this.message.push({
'index': this.index,
'user': this.user,
'msg': msg
'msg': msg,
type
})
}
notices(msg, user, index = '') {
notices(msg, user, type = 0) {
this.message.push({
'user': user,
'msg': msg,
'index': index
// 'index': index,
type
})
}
urlparse(url) {
Expand Down
3 changes: 3 additions & 0 deletions function/eval.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ function mainEval($) {
}
$.sleep=cookies['all'].length * 500
taskCookie=cookies['all']
if($.config[\`\${$.runfile}_limit\`]){
taskCookie = cookies['all'].slice(0,parseInt($.config[\`\${$.runfile}_limit\`]))
}
jxAlgo = new common.jxAlgo();
if ($.readme) {
console.log(\`使用说明:\\n\${$.readme}\\n以上内容仅供参考,有需求自行添加\\n\`,)
Expand Down
18 changes: 9 additions & 9 deletions function/sendNotify.js
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ function serverNotify(text, desp, timeout = 2100) {
})
}, timeout)
} else {
console.log('\n\n您未提供server酱的SCKEY,取消微信推送消息通知🚫\n');
// console.log('\n\n您未提供server酱的SCKEY,取消微信推送消息通知🚫\n');
resolve()
}
})
Expand Down Expand Up @@ -253,7 +253,7 @@ function CoolPush(text, desp) {
}
})
} else {
console.log('您未提供酷推的SKEY,取消QQ推送消息通知🚫\n');
// console.log('您未提供酷推的SKEY,取消QQ推送消息通知🚫\n');
resolve()
}
})
Expand Down Expand Up @@ -290,7 +290,7 @@ function BarkNotify(text, desp, params = {}) {
}
})
} else {
console.log('您未提供Bark的APP推送BARK_PUSH,取消Bark推送消息通知🚫\n');
// console.log('您未提供Bark的APP推送BARK_PUSH,取消Bark推送消息通知🚫\n');
resolve()
}
})
Expand Down Expand Up @@ -344,7 +344,7 @@ function tgBotNotify(text, desp) {
}
})
} else {
console.log('您未提供telegram机器人推送所需的TG_BOT_TOKEN和TG_USER_ID,取消telegram推送消息通知🚫\n');
// console.log('您未提供telegram机器人推送所需的TG_BOT_TOKEN和TG_USER_ID,取消telegram推送消息通知🚫\n');
resolve()
}
})
Expand Down Expand Up @@ -412,7 +412,7 @@ function ddBotNotify(text, desp) {
}
})
} else {
console.log('您未提供钉钉机器人推送所需的DD_BOT_TOKEN或者DD_BOT_SECRET,取消钉钉推送消息通知🚫\n');
// console.log('您未提供钉钉机器人推送所需的DD_BOT_TOKEN或者DD_BOT_SECRET,取消钉钉推送消息通知🚫\n');
resolve()
}
})
Expand Down Expand Up @@ -454,7 +454,7 @@ function qywxBotNotify(text, desp) {
}
});
} else {
console.log('您未提供企业微信机器人推送所需的QYWX_KEY,取消企业微信推送消息通知🚫\n');
// console.log('您未提供企业微信机器人推送所需的QYWX_KEY,取消企业微信推送消息通知🚫\n');
resolve();
}
});
Expand Down Expand Up @@ -576,7 +576,7 @@ function qywxamNotify(text, desp) {
});
});
} else {
console.log('您未提供企业微信应用消息推送所需的QYWX_AM,取消企业微信应用消息推送消息通知🚫\n');
// console.log('您未提供企业微信应用消息推送所需的QYWX_AM,取消企业微信应用消息推送消息通知🚫\n');
resolve();
}
});
Expand Down Expand Up @@ -620,7 +620,7 @@ function iGotNotify(text, desp, params = {}) {
}
})
} else {
console.log('您未提供iGot的推送IGOT_PUSH_KEY,取消iGot推送消息通知🚫\n');
// console.log('您未提供iGot的推送IGOT_PUSH_KEY,取消iGot推送消息通知🚫\n');
resolve()
}
})
Expand Down Expand Up @@ -664,7 +664,7 @@ function pushPlusNotify(text, desp) {
}
})
} else {
console.log('您未提供push+推送所需的PUSH_PLUS_TOKEN,取消push+推送消息通知🚫\n');
// console.log('您未提供push+推送所需的PUSH_PLUS_TOKEN,取消push+推送消息通知🚫\n');
resolve()
}
})
Expand Down
72 changes: 72 additions & 0 deletions jd_aid_factory.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
let common = require("./function/common");
let $ = new common.env('京喜工厂助力');
let min = 3,
help = $.config[$.filename(__filename)] || Math.min(min, $.config.JdMain) || min;
$.setOptions({
headers: {
'content-type': 'application/json',
'user-agent': 'jdpingou;iPhone;4.8.2;13.7;a3b4e844090b28d5c38e7529af8115172079be4d;network/wifi;model/iPhone8,1;appBuild/100546;ADID/00000000-0000-0000-0000-000000000000;supportApplePay/1;hasUPPay/0;pushNoticeIsOpen/0;hasOCPay/0;supportBestPay/0;session/374;pap/JA2019_3111789;brand/apple;supportJDSHWK/1;Mozilla/5.0 (iPhone; CPU iPhone OS 13_7 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148',
'referer': 'https://st.jingxi.com/pingou/dream_factory/divide.html?activeId=laD7IwPwDF1-Te-MvbW9Iw==&_close=1&jxsid=16232028831911667857',
}
});
$.readme = `
44 */6 * * * task ${$.runfile}
export ${$.runfile}=2 #如需增加被助力账号,在这边修改人数
`
eval(common.eval.mainEval($));
async function prepare() {
let deramUrl = 'https://st.jingxi.com/pingou/dream_factory/index.html?ptag=7155.9.46'
let html = await $.curl(deramUrl)
try {
ary = $.matchall(/activeId=([^\&\,]+)","bgImg".+?"start":"([^\"]+)"/g, html)
dicts = {}
for (let i of ary) {
dicts[new Date(i[1]).getTime()] = i[0]
}
max = Math.max(...Object.keys(dicts).filter(d => parseInt(d) < $.timestamp))
$.activeId = dicts[max]
} catch (e) {
$.activeId = 'yNtpovqFehHByNrt_lmb3g=='
}
console.log("开团ID:", $.activeId)
let url = `https://m.jingxi.com/dreamfactory/tuan/QueryActiveConfig?activeId=${$.activeId}&tuanId=&_time=1623214804148&_stk=_time%2CactiveId%2CtuanId&_ste=1&sceneval=2&g_login_type=1&callback=jsonpCBKA&g_ty=ls`
let dec = await jxAlgo.dec(url)
for (let j of cookies['help']) {
$.setCookie(j);
await $.curl(dec.url)
try {
if ($.source.data.userTuanInfo.tuanId) {
$.sharecode.push($.compact($.source.data.userTuanInfo, ['activeId', 'tuanId']))
} else {}
} catch (e) {}
}
}
async function main(id) {
common.assert(id.activeId, '没有开团ID')
let url = `https://m.jingxi.com/dreamfactory/tuan/JoinTuan?activeId=${id.activeId}&tuanId=${id.tuanId}&_time=1623214617107&_stk=_time%2CactiveId%2CtuanId&_ste=1&sceneval=2&g_login_type=1&g_ty=ls`
let dec = await jxAlgo.dec(url)
let params = {
'url': dec.url,
'cookie': id.cookie
}
await $.curl(params)
console.log($.source)
}
async function extra() {
for (let j of cookies['help']) {
$.setCookie(j);
let url = `https://m.jingxi.com/dreamfactory/tuan/QueryActiveConfig?activeId=${$.activeId}&tuanId=&_time=1623214804148&_stk=_time%2CactiveId%2CtuanId&_ste=1&sceneval=2&g_login_type=1&callback=jsonpCBKA&g_ty=ls`
let dec = await jxAlgo.dec(url)
await $.curl(dec.url)
url = `https://m.jingxi.com/dreamfactory/tuan/Award?activeId=${$.source.data.userTuanInfo.activeId}&tuanId=${$.source.data.userTuanInfo.tuanId}&_time=1623518911051&_stk=_time%2CactiveId%2CtuanId&_ste=1&_=1623518911082&sceneval=2&g_login_type=1&callback=jsonpCBKF&g_ty=ls`
dec = await jxAlgo.dec(url)
await $.curl(dec.url)
console.log($.source)
if ($.source.msg != '您还没有成团') {
url = `https://m.jingxi.com/dreamfactory/tuan/CreateTuan?activeId=${$.activeId}&isOpenApp=1&_time=1624120758151&_stk=_time%2CactiveId%2CisOpenApp&_ste=1`
dec = await jxAlgo.dec(url)
await $.curl(dec.url)
console.log($.source)
}
}
}
6 changes: 3 additions & 3 deletions jd_work_price.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ $.setOptions({
});
$.readme = `
48 */8 * * * task ${$.runfile}
exprot ${$.runfile}=1 #输出购买订单保价内容,没什么用
export ${$.runfile}=1 #输出购买订单保价内容,没什么用
`
eval(common.eval.mainEval($));
async function prepare() {}
Expand All @@ -34,9 +34,9 @@ async function main(id) {
};
h = await $.curl(p)
console.log(h)
await $.wait(5000)
console.log("等待20s获取保价信息")
await $.wait(20000)
// 获取保价信息
console.log("获取保价订单")
let p2 = {
'url': `https://api.m.jd.com/api?appid=siteppM&functionId=siteppM_appliedSuccAmount&forcebot=&t=${$.timestamp}`,
// 'form': {
Expand Down
48 changes: 48 additions & 0 deletions jd_work_validate.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
let common = require("./function/common");
let $ = new common.env('京东验证码获取');
let validator = require("./function/jdValidate");
let fs = require("fs");
let min = 2,
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 = `
58 7,15,23 * * * task ${$.runfile}
export ${$.runfile}_limit=5 #限制跑验证码账户个数
export JDJR_SERVER=ip #如获取不到验证码,本地先获取iv.jd.com的ip,再自行添加环境变量
`
eval(common.eval.mainEval($));
async function prepare() {
$.thread = 1;
$.sleep *= 8;
await fs.writeFile('./jdvalidate.txt', '', (error) => {
if (error) return console.log("初始化失败" + error.message);
console.log("初始化成功");
})
}
async function main(id) {
let code = new validator.JDJRValidator;
for (let i = 0; i < 2; i++) {
validate = ''
try {
let veri = await code.run();
if (veri.validate) {
validate = veri.validate;
}
} catch (e) {}
// $.code.push(validate)
if (validate) {
fs.appendFile('./jdvalidate.txt', validate + "\n", (error) => {
if (error) return console.log("追加文件失败" + error.message);
console.log("追加成功");
})
}
console.log("验证码", validate)
}
try {} catch (e) {}
}
49 changes: 49 additions & 0 deletions jx_aid_cashback.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
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)
}

0 comments on commit fc5b1d4

Please sign in to comment.