mirror of https://github.com/KingRan/KR.git
main
commit
8fd2e7678b
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,539 @@
|
|||
const https = require('https');
|
||||
const http = require('http');
|
||||
const stream = require('stream');
|
||||
const zlib = require('zlib');
|
||||
const vm = require('vm');
|
||||
const PNG = require('png-js');
|
||||
let UA = `jdapp;iPhone;10.1.0;14.3;${randomString(40)};network/wifi;model/iPhone12,1;addressid/4199175193;appBuild/167774;jdSupportDarkMode/0;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1`;
|
||||
const validatorCount = process.env.JDJR_validator_Count ? process.env.JDJR_validator_Count : 100
|
||||
|
||||
function randomString(e) {
|
||||
e = e || 32;
|
||||
let t = "abcdef0123456789", a = t.length, n = "";
|
||||
for (i = 0; i < e; i++)
|
||||
n += t.charAt(Math.floor(Math.random() * a));
|
||||
return n
|
||||
}
|
||||
|
||||
Math.avg = function average() {
|
||||
var sum = 0;
|
||||
var len = this.length;
|
||||
for (var i = 0; i < len; i++) {
|
||||
sum += this[i];
|
||||
}
|
||||
return sum / len;
|
||||
};
|
||||
|
||||
function sleep(timeout) {
|
||||
return new Promise((resolve) => setTimeout(resolve, timeout));
|
||||
}
|
||||
|
||||
class PNGDecoder extends PNG {
|
||||
constructor(args) {
|
||||
super(args);
|
||||
this.pixels = [];
|
||||
}
|
||||
|
||||
decodeToPixels() {
|
||||
return new Promise((resolve) => {
|
||||
this.decode((pixels) => {
|
||||
this.pixels = pixels;
|
||||
resolve();
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
getImageData(x, y, w, h) {
|
||||
const {pixels} = this;
|
||||
const len = w * h * 4;
|
||||
const startIndex = x * 4 + y * (w * 4);
|
||||
|
||||
return {data: pixels.slice(startIndex, startIndex + len)};
|
||||
}
|
||||
}
|
||||
|
||||
const PUZZLE_GAP = 8;
|
||||
const PUZZLE_PAD = 10;
|
||||
|
||||
class PuzzleRecognizer {
|
||||
constructor(bg, patch, y) {
|
||||
// console.log(bg);
|
||||
const imgBg = new PNGDecoder(Buffer.from(bg, 'base64'));
|
||||
const imgPatch = new PNGDecoder(Buffer.from(patch, 'base64'));
|
||||
|
||||
// console.log(imgBg);
|
||||
|
||||
this.bg = imgBg;
|
||||
this.patch = imgPatch;
|
||||
this.rawBg = bg;
|
||||
this.rawPatch = patch;
|
||||
this.y = y;
|
||||
this.w = imgBg.width;
|
||||
this.h = imgBg.height;
|
||||
}
|
||||
|
||||
async run() {
|
||||
await this.bg.decodeToPixels();
|
||||
await this.patch.decodeToPixels();
|
||||
|
||||
return this.recognize();
|
||||
}
|
||||
|
||||
recognize() {
|
||||
const {ctx, w: width, bg} = this;
|
||||
const {width: patchWidth, height: patchHeight} = this.patch;
|
||||
const posY = this.y + PUZZLE_PAD + ((patchHeight - PUZZLE_PAD) / 2) - (PUZZLE_GAP / 2);
|
||||
// const cData = ctx.getImageData(0, a.y + 10 + 20 - 4, 360, 8).data;
|
||||
const cData = bg.getImageData(0, posY, width, PUZZLE_GAP).data;
|
||||
const lumas = [];
|
||||
|
||||
for (let x = 0; x < width; x++) {
|
||||
var sum = 0;
|
||||
|
||||
// y xais
|
||||
for (let y = 0; y < PUZZLE_GAP; y++) {
|
||||
var idx = x * 4 + y * (width * 4);
|
||||
var r = cData[idx];
|
||||
var g = cData[idx + 1];
|
||||
var b = cData[idx + 2];
|
||||
var luma = 0.2126 * r + 0.7152 * g + 0.0722 * b;
|
||||
|
||||
sum += luma;
|
||||
}
|
||||
|
||||
lumas.push(sum / PUZZLE_GAP);
|
||||
}
|
||||
|
||||
const n = 2; // minium macroscopic image width (px)
|
||||
const margin = patchWidth - PUZZLE_PAD;
|
||||
const diff = 20; // macroscopic brightness difference
|
||||
const radius = PUZZLE_PAD;
|
||||
for (let i = 0, len = lumas.length - 2 * 4; i < len; i++) {
|
||||
const left = (lumas[i] + lumas[i + 1]) / n;
|
||||
const right = (lumas[i + 2] + lumas[i + 3]) / n;
|
||||
const mi = margin + i;
|
||||
const mLeft = (lumas[mi] + lumas[mi + 1]) / n;
|
||||
const mRigth = (lumas[mi + 2] + lumas[mi + 3]) / n;
|
||||
|
||||
if (left - right > diff && mLeft - mRigth < -diff) {
|
||||
const pieces = lumas.slice(i + 2, margin + i + 2);
|
||||
const median = pieces.sort((x1, x2) => x1 - x2)[20];
|
||||
const avg = Math.avg(pieces);
|
||||
|
||||
// noise reducation
|
||||
if (median > left || median > mRigth) return;
|
||||
if (avg > 100) return;
|
||||
// console.table({left,right,mLeft,mRigth,median});
|
||||
// ctx.fillRect(i+n-radius, 0, 1, 360);
|
||||
// console.log(i+n-radius);
|
||||
return i + n - radius;
|
||||
}
|
||||
}
|
||||
|
||||
// not found
|
||||
return -1;
|
||||
}
|
||||
|
||||
runWithCanvas() {
|
||||
const {createCanvas, Image} = require('canvas');
|
||||
const canvas = createCanvas();
|
||||
const ctx = canvas.getContext('2d');
|
||||
const imgBg = new Image();
|
||||
const imgPatch = new Image();
|
||||
const prefix = 'data:image/png;base64,';
|
||||
|
||||
imgBg.src = prefix + this.rawBg;
|
||||
imgPatch.src = prefix + this.rawPatch;
|
||||
const {naturalWidth: w, naturalHeight: h} = imgBg;
|
||||
canvas.width = w;
|
||||
canvas.height = h;
|
||||
ctx.clearRect(0, 0, w, h);
|
||||
ctx.drawImage(imgBg, 0, 0, w, h);
|
||||
|
||||
const width = w;
|
||||
const {naturalWidth, naturalHeight} = imgPatch;
|
||||
const posY = this.y + PUZZLE_PAD + ((naturalHeight - PUZZLE_PAD) / 2) - (PUZZLE_GAP / 2);
|
||||
// const cData = ctx.getImageData(0, a.y + 10 + 20 - 4, 360, 8).data;
|
||||
const cData = ctx.getImageData(0, posY, width, PUZZLE_GAP).data;
|
||||
const lumas = [];
|
||||
|
||||
for (let x = 0; x < width; x++) {
|
||||
var sum = 0;
|
||||
|
||||
// y xais
|
||||
for (let y = 0; y < PUZZLE_GAP; y++) {
|
||||
var idx = x * 4 + y * (width * 4);
|
||||
var r = cData[idx];
|
||||
var g = cData[idx + 1];
|
||||
var b = cData[idx + 2];
|
||||
var luma = 0.2126 * r + 0.7152 * g + 0.0722 * b;
|
||||
|
||||
sum += luma;
|
||||
}
|
||||
|
||||
lumas.push(sum / PUZZLE_GAP);
|
||||
}
|
||||
|
||||
const n = 2; // minium macroscopic image width (px)
|
||||
const margin = naturalWidth - PUZZLE_PAD;
|
||||
const diff = 20; // macroscopic brightness difference
|
||||
const radius = PUZZLE_PAD;
|
||||
for (let i = 0, len = lumas.length - 2 * 4; i < len; i++) {
|
||||
const left = (lumas[i] + lumas[i + 1]) / n;
|
||||
const right = (lumas[i + 2] + lumas[i + 3]) / n;
|
||||
const mi = margin + i;
|
||||
const mLeft = (lumas[mi] + lumas[mi + 1]) / n;
|
||||
const mRigth = (lumas[mi + 2] + lumas[mi + 3]) / n;
|
||||
|
||||
if (left - right > diff && mLeft - mRigth < -diff) {
|
||||
const pieces = lumas.slice(i + 2, margin + i + 2);
|
||||
const median = pieces.sort((x1, x2) => x1 - x2)[20];
|
||||
const avg = Math.avg(pieces);
|
||||
|
||||
// noise reducation
|
||||
if (median > left || median > mRigth) return;
|
||||
if (avg > 100) return;
|
||||
// console.table({left,right,mLeft,mRigth,median});
|
||||
// ctx.fillRect(i+n-radius, 0, 1, 360);
|
||||
// console.log(i+n-radius);
|
||||
return i + n - radius;
|
||||
}
|
||||
}
|
||||
|
||||
// not found
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
const DATA = {
|
||||
"appId": "17839d5db83",
|
||||
"product": "embed",
|
||||
"lang": "zh_CN",
|
||||
};
|
||||
const SERVER = 'iv.jd.com';
|
||||
|
||||
class JDJRValidator {
|
||||
constructor() {
|
||||
this.data = {};
|
||||
this.x = 0;
|
||||
this.t = Date.now();
|
||||
this.count = 0;
|
||||
}
|
||||
|
||||
async run(scene = 'cww', eid='') {
|
||||
const tryRecognize = async () => {
|
||||
const x = await this.recognize(scene, eid);
|
||||
|
||||
if (x > 0) {
|
||||
return x;
|
||||
}
|
||||
// retry
|
||||
return await tryRecognize();
|
||||
};
|
||||
const puzzleX = await tryRecognize();
|
||||
// console.log(puzzleX);
|
||||
const pos = new MousePosFaker(puzzleX).run();
|
||||
const d = getCoordinate(pos);
|
||||
|
||||
// console.log(pos[pos.length-1][2] -Date.now());
|
||||
// await sleep(4500);
|
||||
await sleep(pos[pos.length - 1][2] - Date.now());
|
||||
this.count++;
|
||||
const result = await JDJRValidator.jsonp('/slide/s.html', {d, ...this.data}, scene);
|
||||
|
||||
if (result.message === 'success') {
|
||||
// console.log(result);
|
||||
console.log('JDJR验证用时: %fs', (Date.now() - this.t) / 1000);
|
||||
return result;
|
||||
} else {
|
||||
console.log(`验证失败: ${this.count}/${validatorCount}`);
|
||||
// console.log(JSON.stringify(result));
|
||||
if(this.count >= validatorCount){
|
||||
console.log("JDJR验证次数已达上限,退出验证");
|
||||
return result;
|
||||
}else{
|
||||
await sleep(300);
|
||||
return await this.run(scene, eid);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
async recognize(scene, eid) {
|
||||
const data = await JDJRValidator.jsonp('/slide/g.html', {e: eid}, scene);
|
||||
const {bg, patch, y} = data;
|
||||
// const uri = 'data:image/png;base64,';
|
||||
// const re = new PuzzleRecognizer(uri+bg, uri+patch, y);
|
||||
const re = new PuzzleRecognizer(bg, patch, y);
|
||||
// console.log(JSON.stringify(re))
|
||||
const puzzleX = await re.run();
|
||||
|
||||
if (puzzleX > 0) {
|
||||
this.data = {
|
||||
c: data.challenge,
|
||||
w: re.w,
|
||||
e: eid,
|
||||
s: '',
|
||||
o: '',
|
||||
};
|
||||
this.x = puzzleX;
|
||||
}
|
||||
return puzzleX;
|
||||
}
|
||||
|
||||
async report(n) {
|
||||
console.time('PuzzleRecognizer');
|
||||
let count = 0;
|
||||
|
||||
for (let i = 0; i < n; i++) {
|
||||
const x = await this.recognize();
|
||||
|
||||
if (x > 0) count++;
|
||||
if (i % 50 === 0) {
|
||||
// console.log('%f\%', (i / n) * 100);
|
||||
}
|
||||
}
|
||||
|
||||
console.log('验证成功: %f\%', (count / n) * 100);
|
||||
console.clear()
|
||||
console.timeEnd('PuzzleRecognizer');
|
||||
}
|
||||
|
||||
static jsonp(api, data = {}, scene) {
|
||||
return new Promise((resolve, reject) => {
|
||||
const fnId = `jsonp_${String(Math.random()).replace('.', '')}`;
|
||||
const extraData = {callback: fnId};
|
||||
const query = new URLSearchParams({...DATA,...{"scene": scene}, ...extraData, ...data}).toString();
|
||||
const url = `https://${SERVER}${api}?${query}`;
|
||||
const headers = {
|
||||
'Accept': '*/*',
|
||||
'Accept-Encoding': 'gzip,deflate,br',
|
||||
'Accept-Language': 'zh-CN,zh;q=0.9,en;q=0.8',
|
||||
'Connection': 'keep-alive',
|
||||
'Host': "iv.jd.com",
|
||||
'Proxy-Connection': 'keep-alive',
|
||||
'Referer': 'https://h5.m.jd.com/',
|
||||
'User-Agent': UA,
|
||||
};
|
||||
|
||||
const req = https.get(url, {headers}, (response) => {
|
||||
let res = response;
|
||||
if (res.headers['content-encoding'] === 'gzip') {
|
||||
const unzipStream = new stream.PassThrough();
|
||||
stream.pipeline(
|
||||
response,
|
||||
zlib.createGunzip(),
|
||||
unzipStream,
|
||||
reject,
|
||||
);
|
||||
res = unzipStream;
|
||||
}
|
||||
res.setEncoding('utf8');
|
||||
|
||||
let rawData = '';
|
||||
|
||||
res.on('data', (chunk) => rawData += chunk);
|
||||
res.on('end', () => {
|
||||
try {
|
||||
const ctx = {
|
||||
[fnId]: (data) => ctx.data = data,
|
||||
data: {},
|
||||
};
|
||||
|
||||
vm.createContext(ctx);
|
||||
vm.runInContext(rawData, ctx);
|
||||
|
||||
// console.log(ctx.data);
|
||||
res.resume();
|
||||
resolve(ctx.data);
|
||||
} catch (e) {
|
||||
reject(e);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
req.on('error', reject);
|
||||
req.end();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function getCoordinate(c) {
|
||||
function string10to64(d) {
|
||||
var c = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-~".split("")
|
||||
, b = c.length
|
||||
, e = +d
|
||||
, a = [];
|
||||
do {
|
||||
mod = e % b;
|
||||
e = (e - mod) / b;
|
||||
a.unshift(c[mod])
|
||||
} while (e);
|
||||
return a.join("")
|
||||
}
|
||||
|
||||
function prefixInteger(a, b) {
|
||||
return (Array(b).join(0) + a).slice(-b)
|
||||
}
|
||||
|
||||
function pretreatment(d, c, b) {
|
||||
var e = string10to64(Math.abs(d));
|
||||
var a = "";
|
||||
if (!b) {
|
||||
a += (d > 0 ? "1" : "0")
|
||||
}
|
||||
a += prefixInteger(e, c);
|
||||
return a
|
||||
}
|
||||
|
||||
var b = new Array();
|
||||
for (var e = 0; e < c.length; e++) {
|
||||
if (e == 0) {
|
||||
b.push(pretreatment(c[e][0] < 262143 ? c[e][0] : 262143, 3, true));
|
||||
b.push(pretreatment(c[e][1] < 16777215 ? c[e][1] : 16777215, 4, true));
|
||||
b.push(pretreatment(c[e][2] < 4398046511103 ? c[e][2] : 4398046511103, 7, true))
|
||||
} else {
|
||||
var a = c[e][0] - c[e - 1][0];
|
||||
var f = c[e][1] - c[e - 1][1];
|
||||
var d = c[e][2] - c[e - 1][2];
|
||||
b.push(pretreatment(a < 4095 ? a : 4095, 2, false));
|
||||
b.push(pretreatment(f < 4095 ? f : 4095, 2, false));
|
||||
b.push(pretreatment(d < 16777215 ? d : 16777215, 4, true))
|
||||
}
|
||||
}
|
||||
return b.join("")
|
||||
}
|
||||
|
||||
const HZ = 20;
|
||||
|
||||
class MousePosFaker {
|
||||
constructor(puzzleX) {
|
||||
this.x = parseInt(Math.random() * 20 + 20, 10);
|
||||
this.y = parseInt(Math.random() * 80 + 80, 10);
|
||||
this.t = Date.now();
|
||||
this.pos = [[this.x, this.y, this.t]];
|
||||
this.minDuration = parseInt(1000 / HZ, 10);
|
||||
// this.puzzleX = puzzleX;
|
||||
this.puzzleX = puzzleX + parseInt(Math.random() * 2 - 1, 10);
|
||||
|
||||
this.STEP = parseInt(Math.random() * 6 + 5, 10);
|
||||
this.DURATION = parseInt(Math.random() * 7 + 14, 10) * 100;
|
||||
// [9,1600] [10,1400]
|
||||
this.STEP = 9;
|
||||
// this.DURATION = 2000;
|
||||
// console.log(this.STEP, this.DURATION);
|
||||
}
|
||||
|
||||
run() {
|
||||
const perX = this.puzzleX / this.STEP;
|
||||
const perDuration = this.DURATION / this.STEP;
|
||||
const firstPos = [this.x - parseInt(Math.random() * 6, 10), this.y + parseInt(Math.random() * 11, 10), this.t];
|
||||
|
||||
this.pos.unshift(firstPos);
|
||||
this.stepPos(perX, perDuration);
|
||||
this.fixPos();
|
||||
|
||||
const reactTime = parseInt(60 + Math.random() * 100, 10);
|
||||
const lastIdx = this.pos.length - 1;
|
||||
const lastPos = [this.pos[lastIdx][0], this.pos[lastIdx][1], this.pos[lastIdx][2] + reactTime];
|
||||
|
||||
this.pos.push(lastPos);
|
||||
return this.pos;
|
||||
}
|
||||
|
||||
stepPos(x, duration) {
|
||||
let n = 0;
|
||||
const sqrt2 = Math.sqrt(2);
|
||||
for (let i = 1; i <= this.STEP; i++) {
|
||||
n += 1 / i;
|
||||
}
|
||||
for (let i = 0; i < this.STEP; i++) {
|
||||
x = this.puzzleX / (n * (i + 1));
|
||||
const currX = parseInt((Math.random() * 30 - 15) + x, 10);
|
||||
const currY = parseInt(Math.random() * 7 - 3, 10);
|
||||
const currDuration = parseInt((Math.random() * 0.4 + 0.8) * duration, 10);
|
||||
|
||||
this.moveToAndCollect({
|
||||
x: currX,
|
||||
y: currY,
|
||||
duration: currDuration,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
fixPos() {
|
||||
const actualX = this.pos[this.pos.length - 1][0] - this.pos[1][0];
|
||||
const deviation = this.puzzleX - actualX;
|
||||
|
||||
if (Math.abs(deviation) > 4) {
|
||||
this.moveToAndCollect({
|
||||
x: deviation,
|
||||
y: parseInt(Math.random() * 8 - 3, 10),
|
||||
duration: 250,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
moveToAndCollect({x, y, duration}) {
|
||||
let movedX = 0;
|
||||
let movedY = 0;
|
||||
let movedT = 0;
|
||||
const times = duration / this.minDuration;
|
||||
let perX = x / times;
|
||||
let perY = y / times;
|
||||
let padDuration = 0;
|
||||
|
||||
if (Math.abs(perX) < 1) {
|
||||
padDuration = duration / Math.abs(x) - this.minDuration;
|
||||
perX = 1;
|
||||
perY = y / Math.abs(x);
|
||||
}
|
||||
|
||||
while (Math.abs(movedX) < Math.abs(x)) {
|
||||
const rDuration = parseInt(padDuration + Math.random() * 16 - 4, 10);
|
||||
|
||||
movedX += perX + Math.random() * 2 - 1;
|
||||
movedY += perY;
|
||||
movedT += this.minDuration + rDuration;
|
||||
|
||||
const currX = parseInt(this.x + movedX, 10);
|
||||
const currY = parseInt(this.y + movedY, 10);
|
||||
const currT = this.t + movedT;
|
||||
|
||||
this.pos.push([currX, currY, currT]);
|
||||
}
|
||||
|
||||
this.x += x;
|
||||
this.y += y;
|
||||
this.t += Math.max(duration, movedT);
|
||||
}
|
||||
}
|
||||
|
||||
function injectToRequest(fn,scene = 'cww', ua = '') {
|
||||
if(ua) UA = ua
|
||||
return (opts, cb) => {
|
||||
fn(opts, async (err, resp, data) => {
|
||||
if (err) {
|
||||
console.error(JSON.stringify(err));
|
||||
return;
|
||||
}
|
||||
if (data.search('验证') > -1) {
|
||||
console.log('JDJR验证中......');
|
||||
let arr = opts.url.split("&")
|
||||
let eid = ''
|
||||
for(let i of arr){
|
||||
if(i.indexOf("eid=")>-1){
|
||||
eid = i.split("=") && i.split("=")[1] || ''
|
||||
}
|
||||
}
|
||||
const res = await new JDJRValidator().run(scene, eid);
|
||||
|
||||
opts.url += `&validate=${res.validate}`;
|
||||
fn(opts, cb);
|
||||
} else {
|
||||
cb(err, resp, data);
|
||||
}
|
||||
});
|
||||
};
|
||||
}
|
||||
|
||||
exports.injectToRequest = injectToRequest;
|
|
@ -0,0 +1,92 @@
|
|||
const USER_AGENTS = [
|
||||
'jdltapp;iPad;3.7.0;14.4;network/wifi;Mozilla/5.0 (iPad; CPU OS 14_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1',
|
||||
'jdltapp;android;3.7.0;10;2346663656561603-4353564623932316;network/wifi;model/ONEPLUS A5010;addressid/0;aid/2dfceea045ed292a;oaid/;osVer/29;appBuild/1436;psn/BS6Y9SAiw0IpJ4ro7rjSOkCRZTgR3z2K|10;psq/5;adk/;ads/;pap/JA2020_3112531|3.7.0|ANDROID 10;osv/10;pv/10.5;jdv/;ref/com.jd.jdlite.lib.personal.view.fragment.JDPersonalFragment;partner/oppo;apprpd/MyJD_Main;eufv/1;Mozilla/5.0 (Linux; Android 10; ONEPLUS A5010 Build/QKQ1.191014.012; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/66.0.3359.126 MQQBrowser/6.2 TBS/045140 Mobile Safari/537.36',
|
||||
'jdltapp;iPhone;3.7.0;14.1;59d6ae6e8387bd09fe046d5b8918ead51614e80a;network/wifi;hasUPPay/0;pushNoticeIsOpen/0;lang/zh_CN;model/iPhone12,1;hasOCPay/0;appBuild/1017;supportBestPay/0;addressid/;pv/1.26;apprpd/;ref/JDLTSubMainPageViewController;psq/0;ads/;psn/59d6ae6e8387bd09fe046d5b8918ead51614e80a|3;jdv/0|;adk/;app_device/IOS;pap/JA2020_3112531|3.7.0|IOS 14.1;Mozilla/5.0 (iPhone; CPU iPhone OS 14_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1',
|
||||
'jdltapp;iPhone;3.7.0;13.5;22d679c006bf9c087abf362cf1d2e0020ebb8798;network/wifi;ADID/10857A57-DDF8-4A0D-A548-7B8F43AC77EE;hasUPPay/0;pushNoticeIsOpen/1;lang/zh_CN;model/iPhone12,1;addressid/2378947694;hasOCPay/0;appBuild/1017;supportBestPay/0;pv/15.7;apprpd/Allowance_Registered;ref/JDLTTaskCenterViewController;psq/6;ads/;psn/22d679c006bf9c087abf362cf1d2e0020ebb8798|22;jdv/0|kong|t_1000170135|tuiguang|notset|1614153044558|1614153044;adk/;app_device/IOS;pap/JA2020_3112531|3.7.0|IOS 13.5;Mozilla/5.0 (iPhone; CPU iPhone OS 13_5 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1',
|
||||
'jdltapp;android;3.7.0;10;2616935633265383-5333463636261326;network/UNKNOWN;model/M2007J3SC;addressid/1840745247;aid/ba9e3b5853dccb1b;oaid/371d8af7dd71e8d5;osVer/29;appBuild/1436;psn/t7JmxZUXGkimd4f9Jdul2jEeuYLwxPrm|8;psq/6;adk/;ads/;pap/JA2020_3112531|3.7.0|ANDROID 10;osv/10;pv/5.6;jdv/;ref/com.jd.jdlite.lib.jdlitemessage.view.activity.MessageCenterMainActivity;partner/xiaomi;apprpd/MessageCenter_MessageMerge;eufv/1;Mozilla/5.0 (Linux; Android 10; M2007J3SC Build/QKQ1.200419.002; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/66.0.3359.126 MQQBrowser/6.2 TBS/045135 Mobile Safari/537.36',
|
||||
'jdltapp;iPhone;3.7.0;14.3;d7beab54ae7758fa896c193b49470204fbb8fce9;network/4g;ADID/97AD46C9-6D49-4642-BF6F-689256673906;hasUPPay/0;pushNoticeIsOpen/0;lang/zh_CN;model/iPhone11,2;addressid/;hasOCPay/0;appBuild/1017;supportBestPay/0;pv/6.28;apprpd/;ref/JDLTRedPacketViewController;psq/3;ads/;psn/d7beab54ae7758fa896c193b49470204fbb8fce9|8;jdv/0|kong|t_1001707023_|jingfen|79ad0319fa4d47e38521a616d80bc4bd|1613800945610|1613824900;adk/;app_device/IOS;pap/JA2020_3112531|3.7.0|IOS 14.3;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1',
|
||||
'jdltapp;android;3.7.0;9;D246836333735-3264353430393;network/4g;model/MIX 2;addressid/138678023;aid/bf8bcf1214b3832a;oaid/308540d1f1feb2f5;osVer/28;appBuild/1436;psn/Z/rGqfWBY/h5gcGFnVIsRw==|16;psq/3;adk/;ads/;pap/JA2020_3112531|3.7.0|ANDROID 9;osv/9;pv/13.7;jdv/;ref/com.jd.jdlite.lib.personal.view.fragment.JDPersonalFragment;partner/xiaomi;apprpd/MyJD_Main;eufv/1;Mozilla/5.0 (Linux; Android 9; MIX 2 Build/PKQ1.190118.001; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/66.0.3359.126 MQQBrowser/6.2 TBS/045135 Mobile Safari/537.36',
|
||||
'jdltapp;iPhone;3.7.0;14.4;eb5a9e7e596e262b4ffb3b6b5c830984c8a5c0d5;network/wifi;ADID/5603541B-30C1-4B5C-A782-20D0B569D810;hasUPPay/0;pushNoticeIsOpen/0;lang/zh_CN;model/iPhone9,2;addressid/1041002757;hasOCPay/0;appBuild/101;supportBestPay/0;pv/34.6;apprpd/MyJD_Main;ref/MyJdMTAManager;psq/5;ads/;psn/eb5a9e7e596e262b4ffb3b6b5c830984c8a5c0d5|44;jdv/0|androidapp|t_335139774|appshare|CopyURL|1612612940307|1612612944;adk/;app_device/IOS;pap/JA2020_3112531|3.7.0|IOS 14.4;Mozilla/5.0 (iPhone; CPU iPhone OS 14_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1',
|
||||
'jdltapp;iPhone;3.7.0;14.3;21631ed983b3e854a3154b0336413825ad0d6783;network/3g;hasUPPay/0;pushNoticeIsOpen/0;lang/zh_CN;model/iPhone13,4;addressid/;hasOCPay/0;appBuild/1017;supportBestPay/0;pv/4.47;apprpd/;ref/JDLTSubMainPageViewController;psq/8;ads/;psn/21631ed983b3e854a3154b0336413825ad0d6783|9;jdv/0|direct|-|none|-|1614150725100|1614225882;adk/;app_device/IOS;pap/JA2020_3112531|3.7.0|IOS 14.3;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1',
|
||||
'jdltapp;iPhone;3.7.0;13.5;500a795cb2abae60b877ee4a1930557a800bef1c;network/wifi;hasUPPay/0;pushNoticeIsOpen/0;lang/zh_CN;model/iPhone8,1;addressid/669949466;hasOCPay/0;appBuild/1017;supportBestPay/0;pv/9.11;apprpd/;ref/JDLTSubMainPageViewController;psq/10;ads/;psn/500a795cb2abae60b877ee4a1930557a800bef1c|11;jdv/;adk/;app_device/IOS;pap/JA2020_3112531|3.7.0|IOS 13.5;Mozilla/5.0 (iPhone; CPU iPhone OS 13_5 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1',
|
||||
'jdltapp;iPad;3.7.0;14.4;f5e7b7980fb50efc9c294ac38653c1584846c3db;network/wifi;hasUPPay/0;pushNoticeIsOpen/1;lang/zh_CN;model/iPad6,3;hasOCPay/0;appBuild/1017;supportBestPay/0;pv/231.11;pap/JA2020_3112531|3.7.0|IOS 14.4;apprpd/;psn/f5e7b7980fb50efc9c294ac38653c1584846c3db|305;usc/kong;jdv/0|kong|t_1000170135|tuiguang|notset|1613606450668|1613606450;umd/tuiguang;psq/2;ucp/t_1000170135;app_device/IOS;utr/notset;ref/JDLTRedPacketViewController;adk/;ads/;Mozilla/5.0 (iPad; CPU OS 14_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1',
|
||||
'jdltapp;iPhone;3.7.0;14.4;19fef5419f88076c43f5317eabe20121d52c6a61;network/wifi;ADID/00000000-0000-0000-0000-000000000000;hasUPPay/0;pushNoticeIsOpen/0;lang/zh_CN;model/iPhone11,8;addressid/3430850943;hasOCPay/0;appBuild/1017;supportBestPay/0;pv/10.4;apprpd/;ref/JDLTSubMainPageViewController;psq/3;ads/;psn/19fef5419f88076c43f5317eabe20121d52c6a61|16;jdv/0|kong|t_1001327829_|jingfen|f51febe09dd64b20b06bc6ef4c1ad790#/|1614096460311|1614096511;adk/;app_device/IOS;pap/JA2020_3112531|3.7.0|IOS 14.4;Mozilla/5.0 (iPhone; CPU iPhone OS 14_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148',
|
||||
'jdltapp;iPhone;3.7.0;12.2;f995bc883282f7c7ea9d7f32da3f658127aa36c7;network/4g;ADID/9F40F4CA-EA7C-4F2E-8E09-97A66901D83E;hasUPPay/0;pushNoticeIsOpen/0;lang/zh_CN;model/iPhone10,4;addressid/525064695;hasOCPay/0;appBuild/1017;supportBestPay/0;pv/11.11;apprpd/;ref/JDLTSubMainPageViewController;psq/2;ads/;psn/f995bc883282f7c7ea9d7f32da3f658127aa36c7|22;jdv/0|;adk/;app_device/IOS;pap/JA2020_3112531|3.7.0|IOS 12.2;Mozilla/5.0 (iPhone; CPU iPhone OS 12_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1',
|
||||
'jdltapp;android;3.7.0;10;5366566313931326-6633931643233693;network/wifi;model/Mi9 Pro 5G;addressid/0;aid/5fe6191bf39a42c9;oaid/e3a9473ef6699f75;osVer/29;appBuild/1436;psn/b3rJlGi AwLqa9AqX7Vp0jv4T7XPMa0o|5;psq/4;adk/;ads/;pap/JA2020_3112531|3.7.0|ANDROID 10;osv/10;pv/5.4;jdv/;ref/HomeFragment;partner/xiaomi;apprpd/Home_Main;eufv/1;Mozilla/5.0 (Linux; Android 10; Mi9 Pro 5G Build/QKQ1.190825.002; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/66.0.3359.126 MQQBrowser/6.2 TBS/045135 Mobile Safari/537.36',
|
||||
'jdltapp;iPhone;3.7.0;14.4;4e6b46913a2e18dd06d6d69843ee4cdd8e033bc1;network/3g;hasUPPay/0;pushNoticeIsOpen/0;lang/zh_CN;model/iPhone13,2;addressid/666624049;hasOCPay/0;appBuild/1017;supportBestPay/0;pv/54.11;apprpd/MessageCenter_MessageMerge;ref/MessageCenterController;psq/10;ads/;psn/4e6b46913a2e18dd06d6d69843ee4cdd8e033bc1|101;jdv/0|kong|t_2010804675_|jingfen|810dab1ba2c04b8588c5aa5a0d44c4bd|1614183499;adk/;app_device/IOS;pap/JA2020_3112531|3.7.0|IOS 14.4;Mozilla/5.0 (iPhone; CPU iPhone OS 14_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1',
|
||||
'jdltapp;iPhone;3.7.0;14.2;c71b599e9a0bcbd8d1ad924d85b5715530efad06;network/wifi;ADID/751C6E92-FD10-4323-B37C-187FD0CF0551;hasUPPay/0;pushNoticeIsOpen/0;lang/zh_CN;model/iPhone11,8;addressid/4053561885;hasOCPay/0;appBuild/1017;supportBestPay/0;pv/263.8;apprpd/;ref/JDLTSubMainPageViewController;psq/2;ads/;psn/c71b599e9a0bcbd8d1ad924d85b5715530efad06|481;jdv/0|kong|t_1001610202_|jingfen|3911bea7ee2f4fcf8d11fdf663192bbe|1614157052210|1614157056;adk/;app_device/IOS;pap/JA2020_3112531|3.7.0|IOS 14.2;Mozilla/5.0 (iPhone; CPU iPhone OS 14_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1',
|
||||
'jdltapp;iPhone;3.7.0;14.4;2d306ee3cacd2c02560627a5113817ebea20a2c9;network/4g;ADID/A346F099-3182-4889-9A62-2B3C28AB861E;hasUPPay/0;pushNoticeIsOpen/0;lang/zh_CN;model/iPhone13,3;hasOCPay/0;appBuild/1017;supportBestPay/0;addressid/;pv/1.35;apprpd/Allowance_Registered;ref/JDLTTaskCenterViewController;psq/0;ads/;psn/2d306ee3cacd2c02560627a5113817ebea20a2c9|2;jdv/0|;adk/;app_device/IOS;pap/JA2020_3112531|3.7.0|IOS 14.4;Mozilla/5.0 (iPhone; CPU iPhone OS 14_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1',
|
||||
'jdltapp;iPhone;3.7.0;14.4;28355aff16cec8bcf3e5728dbbc9725656d8c2c2;network/4g;hasUPPay/0;pushNoticeIsOpen/0;lang/zh_CN;model/iPhone10,2;addressid/833058617;hasOCPay/0;appBuild/1017;supportBestPay/0;pv/4.10;apprpd/;ref/JDLTWebViewController;psq/9;ads/;psn/28355aff16cec8bcf3e5728dbbc9725656d8c2c2|5;jdv/0|;adk/;app_device/IOS;pap/JA2020_3112531|3.7.0|IOS 14.4;Mozilla/5.0 (iPhone; CPU iPhone OS 14_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1',
|
||||
'jdltapp;iPhone;3.7.0;13.5;24ddac73a3de1b91816b7aedef53e97c4c313733;network/4g;ADID/598C6841-76AC-4512-AA97-CBA940548D70;hasUPPay/0;pushNoticeIsOpen/1;lang/zh_CN;model/iPhone11,6;addressid/;hasOCPay/0;appBuild/1017;supportBestPay/0;pv/12.6;apprpd/;ref/JDLTSubMainPageViewController;psq/5;ads/;psn/24ddac73a3de1b91816b7aedef53e97c4c313733|23;jdv/0|kong|t_1000170135|tuiguang|notset|1614126110904|1614126110;adk/;app_device/IOS;pap/JA2020_3112531|3.7.0|IOS 13.5;Mozilla/5.0 (iPhone; CPU iPhone OS 13_5 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1',
|
||||
'jdltapp;iPhone;3.7.0;14.4;d7732ba60c8ff73cc3f5ba7290a3aa9551f73a1b;network/wifi;hasUPPay/0;pushNoticeIsOpen/0;lang/zh_CN;model/iPhone12,1;addressid/25239372;hasOCPay/0;appBuild/1017;supportBestPay/0;pv/8.6;apprpd/;ref/JDLTSubMainPageViewController;psq/5;ads/;psn/d7732ba60c8ff73cc3f5ba7290a3aa9551f73a1b|14;jdv/0|kong|t_1001226363_|jingfen|5713234d1e1e4893b92b2de2cb32484d|1614182989528|1614182992;adk/;app_device/IOS;pap/JA2020_3112531|3.7.0|IOS 14.4;Mozilla/5.0 (iPhone; CPU iPhone OS 14_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1',
|
||||
'jdltapp;iPhone;3.7.0;14.4;ca1a32afca36bc9fb37fd03f18e653bce53eaca5;network/wifi;ADID/3AF380AB-CB74-4FE6-9E7C-967693863CA3;hasUPPay/0;pushNoticeIsOpen/1;lang/zh_CN;model/iPhone8,1;addressid/138323416;hasOCPay/0;appBuild/1017;supportBestPay/0;pv/72.12;apprpd/;ref/JDLTRedPacketViewController;psq/3;ads/;psn/ca1a32afca36bc9fb37fd03f18e653bce53eaca5|109;jdv/0|kong|t_1000536212_|jingfen|c82bfa19e33a4269a5884ffc614790f4|1614141246;adk/;app_device/IOS;pap/JA2020_3112531|3.7.0|IOS 14.4;Mozilla/5.0 (iPhone; CPU iPhone OS 14_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1',
|
||||
'jdltapp;android;3.7.0;10;7346933333666353-8333366646039373;network/wifi;model/ONEPLUS A5010;addressid/138117973;aid/7d933f6583cfd097;oaid/;osVer/29;appBuild/1436;psn/T/eqfRSwp8VKEvvXyEunq09Cg2MUkiQ5|17;psq/4;adk/;ads/;pap/JA2020_3112531|3.7.0|ANDROID 10;osv/10;pv/11.4;jdv/0|kong|t_1001849073_|jingfen|495a47f6c0b8431c9d460f61ad2304dc|1614084403978|1614084407;ref/HomeFragment;partner/oppo;apprpd/Home_Main;eufv/1;Mozilla/5.0 (Linux; Android 10; ONEPLUS A5010 Build/QKQ1.191014.012; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/66.0.3359.126 MQQBrowser/6.2 TBS/045140 Mobile Safari/537.36',
|
||||
'jdltapp;android;3.7.0;11;4626269356736353-5353236346334673;network/wifi;model/M2006J10C;addressid/0;aid/dbb9e7655526d3d7;oaid/66a7af49362987b0;osVer/30;appBuild/1436;psn/rQRQgJ 4 S3qkq8YDl28y6jkUHmI/rlX|3;psq/4;adk/;ads/;pap/JA2020_3112531|3.7.0|ANDROID 11;osv/11;pv/3.4;jdv/;ref/HomeFragment;partner/xiaomi;apprpd/Home_Main;eufv/1;Mozilla/5.0 (Linux; Android 11; M2006J10C Build/RP1A.200720.011; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/77.0.3865.120 MQQBrowser/6.2 TBS/045513 Mobile Safari/537.36',
|
||||
'jdltapp;iPhone;3.7.0;14.4;78fc1d919de0c8c2de15725eff508d8ab14f9c82;network/wifi;hasUPPay/0;pushNoticeIsOpen/0;lang/zh_CN;model/iPhone13,1;addressid/137829713;hasOCPay/0;appBuild/1017;supportBestPay/0;pv/23.11;apprpd/;ref/JDLTSubMainPageViewController;psq/10;ads/;psn/78fc1d919de0c8c2de15725eff508d8ab14f9c82|34;jdv/0|iosapp|t_335139774|appshare|Wxfriends|1612508702380|1612534293;adk/;app_device/IOS;pap/JA2020_3112531|3.7.0|IOS 14.4;Mozilla/5.0 (iPhone; CPU iPhone OS 14_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1',
|
||||
'jdltapp;android;3.7.0;10;0373263343266633-5663030363465326;network/wifi;model/Redmi Note 7;addressid/590846082;aid/07b34bf3e6006d5b;oaid/17975a142e67ec92;osVer/29;appBuild/1436;psn/OHNqtdhQKv1okyh7rB3HxjwI00ixJMNG|4;psq/3;adk/;ads/;pap/JA2020_3112531|3.7.0|ANDROID 10;osv/10;pv/2.3;jdv/;ref/activityId=8a8fabf3cccb417f8e691b6774938bc2;partner/xiaomi;apprpd/jsbqd_home;eufv/1;Mozilla/5.0 (Linux; Android 10; Redmi Note 7 Build/QKQ1.190910.002; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/88.0.4324.152 Mobile Safari/537.36',
|
||||
'jdltapp;android;3.7.0;10;3636566623663623-1693635613166646;network/wifi;model/ASUS_I001DA;addressid/1397761133;aid/ccef2fc2a96e1afd;oaid/;osVer/29;appBuild/1436;psn/T8087T0D82PHzJ4VUMGFrfB9dw4gUnKG|76;psq/5;adk/;ads/;pap/JA2020_3112531|3.7.0|ANDROID 10;osv/10;pv/73.5;jdv/0|kong|t_1002354188_|jingfen|2335e043b3344107a2750a781fde9a2e#/|1614097081426|1614097087;ref/com.jd.jdlite.lib.personal.view.fragment.JDPersonalFragment;partner/yingyongbao;apprpd/MyJD_Main;eufv/1;Mozilla/5.0 (Linux; Android 10; ASUS_I001DA Build/QKQ1.190825.002; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/66.0.3359.126 MQQBrowser/6.2 TBS/045140 Mobile Safari/537.36',
|
||||
'jdltapp;iPhone;3.7.0;14.4;network/wifi;hasUPPay/0;pushNoticeIsOpen/0;lang/zh_CN;model/iPhone10,2;addressid/138419019;hasOCPay/0;appBuild/1017;supportBestPay/0;pv/5.7;apprpd/MyJD_Main;ref/MyJdMTAManager;psq/6;ads/;psn/4ee6af0db48fd605adb69b63f00fcbb51c2fc3f0|9;jdv/0|direct|-|none|-|1613705981655|1613823229;adk/;app_device/IOS;pap/JA2020_3112531|3.7.0|IOS 14.4;Mozilla/5.0 (iPhone; CPU iPhone OS 14_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1',
|
||||
'jdltapp;iPhone;3.7.0;14.3;network/wifi;ADID/F9FD7728-2956-4DD1-8EDD-58B07950864C;hasUPPay/0;pushNoticeIsOpen/0;lang/zh_CN;model/iPhone10,1;addressid/1346909722;hasOCPay/0;appBuild/1017;supportBestPay/0;pv/30.8;apprpd/;ref/JDLTSubMainPageViewController;psq/7;ads/;psn/40d4d4323eb3987226cae367d6b0d8be50f2c7b3|39;jdv/0|kong|t_1000252057_0|tuiguang|eba7648a0f4445aa9cfa6f35c6f36e15|1613995717959|1613995723;adk/;app_device/IOS;pap/JA2020_3112531|3.7.0|IOS 14.3;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1',
|
||||
'jdltapp;iPhone;3.7.0;14.4;network/wifi;ADID/5D306F0D-A131-4B26-947E-166CCB9BFFFF;hasUPPay/0;pushNoticeIsOpen/0;lang/zh_CN;model/iPhone11,6;addressid/138164461;hasOCPay/0;appBuild/1017;supportBestPay/0;pv/7.8;apprpd/;ref/JDLTSubMainPageViewController;psq/7;ads/;psn/d40e5d4a33c100e8527f779557c347569b49c304|7;jdv/0|kong|t_1001226363_|jingfen|3bf5372cb9cd445bbb270b8bc9a34f00|1608439066693|1608439068;adk/;app_device/IOS;pap/JA2020_3112531|3.7.0|IOS 14.4;Mozilla/5.0 (iPhone; CPU iPhone OS 14_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1',
|
||||
'jdltapp;iPad;3.7.0;14.5;network/wifi;hasUPPay/0;pushNoticeIsOpen/0;lang/zh_CN;model/iPad8,9;hasOCPay/0;appBuild/1017;supportBestPay/0;addressid/;pv/1.20;apprpd/MyJD_Main;ref/MyJdMTAManager;psq/5;ads/;psn/d9f5ddaa0160a20f32fb2c8bfd174fae7993c1b4|3;jdv/0|;adk/;app_device/IOS;pap/JA2020_3112531|3.7.0|IOS 14.5;Mozilla/5.0 (iPad; CPU OS 14_5 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1',
|
||||
'jdltapp;iPhone;3.7.0;14.3;network/wifi;ADID/31548A9C-8A01-469A-B148-E7D841C91FD0;hasUPPay/0;pushNoticeIsOpen/0;lang/zh_CN;model/iPhone11,2;addressid/;hasOCPay/0;appBuild/1017;supportBestPay/0;pv/10.5;apprpd/;ref/JDLTSubMainPageViewController;psq/4;ads/;psn/a858fb4b40e432ea32f80729916e6c3e910bb922|12;jdv/0|direct|-|none|-|1613898710373|1613898712;adk/;app_device/IOS;pap/JA2020_3112531|3.7.0|IOS 14.3;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1',
|
||||
'jdltapp;iPhone;3.7.0;13.5;network/wifi;hasUPPay/0;pushNoticeIsOpen/0;lang/zh_CN;model/iPhone9,2;addressid/2237496805;hasOCPay/0;appBuild/1017;supportBestPay/0;pv/13.6;apprpd/;ref/JDLTSubMainPageViewController;psq/5;ads/;psn/48e495dcf5dc398b4d46b27e9f15a2b427a154aa|15;jdv/0|direct|-|none|-|1613354874698|1613952828;adk/;app_device/IOS;pap/JA2020_3112531|3.7.0|IOS 13.5;Mozilla/5.0 (iPhone; CPU iPhone OS 13_5 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1',
|
||||
'jdltapp;android;3.7.0;10;3346332626262353-1666434336539336;network/wifi;model/ONEPLUS A6000;addressid/0;aid/3d3bbb25af44c59c;oaid/;osVer/29;appBuild/1436;psn/ECbc2EqmdSa7mDF1PS1GSrV/Tn7R1LS1|6;psq/8;adk/;ads/;pap/JA2020_3112531|3.7.0|ANDROID 10;osv/10;pv/2.67;jdv/0|direct|-|none|-|1613822479379|1613991194;ref/com.jd.jdlite.lib.personal.view.fragment.JDPersonalFragment;partner/oppo;apprpd/MyJD_Main;eufv/1;Mozilla/5.0 (Linux; Android 10; ONEPLUS A6000 Build/QKQ1.190716.003; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/66.0.3359.126 MQQBrowser/6.2 TBS/045140 Mobile Safari/537.36',
|
||||
'jdltapp;android;3.7.0;8.1.0;8363834353530333132333132373-43D2930366035323639333662383;network/wifi;model/16th Plus;addressid/0;aid/f909e5f2c464c7c6;oaid/;osVer/27;appBuild/1436;psn/c21YWvVr77Hn6 pOZfxXGY4TZrre1 UOL5hcPbCEDMo=|3;psq/10;adk/;ads/;pap/JA2020_3112531|3.7.0|ANDROID 8.1.0;osv/8.1.0;pv/2.15;jdv/;ref/com.jd.jdlite.lib.personal.view.fragment.JDPersonalFragment;partner/jsxdlyqj09;apprpd/MyJD_Main;eufv/1;Mozilla/5.0 (Linux; Android 8.1.0; 16th Plus Build/OPM1.171019.026; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/77.0.3865.120 MQQBrowser/6.2 TBS/045514 Mobile Safari/537.36',
|
||||
'jdltapp;android;3.7.0;11;1343467336264693-3343562673463613;network/wifi;model/Mi 10 Pro;addressid/0;aid/14d7cbd934eb7dc1;oaid/335f198546eb3141;osVer/30;appBuild/1436;psn/ZcQh/Wov sNYfZ6JUjTIUBu28 KT0T3u|1;psq/24;adk/;ads/;pap/JA2020_3112531|3.7.0|ANDROID 11;osv/11;pv/1.24;jdv/;ref/com.jd.jdlite.lib.jdlitemessage.view.activity.MessageCenterMainActivity;partner/xiaomi;apprpd/MessageCenter_MessageMerge;eufv/1;Mozilla/5.0 (Linux; Android 11; Mi 10 Pro Build/RKQ1.200826.002; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/88.0.4324.181 Mobile Safari/537.36',
|
||||
'jdltapp;android;3.7.0;10;8353636393732346-6646931673935346;network/wifi;model/MI 8;addressid/1969998059;aid/8566972dfd9a795d;oaid/4a8b773c3e307386;osVer/29;appBuild/1436;psn/PhYbUtCsCJo r 1b8hwxjnY8rEv5S8XC|383;psq/14;adk/;ads/;pap/JA2020_3112531|3.7.0|ANDROID 10;osv/10;pv/374.14;jdv/0|iosapp|t_335139774|liteshare|CopyURL|1609306590175|1609306596;ref/com.jd.jdlite.lib.jdlitemessage.view.activity.MessageCenterMainActivity;partner/jsxdlyqj09;apprpd/MessageCenter_MessageMerge;eufv/1;Mozilla/5.0 (Linux; Android 10; MI 8 Build/QKQ1.190828.002; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/66.0.3359.126 MQQBrowser/6.2 TBS/045140 Mobile Safari/537.36',
|
||||
'jdltapp;iPhone;3.7.0;14.4;6d343c58764a908d4fa56609da4cb3a5cc1396d3;network/wifi;ADID/4965D884-3E61-4C4E-AEA7-9A8CE3742DA7;hasUPPay/0;pushNoticeIsOpen/0;lang/zh_CN;model/iPhone9,1;addressid/70390480;hasOCPay/0;appBuild/1017;supportBestPay/0;pv/4.24;apprpd/MyJD_Main;ref/https%3A%2F%2Fjdcs.m.jd.com%2Fafter%2Findex.action%3FcategoryId%3D600%26v%3D6%26entry%3Dm_self_jd;psq/4;ads/;psn/6d343c58764a908d4fa56609da4cb3a5cc1396d3|17;jdv/0|;adk/;app_device/IOS;pap/JA2020_3112531|3.7.0|IOS 14.4;Mozilla/5.0 (iPhone; CPU iPhone OS 14_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1',
|
||||
'jdltapp;iPhone;3.7.0;13.6.1;4606ddccdfe8f343f8137de7fea7f91fc4aef3a3;network/4g;ADID/C6FB6E20-D334-45FA-818A-7A4C58305202;hasUPPay/0;pushNoticeIsOpen/1;lang/zh_CN;model/iPhone10,1;addressid/;hasOCPay/0;appBuild/1017;supportBestPay/0;pv/5.9;apprpd/MyJD_Main;ref/MyJdMTAManager;psq/8;ads/;psn/4606ddccdfe8f343f8137de7fea7f91fc4aef3a3|5;jdv/0|iosapp|t_335139774|liteshare|Qqfriends|1614206359106|1614206366;adk/;app_device/IOS;pap/JA2020_3112531|3.7.0|IOS 13.6.1;Mozilla/5.0 (iPhone; CPU iPhone OS 13_6_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1',
|
||||
'jdltapp;iPhone;3.7.0;14.4;3b6e79334551fc6f31952d338b996789d157c4e8;network/wifi;hasUPPay/0;pushNoticeIsOpen/0;lang/zh_CN;model/iPhone10,1;addressid/138051400;hasOCPay/0;appBuild/1017;supportBestPay/0;pv/14.34;apprpd/MyJD_Main;ref/MyJdMTAManager;psq/12;ads/;psn/3b6e79334551fc6f31952d338b996789d157c4e8|46;jdv/0|kong|t_1001707023_|jingfen|e80d7173a4264f4c9a3addcac7da8b5d|1613837384708|1613858760;adk/;app_device/IOS;pap/JA2020_3112531|3.7.0|IOS 14.4;Mozilla/5.0 (iPhone; CPU iPhone OS 14_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1',
|
||||
'jdltapp;android;3.7.0;10;1346235693831363-2373837393932673;network/wifi;model/LYA-AL00;addressid/3321567203;aid/1d2e9816278799b7;oaid/00000000-0000-0000-0000-000000000000;osVer/29;appBuild/1436;psn/45VUZFTZJkhP5fAXbeBoQ0 O2GCB I|7;psq/5;adk/;ads/;pap/JA2020_3112531|3.7.0|ANDROID 10;osv/10;pv/5.8;jdv/0|iosapp|t_335139774|liteshare|CopyURL|1614066210320|1614066219;ref/com.jd.jdlite.lib.personal.view.fragment.JDPersonalFragment;partner/huawei;apprpd/MyJD_Main;eufv/1;Mozilla/5.0 (Linux; Android 10; LYA-AL00 Build/HUAWEILYA-AL00; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/83.0.4103.106 Mobile Safari/537.36',
|
||||
'jdltapp;iPhone;3.7.0;14.3;c2a8854e622a1b17a6c56c789f832f9d78ef1ba7;network/wifi;hasUPPay/0;pushNoticeIsOpen/1;lang/zh_CN;model/iPhone12,5;addressid/;hasOCPay/0;appBuild/1017;supportBestPay/0;pv/3.9;apprpd/MyJD_Main;ref/MyJdMTAManager;psq/8;ads/;psn/c2a8854e622a1b17a6c56c789f832f9d78ef1ba7|6;jdv/0|direct|-|none|-|1613541016735|1613823566;adk/;app_device/IOS;pap/JA2020_3112531|3.7.0|IOS 14.3;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1',
|
||||
'jdltapp;android;3.7.0;9;;network/wifi;model/MIX 2S;addressid/;aid/f87efed6d9ed3c65;oaid/94739128ef9dd245;osVer/28;appBuild/1436;psn/R7wD/OWkQjYWxax1pDV6kTIDFPJCUid7C/nl2hHnUuI=|3;psq/13;adk/;ads/;pap/JA2020_3112531|3.7.0|ANDROID 9;osv/9;pv/1.42;jdv/;ref/activityId=8a8fabf3cccb417f8e691b6774938bc2;partner/xiaomi;apprpd/jsbqd_home;eufv/1;Mozilla/5.0 (Linux; Android 9; MIX 2S Build/PKQ1.180729.001; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/88.0.4324.181 Mobile Safari/537.36',
|
||||
'jdltapp;iPhone;3.7.0;14.4;network/wifi;Mozilla/5.0 (iPhone; CPU iPhone OS 14_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1',
|
||||
'jdltapp;android;3.7.0;10;network/wifi;Mozilla/5.0 (Linux; Android 10; Redmi Note 7 Build/QKQ1.190910.002; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/88.0.4324.152 Mobile Safari/537.36',
|
||||
'jdltapp;iPhone;3.7.0;14.4;network/3g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1',
|
||||
'jdltapp;iPhone;3.7.0;14.4;network/wifi;Mozilla/5.0 (iPhone; CPU iPhone OS 14_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148',
|
||||
'jdltapp;iPad;3.7.0;14.4;network/wifi;hasUPPay/0;pushNoticeIsOpen/1;lang/zh_CN;model/iPad6,3;hasOCPay/0;appBuild/1017;supportBestPay/0;pv/231.11;pap/JA2020_3112531|3.7.0|IOS 14.4;apprpd/;psn/f5e7b7980fb50efc9c294ac38653c1584846c3db|305;usc/kong;jdv/0|kong|t_1000170135|tuiguang|notset|1613606450668|1613606450;umd/tuiguang;psq/2;ucp/t_1000170135;app_device/IOS;utr/notset;ref/JDLTRedPacketViewController;adk/;ads/;Mozilla/5.0 (iPad; CPU OS 14_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1',
|
||||
'jdltapp;iPhone;3.7.0;13.5;network/wifi;hasUPPay/0;pushNoticeIsOpen/0;lang/zh_CN;model/iPhone8,1;addressid/669949466;hasOCPay/0;appBuild/1017;supportBestPay/0;pv/9.11;apprpd/;ref/JDLTSubMainPageViewController;psq/10;ads/;psn/500a795cb2abae60b877ee4a1930557a800bef1c|11;jdv/;adk/;app_device/IOS;pap/JA2020_3112531|3.7.0|IOS 13.5;Mozilla/5.0 (iPhone; CPU iPhone OS 13_5 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1',
|
||||
'jdltapp;iPhone;3.7.0;14.3;network/3g;hasUPPay/0;pushNoticeIsOpen/0;lang/zh_CN;model/iPhone13,4;addressid/;hasOCPay/0;appBuild/1017;supportBestPay/0;pv/4.47;apprpd/;ref/JDLTSubMainPageViewController;psq/8;ads/;psn/21631ed983b3e854a3154b0336413825ad0d6783|9;jdv/0|direct|-|none|-|1614150725100|1614225882;adk/;app_device/IOS;pap/JA2020_3112531|3.7.0|IOS 14.3;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1',
|
||||
'jdltapp;iPhone;3.7.0;14.3;network/3g;hasUPPay/0;pushNoticeIsOpen/0;lang/zh_CN;model/iPhone13,4;addressid/;hasOCPay/0;appBuild/1017;supportBestPay/0;pv/4.47;apprpd/;ref/JDLTSubMainPageViewController;psq/8;ads/;psn/21631ed983b3e854a3154b0336413825ad0d6783|9;jdv/0|direct|-|none|-|1614150725100|1614225882;adk/;app_device/IOS;pap/JA2020_3112531|3.7.0|IOS 14.3;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1',
|
||||
'jdltapp;iPhone;3.7.0;14.4;network/wifi;hasUPPay/0;pushNoticeIsOpen/0;lang/zh_CN;model/iPhone13,2;addressid/;hasOCPay/0;appBuild/1017;supportBestPay/0;pv/3.15;apprpd/;ref/https%3A%2F%2Fjdcs.m.jd.com%2Fchat%2Findex.action%3Fentry%3Djd_m_JiSuCommodity%26pid%3D7763388%26lng%3D118.159665%26lat%3D24.504633%26sid%3D31cddc2d58f6e36bf2c31c4e8a79767w%26un_area%3D16_1315_3486_0;psq/12;ads/;psn/c10e0db6f15dec57a94637365f4c3d43e05bbd48|4;jdv/0|;adk/;app_device/IOS;pap/JA2020_3112531|3.7.0|IOS 14.4;Mozilla/5.0 (iPhone; CPU iPhone OS 14_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1',
|
||||
'jdltapp;iPhone;3.7.0;14.4;network/wifi;hasUPPay/0;pushNoticeIsOpen/0;lang/zh_CN;model/iPhone13,2;addressid/;hasOCPay/0;appBuild/1017;supportBestPay/0;pv/3.15;apprpd/;ref/https%3A%2F%2Fjdcs.m.jd.com%2Fchat%2Findex.action%3Fentry%3Djd_m_JiSuCommodity%26pid%3D7763388%26lng%3D118.159665%26lat%3D24.504633%26sid%3D31cddc2d58f6e36bf2c31c4e8a79767w%26un_area%3D16_1315_3486_0;psq/12;ads/;psn/c10e0db6f15dec57a94637365f4c3d43e05bbd48|4;jdv/0|;adk/;app_device/IOS;pap/JA2020_3112531|3.7.0|IOS 14.4;Mozilla/5.0 (iPhone; CPU iPhone OS 14_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1',
|
||||
'jdltapp;iPhone;3.7.0;14.4;network/wifi;hasUPPay/0;pushNoticeIsOpen/0;lang/zh_CN;model/iPhone13,2;addressid/;hasOCPay/0;appBuild/1017;supportBestPay/0;pv/3.15;apprpd/;ref/https%3A%2F%2Fjdcs.m.jd.com%2Fchat%2Findex.action%3Fentry%3Djd_m_JiSuCommodity%26pid%3D7763388%26lng%3D118.159665%26lat%3D24.504633%26sid%3D31cddc2d58f6e36bf2c31c4e8a79767w%26un_area%3D16_1315_3486_0;psq/12;ads/;psn/c10e0db6f15dec57a94637365f4c3d43e05bbd48|4;jdv/0|;adk/;app_device/IOS;pap/JA2020_3112531|3.7.0|IOS 14.4;Mozilla/5.0 (iPhone; CPU iPhone OS 14_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1',
|
||||
'jdltapp;iPhone;3.7.0;14.4;;network/wifi;hasUPPay/0;pushNoticeIsOpen/0;lang/zh_CN;model/iPhone11,6;hasOCPay/0;appBuild/1017;supportBestPay/0;addressid/2813715704;pv/67.38;apprpd/MyJD_Main;ref/https%3A%2F%2Fh5.m.jd.com%2FbabelDiy%2FZeus%2F2ynE8QDtc2svd36VowmYWBzzDdK6%2Findex.html%3Flng%3D103.957532%26lat%3D30.626962%26sid%3D4fe8ef4283b24723a7bb30ee87c18b2w%26un_area%3D22_1930_49324_52512;psq/4;ads/;psn/5aef178f95931bdbbde849ea9e2fc62b18bc5829|127;jdv/0|direct|-|none|-|1612588090667|1613822580;adk/;app_device/IOS;pap/JA2020_3112531|3.7.0|IOS 14.4;Mozilla/5.0 (iPhone; CPU iPhone OS 14_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1',
|
||||
'jdltapp;iPhone;3.7.0;14.3;;network/4g;hasUPPay/0;pushNoticeIsOpen/0;lang/zh_CN;model/iPhone11,2;addressid/;hasOCPay/0;appBuild/1017;supportBestPay/0;pv/6.28;apprpd/;ref/JDLTRedPacketViewController;psq/3;ads/;psn/d7beab54ae7758fa896c193b49470204fbb8fce9|8;jdv/0|kong|t_1001707023_|jingfen|79ad0319fa4d47e38521a616d80bc4bd|1613800945610|1613824900;adk/;app_device/IOS;pap/JA2020_3112531|3.7.0|IOS 14.3;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1',
|
||||
'jdltapp;iPhone;3.7.0;14.3;network/4g;hasUPPay/0;pushNoticeIsOpen/0;lang/zh_CN;model/iPhone11,2;addressid/;hasOCPay/0;appBuild/1017;supportBestPay/0;pv/6.28;apprpd/;ref/JDLTRedPacketViewController;psq/3;ads/;psn/d7beab54ae7758fa896c193b49470204fbb8fce9|8;jdv/0|kong|t_1001707023_|jingfen|79ad0319fa4d47e38521a616d80bc4bd|1613800945610|1613824900;adk/;app_device/IOS;pap/JA2020_3112531|3.7.0|IOS 14.3;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1',
|
||||
'jdltapp;iPhone;3.7.0;14.3;;network/4g;hasUPPay/0;pushNoticeIsOpen/0;lang/zh_CN;model/iPhone11,2;addressid/;hasOCPay/0;appBuild/1017;supportBestPay/0;pv/6.28;apprpd/;ref/JDLTRedPacketViewController;psq/3;ads/;psn/d7beab54ae7758fa896c193b49470204fbb8fce9|8;jdv/0|kong|t_1001707023_|jingfen|79ad0319fa4d47e38521a616d80bc4bd|1613800945610|1613824900;adk/;app_device/IOS;pap/JA2020_3112531|3.7.0|IOS 14.3;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1',
|
||||
'jdltapp;iPhone;3.7.0;14.3;network/4g;hasUPPay/0;pushNoticeIsOpen/0;lang/zh_CN;model/iPhone11,2;addressid/;hasOCPay/0;appBuild/1017;supportBestPay/0;pv/6.28;apprpd/;ref/JDLTRedPacketViewController;psq/3;ads/;psn/d7beab54ae7758fa896c193b49470204fbb8fce9|8;jdv/0|kong|t_1001707023_|jingfen|79ad0319fa4d47e38521a616d80bc4bd|1613800945610|1613824900;adk/;app_device/IOS;pap/JA2020_3112531|3.7.0|IOS 14.3;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1',
|
||||
'jdltapp;iPhone;3.7.0;14.3;network/4g;hasUPPay/0;pushNoticeIsOpen/0;lang/zh_CN;model/iPhone11,2;addressid/;hasOCPay/0;appBuild/1017;supportBestPay/0;pv/6.28;apprpd/;ref/JDLTRedPacketViewController;psq/3;ads/;psn/d7beab54ae7758fa896c193b49470204fbb8fce9|8;jdv/0|kong|t_1001707023_|jingfen|79ad0319fa4d47e38521a616d80bc4bd|1613800945610|1613824900;adk/;app_device/IOS;pap/JA2020_3112531|3.7.0|IOS 14.3;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1',
|
||||
'jdltapp;iPhone;3.7.0;14.4;network/4g;hasUPPay/0;pushNoticeIsOpen/0;lang/zh_CN;model/iPhone12,1;addressid/3104834020;hasOCPay/0;appBuild/1017;supportBestPay/0;pv/4.6;apprpd/;ref/JDLTSubMainPageViewController;psq/5;ads/;psn/c633e62b5a4ad0fdd93d9862bdcacfa8f3ecef63|6;jdv/0|;adk/;app_device/IOS;pap/JA2020_3112531|3.7.0|IOS 14.4;Mozilla/5.0 (iPhone; CPU iPhone OS 14_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1',
|
||||
'jdltapp;iPhone;3.7.0;14.3;network/wifi;hasUPPay/0;pushNoticeIsOpen/0;lang/zh_CN;model/iPhone10,1;addressid/1346909722;hasOCPay/0;appBuild/1017;supportBestPay/0;pv/30.8;apprpd/;ref/JDLTSubMainPageViewController;psq/7;ads/;psn/40d4d4323eb3987226cae367d6b0d8be50f2c7b3|39;jdv/0|kong|t_1000252057_0|tuiguang|eba7648a0f4445aa9cfa6f35c6f36e15|1613995717959|1613995723;adk/;app_device/IOS;pap/JA2020_3112531|3.7.0|IOS 14.3;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1',
|
||||
'jdltapp;iPhone;3.7.0;14.3;network/wifi;pushNoticeIsOpen/0;lang/zh_CN;model/iPhone10,1;addressid/1346909722;hasOCPay/0;appBuild/1017;supportBestPay/0;pv/30.8;apprpd/;ref/JDLTSubMainPageViewController;psq/7;ads/;psn/40d4d4323eb3987226cae367d6b0d8be50f2c7b3|39;jdv/0|kong|t_1000252057_0|tuiguang|eba7648a0f4445aa9cfa6f35c6f36e15|1613995717959|1613995723;adk/;app_device/IOS;pap/JA2020_3112531|3.7.0|IOS 14.3;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1',
|
||||
'jdltapp;iPhone;3.7.0;14.4;network/wifi;hasUPPay/0;pushNoticeIsOpen/0;lang/zh_CN;model/iPhone11,6;addressid/138164461;hasOCPay/0;appBuild/1017;supportBestPay/0;pv/7.8;apprpd/;ref/JDLTSubMainPageViewController;psq/7;ads/;psn/d40e5d4a33c100e8527f779557c347569b49c304|7;jdv/0|kong|t_1001226363_|jingfen|3bf5372cb9cd445bbb270b8bc9a34f00|1608439066693|1608439068;adk/;app_device/IOS;pap/JA2020_3112531|3.7.0|IOS 14.4;Mozilla/5.0 (iPhone; CPU iPhone OS 14_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1',
|
||||
'jdltapp;iPhone;3.7.0;14.4;network/wifi;hasUPPay/0;pushNoticeIsOpen/0;lang/zh_CN;model/iPhone11,6;addressid/138164461;hasOCPay/0;appBuild/1017;supportBestPay/0;pv/7.8;apprpd/;ref/JDLTSubMainPageViewController;psq/7;ads/;psn/d40e5d4a33c100e8527f779557c347569b49c304|7;jdv/0|kong|t_1001226363_|jingfen|3bf5372cb9cd445bbb270b8bc9a34f00|1608439066693|1608439068;adk/;app_device/IOS;pap/JA2020_3112531|3.7.0|IOS 14.4;Mozilla/5.0 (iPhone; CPU iPhone OS 14_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1',
|
||||
'jdltapp;iPhone;3.7.0;14.4;network/wifi;hasUPPay/0;pushNoticeIsOpen/0;lang/zh_CN;model/iPhone11,6;addressid/138164461;hasOCPay/0;appBuild/1017;supportBestPay/0;pv/7.8;apprpd/;ref/JDLTSubMainPageViewController;psq/7;ads/;psn/d40e5d4a33c100e8527f779557c347569b49c304|7;jdv/0|kong|t_1001226363_|jingfen|3bf5372cb9cd445bbb270b8bc9a34f00|1608439066693|1608439068;adk/;app_device/IOS;pap/JA2020_3112531|3.7.0|IOS 14.4;Mozilla/5.0 (iPhone; CPU iPhone OS 14_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1',
|
||||
'jdltapp;iPhone;3.7.0;13.5;network/wifi;hasUPPay/0;pushNoticeIsOpen/0;lang/zh_CN;model/iPhone9,2;addressid/2237496805;hasOCPay/0;appBuild/1017;supportBestPay/0;pv/13.6;apprpd/;ref/JDLTSubMainPageViewController;psq/5;ads/;psn/48e495dcf5dc398b4d46b27e9f15a2b427a154aa|15;jdv/0|direct|-|none|-|1613354874698|1613952828;adk/;app_device/IOS;pap/JA2020_3112531|3.7.0|IOS 13.5;Mozilla/5.0 (iPhone; CPU iPhone OS 13_5 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1',
|
||||
'jdltapp;android;3.7.0;10;network/wifi;model/ONEPLUS A6000;addressid/0;aid/3d3bbb25af44c59c;oaid/;osVer/29;appBuild/1436;psn/ECbc2EqmdSa7mDF1PS1GSrV/Tn7R1LS1|6;psq/8;adk/;ads/;pap/JA2020_3112531|3.7.0|ANDROID 10;osv/10;pv/2.67;jdv/0|direct|-|none|-|1613822479379|1613991194;ref/com.jd.jdlite.lib.personal.view.fragment.JDPersonalFragment;partner/oppo;apprpd/MyJD_Main;eufv/1;Mozilla/5.0 (Linux; Android 10; ONEPLUS A6000 Build/QKQ1.190716.003; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/66.0.3359.126 MQQBrowser/6.2 TBS/045140 Mobile Safari/537.36',
|
||||
'jdltapp;android;3.7.0;8.1.0;network/wifi;model/16th Plus;addressid/0;aid/f909e5f2c464c7c6;oaid/;osVer/27;appBuild/1436;psn/c21YWvVr77Hn6 pOZfxXGY4TZrre1 UOL5hcPbCEDMo=|3;psq/10;adk/;ads/;pap/JA2020_3112531|3.7.0|ANDROID 8.1.0;osv/8.1.0;pv/2.15;jdv/;ref/com.jd.jdlite.lib.personal.view.fragment.JDPersonalFragment;partner/jsxdlyqj09;apprpd/MyJD_Main;eufv/1;Mozilla/5.0 (Linux; Android 8.1.0; 16th Plus Build/OPM1.171019.026; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/77.0.3865.120 MQQBrowser/6.2 TBS/045514 Mobile Safari/537.36',
|
||||
'jdltapp;android;3.7.0;11;network/wifi;model/Mi 10 Pro;addressid/0;aid/14d7cbd934eb7dc1;oaid/335f198546eb3141;osVer/30;appBuild/1436;psn/ZcQh/Wov sNYfZ6JUjTIUBu28 KT0T3u|1;psq/24;adk/;ads/;pap/JA2020_3112531|3.7.0|ANDROID 11;osv/11;pv/1.24;jdv/;ref/com.jd.jdlite.lib.jdlitemessage.view.activity.MessageCenterMainActivity;partner/xiaomi;apprpd/MessageCenter_MessageMerge;eufv/1;Mozilla/5.0 (Linux; Android 11; Mi 10 Pro Build/RKQ1.200826.002; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/88.0.4324.181 Mobile Safari/537.36',
|
||||
'jdltapp;android;3.7.0;10;network/wifi;model/MI 8;addressid/1969998059;aid/8566972dfd9a795d;oaid/4a8b773c3e307386;osVer/29;appBuild/1436;psn/PhYbUtCsCJo r 1b8hwxjnY8rEv5S8XC|383;psq/14;adk/;ads/;pap/JA2020_3112531|3.7.0|ANDROID 10;osv/10;pv/374.14;jdv/0|iosapp|t_335139774|liteshare|CopyURL|1609306590175|1609306596;ref/com.jd.jdlite.lib.jdlitemessage.view.activity.MessageCenterMainActivity;partner/jsxdlyqj09;apprpd/MessageCenter_MessageMerge;eufv/1;Mozilla/5.0 (Linux; Android 10; MI 8 Build/QKQ1.190828.002; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/66.0.3359.126 MQQBrowser/6.2 TBS/045140 Mobile Safari/537.36',
|
||||
'jdltapp;iPhone;3.7.0;14.4;network/wifi;hasUPPay/0;pushNoticeIsOpen/0;lang/zh_CN;model/iPhone8,4;addressid/1477231693;hasOCPay/0;appBuild/1017;supportBestPay/0;pv/21.15;apprpd/MyJD_Main;ref/https%3A%2F%2Fgold.jd.com%2F%3Flng%3D0.000000%26lat%3D0.000000%26sid%3D4584eb84dc00141b0d58e000583a338w%26un_area%3D19_1607_3155_62114;psq/0;ads/;psn/2c822e59db319590266cc83b78c4a943783d0077|46;jdv/0|;adk/;app_device/IOS;pap/JA2020_3112531|3.7.0|IOS 14.4;Mozilla/5.0 (iPhone; CPU iPhone OS 14_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1',
|
||||
'jdltapp;iPhone;3.7.0;14.4;network/wifi;hasUPPay/0;pushNoticeIsOpen/0;lang/zh_CN;model/iPhone9,1;addressid/70390480;hasOCPay/0;appBuild/1017;supportBestPay/0;pv/4.24;apprpd/MyJD_Main;ref/https%3A%2F%2Fjdcs.m.jd.com%2Fafter%2Findex.action%3FcategoryId%3D600%26v%3D6%26entry%3Dm_self_jd;psq/4;ads/;psn/6d343c58764a908d4fa56609da4cb3a5cc1396d3|17;jdv/0|;adk/;app_device/IOS;pap/JA2020_3112531|3.7.0|IOS 14.4;Mozilla/5.0 (iPhone; CPU iPhone OS 14_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1',
|
||||
'jdltapp;iPhone;3.7.0;14.4;network/wifi;hasUPPay/0;pushNoticeIsOpen/0;lang/zh_CN;model/iPhone9,1;addressid/70390480;hasOCPay/0;appBuild/1017;supportBestPay/0;pv/4.24;apprpd/MyJD_Main;ref/https%3A%2F%2Fjdcs.m.jd.com%2Fafter%2Findex.action%3FcategoryId%3D600%26v%3D6%26entry%3Dm_self_jd;psq/4;ads/;psn/6d343c58764a908d4fa56609da4cb3a5cc1396d3|17;jdv/0|;adk/;app_device/IOS;pap/JA2020_3112531|3.7.0|IOS 14.4;Mozilla/5.0 (iPhone; CPU iPhone OS 14_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1',
|
||||
'jdltapp;iPhone;3.7.0;14.4;network/wifi;pushNoticeIsOpen/0;lang/zh_CN;model/iPhone9,1;addressid/70390480;hasOCPay/0;appBuild/1017;supportBestPay/0;pv/4.24;apprpd/MyJD_Main;ref/https%3A%2F%2Fjdcs.m.jd.com%2Fafter%2Findex.action%3FcategoryId%3D600%26v%3D6%26entry%3Dm_self_jd;psq/4;ads/;psn/6d343c58764a908d4fa56609da4cb3a5cc1396d3|17;jdv/0|;adk/;app_device/IOS;pap/JA2020_3112531|3.7.0|IOS 14.4;Mozilla/5.0 (iPhone; CPU iPhone OS 14_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1',
|
||||
'jdltapp;iPhone;3.7.0;14.4;network/wifi;hasUPPay/0;pushNoticeIsOpen/0;lang/zh_CN;model/iPhone9,1;addressid/70390480;hasOCPay/0;appBuild/1017;supportBestPay/0;pv/4.24;apprpd/MyJD_Main;ref/https%3A%2F%2Fjdcs.m.jd.com%2Fafter%2Findex.action%3FcategoryId%3D600%26v%3D6%26entry%3Dm_self_jd;psq/4;ads/;psn/6d343c58764a908d4fa56609da4cb3a5cc1396d3|17;jdv/0|;adk/;app_device/IOS;pap/JA2020_3112531|3.7.0|IOS 14.4;Mozilla/5.0 (iPhone; CPU iPhone OS 14_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1',
|
||||
'jdltapp;iPhone;3.7.0;14.4;network/4g;hasUPPay/0;pushNoticeIsOpen/0;lang/zh_CN;model/iPhone12,3;hasOCPay/0;appBuild/1017;supportBestPay/0;addressid/;pv/3.49;apprpd/MyJD_Main;ref/MyJdMTAManager;psq/7;ads/;psn/9e0e0ea9c6801dfd53f2e50ffaa7f84c7b40cd15|6;jdv/0|;adk/;app_device/IOS;pap/JA2020_3112531|3.7.0|IOS 14.4;Mozilla/5.0 (iPhone; CPU iPhone OS 14_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1',
|
||||
'jdltapp;iPad;3.7.0;14.4;network/wifi;hasUPPay/0;pushNoticeIsOpen/0;lang/zh_CN;model/iPad7,5;addressid/;hasOCPay/0;appBuild/1017;supportBestPay/0;pv/4.14;apprpd/MyJD_Main;ref/MyJdMTAManager;psq/3;ads/;psn/956c074c769cd2eeab2e36fca24ad4c9e469751a|8;jdv/0|;adk/;app_device/IOS;pap/JA2020_3112531|3.7.0|IOS 14.4;Mozilla/5.0 (iPad; CPU OS 14_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1',
|
||||
]
|
||||
/**
|
||||
* 生成随机数字
|
||||
* @param {number} min 最小值(包含)
|
||||
* @param {number} max 最大值(不包含)
|
||||
*/
|
||||
function randomNumber(min = 0, max = 100) {
|
||||
return Math.min(Math.floor(min + Math.random() * (max - min)), max);
|
||||
}
|
||||
const USER_AGENT = USER_AGENTS[randomNumber(0, USER_AGENTS.length)];
|
||||
|
||||
module.exports = {
|
||||
USER_AGENT
|
||||
}
|
|
@ -0,0 +1,28 @@
|
|||
### 注意注意
|
||||
|
||||
1.自用,勿拉取(后果自负)
|
||||
|
||||
2.本项目仅用于学习使用,请下载后24小时内删除
|
||||
|
||||
### 自动填地址
|
||||
|
||||
#### 无线类:
|
||||
`export WX_ADDRESS="" # 变量格式:收件人@手机号@省份@城市@区县@详细地址@6位行政区划代码@邮编,需按照顺序依次填写,多个用管道符分开(6位行政区划代码自己查地图,也可用身份证号前六位)`
|
||||
|
||||
`export WX_ADDRESS_BLOCK="" # 多个关键词用@分开 黑名单`
|
||||
|
||||
### 拉取(js py ts)青龙 config.sh 文件中修改
|
||||
|
||||
ql repo命令拉取脚本时需要拉取的文件后缀,直接写文件后缀名即可
|
||||
|
||||
`RepoFileExtensions="js py ts"`
|
||||
|
||||
### 神秘代码
|
||||
|
||||
`ql repo https://github.com/KingRan/KR.git "jd_|jx_|jdCookie" "activity|backUp" "^jd[^_]|USER|utils|function|sign|sendNotify|ql|JDJR"`
|
||||
|
||||
拉库失败或者拉不到更新的解决方案:
|
||||
|
||||
`rm -rf /ql/repo/KingRan_KR && ql repo https://github.com/KingRan/KR.git "jd_|jx_|jdCookie" "activity|backUp" "^jd[^_]|USER|utils|function|sendNotify|ql|JDJR"`
|
||||
|
||||
|
|
@ -0,0 +1,92 @@
|
|||
const USER_AGENTS = [
|
||||
"jdapp;android;11.2.8;;;Mozilla/5.0 (Linux; Android 10; ONEPLUS A5010 Build/QKQ1.191014.012; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/76.0.3809.89 MQQBrowser/6.2 TBS/045230 Mobile Safari/537.36",
|
||||
"jdapp;iPhone;11.2.6;;;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1",
|
||||
"jdapp;android;11.2.5;;;Mozilla/5.0 (Linux; Android 9; Mi Note 3 Build/PKQ1.181007.001; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/78.0.3904.108 MQQBrowser/6.2 TBS/045131 Mobile Safari/537.36",
|
||||
"jdapp;android;11.2.4;;;Mozilla/5.0 (Linux; Android 10; GM1910 Build/QKQ1.190716.003; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/76.0.3809.89 MQQBrowser/6.2 TBS/045230 Mobile Safari/537.36",
|
||||
"jdapp;android;11.2.2;;;Mozilla/5.0 (Linux; Android 9; 16T Build/PKQ1.190616.001; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/78.0.3904.108 MQQBrowser/6.2 TBS/044942 Mobile Safari/537.36",
|
||||
"jdapp;iPhone;11.2.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",
|
||||
"jdapp;iPhone;11.1.4;;;Mozilla/5.0 (iPhone; CPU iPhone OS 13_6 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1",
|
||||
"jdapp;iPhone;11.1.2;;;Mozilla/5.0 (iPhone; CPU iPhone OS 13_5 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1",
|
||||
"jdapp;iPhone;11.1.0;;;Mozilla/5.0 (iPhone; CPU iPhone OS 14_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1",
|
||||
"jdapp;iPhone;11.0.4;;;Mozilla/5.0 (iPhone; CPU iPhone OS 13_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1",
|
||||
"jdapp;iPhone;11.0.2;;;Mozilla/5.0 (iPhone; CPU iPhone OS 13_7 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1",
|
||||
"jdapp;iPhone;11.0.0;;;Mozilla/5.0 (iPhone; CPU iPhone OS 14_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1",
|
||||
"jdapp;iPhone;10.5.4;;;Mozilla/5.0 (iPhone; CPU iPhone OS 13_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1",
|
||||
"jdapp;iPhone;10.5.2;;;Mozilla/5.0 (iPhone; CPU iPhone OS 13_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1",
|
||||
"jdapp;iPhone;10.5.0;;;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1",
|
||||
"jdapp;android;11.2.8;;;Mozilla/5.0 (Linux; Android 9; MI 6 Build/PKQ1.190118.001; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/78.0.3904.108 MQQBrowser/6.2 TBS/044942 Mobile Safari/537.36",
|
||||
"jdapp;android;11.2.6;;;Mozilla/5.0 (Linux; Android 11; Redmi K30 5G Build/RKQ1.200826.002; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/76.0.3809.89 MQQBrowser/6.2 TBS/045511 Mobile Safari/537.36",
|
||||
"jdapp;iPhone;11.2.5;;;Mozilla/5.0 (iPhone; CPU iPhone OS 11_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15F79",
|
||||
"jdapp;android;11.2.4;;;Mozilla/5.0 (Linux; Android 10; M2006J10C Build/QP1A.190711.020; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/76.0.3809.89 MQQBrowser/6.2 TBS/045230 Mobile Safari/537.36",
|
||||
"jdapp;android;11.2.2;;;Mozilla/5.0 (Linux; Android 10; M2006J10C Build/QP1A.190711.020; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/76.0.3809.89 MQQBrowser/6.2 TBS/045230 Mobile Safari/537.36",
|
||||
"jdapp;android;11.2.0;;;Mozilla/5.0 (Linux; Android 10; ONEPLUS A6000 Build/QKQ1.190716.003; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/76.0.3809.89 MQQBrowser/6.2 TBS/045224 Mobile Safari/537.36",
|
||||
"jdapp;android;11.1.4;;;Mozilla/5.0 (Linux; Android 9; MHA-AL00 Build/HUAWEIMHA-AL00; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/78.0.3904.108 MQQBrowser/6.2 TBS/044942 Mobile Safari/537.36",
|
||||
"jdapp;android;11.1.2;;;Mozilla/5.0 (Linux; Android 8.1.0; 16 X Build/OPM1.171019.026; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/78.0.3904.108 MQQBrowser/6.2 TBS/044942 Mobile Safari/537.36",
|
||||
"jdapp;android;11.1.0;;;Mozilla/5.0 (Linux; Android 8.0.0; HTC U-3w Build/OPR6.170623.013; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/78.0.3904.108 MQQBrowser/6.2 TBS/044942 Mobile Safari/537.36",
|
||||
"jdapp;iPhone;11.0.4;;;Mozilla/5.0 (iPhone; CPU iPhone OS 14_0_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1",
|
||||
"jdapp;android;11.0.2;;;Mozilla/5.0 (Linux; Android 10; LYA-AL00 Build/HUAWEILYA-AL00L; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/76.0.3809.89 MQQBrowser/6.2 TBS/045230 Mobile Safari/537.36",
|
||||
"jdapp;iPhone;11.0.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",
|
||||
"jdapp;iPhone;10.5.4;;;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1",
|
||||
"jdapp;iPhone;10.5.2;;;Mozilla/5.0 (iPhone; CPU iPhone OS 14_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1",
|
||||
"jdapp;android;10.5.0;;;Mozilla/5.0 (Linux; Android 8.1.0; MI 8 Build/OPM1.171019.026; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/78.0.3904.108 MQQBrowser/6.2 TBS/045131 Mobile Safari/537.36",
|
||||
"jdapp;android;11.2.8;;;Mozilla/5.0 (Linux; Android 10; Redmi K20 Pro Premium Edition Build/QKQ1.190825.002; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/76.0.3809.89 MQQBrowser/6.2 TBS/045227 Mobile Safari/537.36",
|
||||
"jdapp;iPhone;11.2.5;;;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1",
|
||||
"jdapp;iPhone;11.2.4;;;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1",
|
||||
"jdapp;android;11.2.2;;;Mozilla/5.0 (Linux; Android 11; Redmi K20 Pro Premium Edition Build/RKQ1.200826.002; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/76.0.3809.89 MQQBrowser/6.2 TBS/045513 Mobile Safari/537.36",
|
||||
"jdapp;android;11.2.0;;;Mozilla/5.0 (Linux; Android 10; MI 8 Build/QKQ1.190828.002; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/76.0.3809.89 MQQBrowser/6.2 TBS/045227 Mobile Safari/537.36",
|
||||
"jdapp;iPhone;11.1.4;;;Mozilla/5.0 (iPhone; CPU iPhone OS 14_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1",
|
||||
"jdapp;android;11.0.1;;;Mozilla/5.0 (Linux; Android 10; ONEPLUS A5010 Build/QKQ1.191014.012; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/76.0.3809.89 MQQBrowser/6.2 TBS/045230 Mobile Safari/537.36",
|
||||
"jdapp;iPhone;11.1.2;;;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1",
|
||||
"jdapp;android;11.1.0;;;Mozilla/5.0 (Linux; Android 10; Mi Note 5 Build/PKQ1.181007.001; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/78.0.3904.108 MQQBrowser/6.2 TBS/045131 Mobile Safari/537.36",
|
||||
"jdapp;android;11.0.4;;;Mozilla/5.0 (Linux; Android 11; LIO-AN00 Build/HUAWEILIO-AN00; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/76.0.3809.89 MQQBrowser/6.2 TBS/045230 Mobile Safari/537.36",
|
||||
"jdapp;android;11.0.2;;;Mozilla/5.0 (Linux; Android 10; SKW-A0 Build/SKYW2001202CN00MQ0; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/78.0.3904.108 MQQBrowser/6.2 TBS/044942 Mobile Safari/537.36",
|
||||
"jdapp;iPhone;11.0.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",
|
||||
"jdapp;iPhone;10.5.4;;;Mozilla/5.0 (iPhone; CPU iPhone OS 13_6 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1",
|
||||
"jdapp;iPhone;10.5.2;;;Mozilla/5.0 (iPhone; CPU iPhone OS 13_5 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1",
|
||||
"jdapp;iPhone;10.5.0;;;Mozilla/5.0 (iPhone; CPU iPhone OS 14_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1",
|
||||
"jdapp;iPhone;11.2.8;;;Mozilla/5.0 (iPhone; CPU iPhone OS 13_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1",
|
||||
"jdapp;iPhone;11.2.5;;;Mozilla/5.0 (iPhone; CPU iPhone OS 13_7 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1",
|
||||
"jdapp;iPhone;11.2.4;;;Mozilla/5.0 (iPhone; CPU iPhone OS 14_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1",
|
||||
"jdapp;iPhone;11.2.2;;;Mozilla/5.0 (iPhone; CPU iPhone OS 13_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1",
|
||||
"jdapp;iPhone;11.2.0;;;Mozilla/5.0 (iPhone; CPU iPhone OS 13_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1",
|
||||
"jdapp;iPhone;11.1.4;;;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1",
|
||||
"jdapp;android;11.1.2;;;Mozilla/5.0 (Linux; Android 9; MI 6 Build/PKQ1.190118.001; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/78.0.3904.108 MQQBrowser/6.2 TBS/044942 Mobile Safari/537.36",
|
||||
"jdapp;android;11.1.0;;;Mozilla/5.0 (Linux; Android 12; Redmi K30 5G Build/RKQ1.200826.002; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/76.0.3809.89 MQQBrowser/6.2 TBS/045511 Mobile Safari/537.36",
|
||||
"jdapp;iPhone;11.0.4;;;Mozilla/5.0 (iPhone; CPU iPhone OS 11_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15F79",
|
||||
"jdapp;android;11.0.2;;;Mozilla/5.0 (Linux; Android 10; M2006J10C Build/QP1A.190711.020; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/76.0.3809.89 MQQBrowser/6.2 TBS/045230 Mobile Safari/537.36",
|
||||
"jdapp;android;11.0.0;;;Mozilla/5.0 (Linux; Android 12; HWI-AL00 Build/HUAWEIHWI-AL00; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/76.0.3809.89 MQQBrowser/6.2 TBS/045230 Mobile Safari/537.36",
|
||||
"jdapp;android;10.5.4;;;Mozilla/5.0 (Linux; Android 10; ANE-AL00 Build/HUAWEIANE-AL00; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/76.0.3809.89 MQQBrowser/6.2 TBS/045224 Mobile Safari/537.36",
|
||||
"jdapp;android;10.5.2;;;Mozilla/5.0 (Linux; Android 9; ELE-AL00 Build/HUAWEIELE-AL00; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/78.0.3904.108 MQQBrowser/6.2 TBS/044942 Mobile Safari/537.36",
|
||||
"jdapp;android;10.5.0;;;Mozilla/5.0 (Linux; Android 10; LIO-AL00 Build/HUAWEILIO-AL00; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/78.0.3904.108 MQQBrowser/6.2 TBS/044942 Mobile Safari/537.36",
|
||||
"jdapp;android;11.2.8;;;Mozilla/5.0 (Linux; Android 10; SM-G9750 Build/QP1A.190711.020; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/78.0.3904.108 MQQBrowser/6.2 TBS/044942 Mobile Safari/537.36",
|
||||
"jdapp;iPhone;11.2.5;;;Mozilla/5.0 (iPhone; CPU iPhone OS 14_0_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1",
|
||||
"jdapp;android;11.2.4;;;Mozilla/5.0 (Linux; Android 12; EVR-AL00 Build/HUAWEIEVR-AL00; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/76.0.3809.89 MQQBrowser/6.2 TBS/045230 Mobile Safari/537.36",
|
||||
"jdapp;iPhone;11.2.2;;;Mozilla/5.0 (iPhone; CPU iPhone OS 14_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1",
|
||||
"jdapp;iPhone;11.2.0;;;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1",
|
||||
"jdapp;iPhone;11.1.4;;;Mozilla/5.0 (iPhone; CPU iPhone OS 14_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1",
|
||||
"jdapp;android;11.1.2;;;Mozilla/5.0 (Linux; Android 8.1.0; MI 8 Build/OPM1.171019.026; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/78.0.3904.108 MQQBrowser/6.2 TBS/045131 Mobile Safari/537.36",
|
||||
"jdapp;android;11.1.0;;;Mozilla/5.0 (Linux; Android 9; HLK-AL00 Build/HONORHLK-AL00; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/76.0.3809.89 MQQBrowser/6.2 TBS/045227 Mobile Safari/537.36",
|
||||
"jdapp;iPhone;11.0.4;;;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1",
|
||||
"jdapp;iPhone;11.0.2;;;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1",
|
||||
"jdapp;android;11.0.0;;;Mozilla/5.0 (Linux; Android 10; LYA-AL10 Build/HUAWEILYA-AL10; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/76.0.3809.89 MQQBrowser/6.2 TBS/045513 Mobile Safari/537.36",
|
||||
"jdapp;android;10.5.4;;;Mozilla/5.0 (Linux; Android 10; MI 9 Build/QKQ1.190825.002; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/76.0.3809.89 MQQBrowser/6.2 TBS/045227 Mobile Safari/537.36",
|
||||
"jdapp;iPhone;10.5.2;;;Mozilla/5.0 (iPhone; CPU iPhone OS 14_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1",
|
||||
]
|
||||
/**
|
||||
* 生成随机数字
|
||||
* @param {number} min 最小值(包含)
|
||||
* @param {number} max 最大值(不包含)
|
||||
*/
|
||||
function randomNumber(min = 0, max = 80) {
|
||||
return Math.min(Math.floor(min + Math.random() * (max - min)), max);
|
||||
}
|
||||
const USER_AGENT = USER_AGENTS[randomNumber(0, USER_AGENTS.length)];
|
||||
|
||||
function UARAM (){
|
||||
return USER_AGENTS[randomNumber(0, USER_AGENTS.length)];
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
USER_AGENT,
|
||||
UARAM
|
||||
}
|
|
@ -0,0 +1,928 @@
|
|||
function safeAdd(x, y) {
|
||||
var lsw = (x & 0xffff) + (y & 0xffff)
|
||||
var msw = (x >> 16) + (y >> 16) + (lsw >> 16)
|
||||
return (msw << 16) | (lsw & 0xffff)
|
||||
}
|
||||
|
||||
/*
|
||||
* Bitwise rotate a 32-bit number to the left.
|
||||
*/
|
||||
function bitRotateLeft(num, cnt) {
|
||||
return (num << cnt) | (num >>> (32 - cnt))
|
||||
}
|
||||
|
||||
function md5(string, key, raw) {
|
||||
if (!key) {
|
||||
if (!raw) {
|
||||
return hexMD5(string)
|
||||
}
|
||||
return rawMD5(string)
|
||||
}
|
||||
if (!raw) {
|
||||
return hexHMACMD5(key, string)
|
||||
}
|
||||
return rawHMACMD5(key, string)
|
||||
}
|
||||
|
||||
/*
|
||||
* Convert a raw string to a hex string
|
||||
*/
|
||||
function rstr2hex(input) {
|
||||
var hexTab = '0123456789abcdef'
|
||||
var output = ''
|
||||
var x
|
||||
var i
|
||||
for (i = 0; i < input.length; i += 1) {
|
||||
x = input.charCodeAt(i)
|
||||
output += hexTab.charAt((x >>> 4) & 0x0f) + hexTab.charAt(x & 0x0f)
|
||||
}
|
||||
return output
|
||||
}
|
||||
/*
|
||||
* Encode a string as utf-8
|
||||
*/
|
||||
function str2rstrUTF8(input) {
|
||||
return unescape(encodeURIComponent(input))
|
||||
}
|
||||
/*
|
||||
* Calculate the MD5 of a raw string
|
||||
*/
|
||||
function rstrMD5(s) {
|
||||
return binl2rstr(binlMD5(rstr2binl(s), s.length * 8))
|
||||
}
|
||||
|
||||
function hexMD5(s) {
|
||||
return rstr2hex(rawMD5(s))
|
||||
}
|
||||
function rawMD5(s) {
|
||||
return rstrMD5(str2rstrUTF8(s))
|
||||
}
|
||||
|
||||
/*
|
||||
* These functions implement the four basic operations the algorithm uses.
|
||||
*/
|
||||
function md5cmn(q, a, b, x, s, t) {
|
||||
return safeAdd(bitRotateLeft(safeAdd(safeAdd(a, q), safeAdd(x, t)), s), b)
|
||||
}
|
||||
|
||||
function md5ff(a, b, c, d, x, s, t) {
|
||||
return md5cmn((b & c) | (~b & d), a, b, x, s, t)
|
||||
}
|
||||
|
||||
function md5gg(a, b, c, d, x, s, t) {
|
||||
return md5cmn((b & d) | (c & ~d), a, b, x, s, t)
|
||||
}
|
||||
|
||||
function md5hh(a, b, c, d, x, s, t) {
|
||||
return md5cmn(b ^ c ^ d, a, b, x, s, t)
|
||||
}
|
||||
|
||||
function md5ii(a, b, c, d, x, s, t) {
|
||||
return md5cmn(c ^ (b | ~d), a, b, x, s, t)
|
||||
}
|
||||
|
||||
/*
|
||||
* Calculate the MD5 of an array of little-endian words, and a bit length.
|
||||
*/
|
||||
function binlMD5(x, len) {
|
||||
/* append padding */
|
||||
x[len >> 5] |= 0x80 << (len % 32)
|
||||
x[((len + 64) >>> 9 << 4) + 14] = len
|
||||
|
||||
var i
|
||||
var olda
|
||||
var oldb
|
||||
var oldc
|
||||
var oldd
|
||||
var a = 1732584193
|
||||
var b = -271733879
|
||||
var c = -1732584194
|
||||
var d = 271733878
|
||||
|
||||
for (i = 0; i < x.length; i += 16) {
|
||||
olda = a
|
||||
oldb = b
|
||||
oldc = c
|
||||
oldd = d
|
||||
|
||||
a = md5ff(a, b, c, d, x[i], 7, -680876936)
|
||||
d = md5ff(d, a, b, c, x[i + 1], 12, -389564586)
|
||||
c = md5ff(c, d, a, b, x[i + 2], 17, 606105819)
|
||||
b = md5ff(b, c, d, a, x[i + 3], 22, -1044525330)
|
||||
a = md5ff(a, b, c, d, x[i + 4], 7, -176418897)
|
||||
d = md5ff(d, a, b, c, x[i + 5], 12, 1200080426)
|
||||
c = md5ff(c, d, a, b, x[i + 6], 17, -1473231341)
|
||||
b = md5ff(b, c, d, a, x[i + 7], 22, -45705983)
|
||||
a = md5ff(a, b, c, d, x[i + 8], 7, 1770035416)
|
||||
d = md5ff(d, a, b, c, x[i + 9], 12, -1958414417)
|
||||
c = md5ff(c, d, a, b, x[i + 10], 17, -42063)
|
||||
b = md5ff(b, c, d, a, x[i + 11], 22, -1990404162)
|
||||
a = md5ff(a, b, c, d, x[i + 12], 7, 1804603682)
|
||||
d = md5ff(d, a, b, c, x[i + 13], 12, -40341101)
|
||||
c = md5ff(c, d, a, b, x[i + 14], 17, -1502002290)
|
||||
b = md5ff(b, c, d, a, x[i + 15], 22, 1236535329)
|
||||
|
||||
a = md5gg(a, b, c, d, x[i + 1], 5, -165796510)
|
||||
d = md5gg(d, a, b, c, x[i + 6], 9, -1069501632)
|
||||
c = md5gg(c, d, a, b, x[i + 11], 14, 643717713)
|
||||
b = md5gg(b, c, d, a, x[i], 20, -373897302)
|
||||
a = md5gg(a, b, c, d, x[i + 5], 5, -701558691)
|
||||
d = md5gg(d, a, b, c, x[i + 10], 9, 38016083)
|
||||
c = md5gg(c, d, a, b, x[i + 15], 14, -660478335)
|
||||
b = md5gg(b, c, d, a, x[i + 4], 20, -405537848)
|
||||
a = md5gg(a, b, c, d, x[i + 9], 5, 568446438)
|
||||
d = md5gg(d, a, b, c, x[i + 14], 9, -1019803690)
|
||||
c = md5gg(c, d, a, b, x[i + 3], 14, -187363961)
|
||||
b = md5gg(b, c, d, a, x[i + 8], 20, 1163531501)
|
||||
a = md5gg(a, b, c, d, x[i + 13], 5, -1444681467)
|
||||
d = md5gg(d, a, b, c, x[i + 2], 9, -51403784)
|
||||
c = md5gg(c, d, a, b, x[i + 7], 14, 1735328473)
|
||||
b = md5gg(b, c, d, a, x[i + 12], 20, -1926607734)
|
||||
|
||||
a = md5hh(a, b, c, d, x[i + 5], 4, -378558)
|
||||
d = md5hh(d, a, b, c, x[i + 8], 11, -2022574463)
|
||||
c = md5hh(c, d, a, b, x[i + 11], 16, 1839030562)
|
||||
b = md5hh(b, c, d, a, x[i + 14], 23, -35309556)
|
||||
a = md5hh(a, b, c, d, x[i + 1], 4, -1530992060)
|
||||
d = md5hh(d, a, b, c, x[i + 4], 11, 1272893353)
|
||||
c = md5hh(c, d, a, b, x[i + 7], 16, -155497632)
|
||||
b = md5hh(b, c, d, a, x[i + 10], 23, -1094730640)
|
||||
a = md5hh(a, b, c, d, x[i + 13], 4, 681279174)
|
||||
d = md5hh(d, a, b, c, x[i], 11, -358537222)
|
||||
c = md5hh(c, d, a, b, x[i + 3], 16, -722521979)
|
||||
b = md5hh(b, c, d, a, x[i + 6], 23, 76029189)
|
||||
a = md5hh(a, b, c, d, x[i + 9], 4, -640364487)
|
||||
d = md5hh(d, a, b, c, x[i + 12], 11, -421815835)
|
||||
c = md5hh(c, d, a, b, x[i + 15], 16, 530742520)
|
||||
b = md5hh(b, c, d, a, x[i + 2], 23, -995338651)
|
||||
|
||||
a = md5ii(a, b, c, d, x[i], 6, -198630844)
|
||||
d = md5ii(d, a, b, c, x[i + 7], 10, 1126891415)
|
||||
c = md5ii(c, d, a, b, x[i + 14], 15, -1416354905)
|
||||
b = md5ii(b, c, d, a, x[i + 5], 21, -57434055)
|
||||
a = md5ii(a, b, c, d, x[i + 12], 6, 1700485571)
|
||||
d = md5ii(d, a, b, c, x[i + 3], 10, -1894986606)
|
||||
c = md5ii(c, d, a, b, x[i + 10], 15, -1051523)
|
||||
b = md5ii(b, c, d, a, x[i + 1], 21, -2054922799)
|
||||
a = md5ii(a, b, c, d, x[i + 8], 6, 1873313359)
|
||||
d = md5ii(d, a, b, c, x[i + 15], 10, -30611744)
|
||||
c = md5ii(c, d, a, b, x[i + 6], 15, -1560198380)
|
||||
b = md5ii(b, c, d, a, x[i + 13], 21, 1309151649)
|
||||
a = md5ii(a, b, c, d, x[i + 4], 6, -145523070)
|
||||
d = md5ii(d, a, b, c, x[i + 11], 10, -1120210379)
|
||||
c = md5ii(c, d, a, b, x[i + 2], 15, 718787259)
|
||||
b = md5ii(b, c, d, a, x[i + 9], 21, -343485551)
|
||||
|
||||
a = safeAdd(a, olda)
|
||||
b = safeAdd(b, oldb)
|
||||
c = safeAdd(c, oldc)
|
||||
d = safeAdd(d, oldd)
|
||||
}
|
||||
return [a, b, c, d]
|
||||
}
|
||||
/*
|
||||
* Convert an array of little-endian words to a string
|
||||
*/
|
||||
function binl2rstr(input) {
|
||||
var i
|
||||
var output = ''
|
||||
var length32 = input.length * 32
|
||||
for (i = 0; i < length32; i += 8) {
|
||||
output += String.fromCharCode((input[i >> 5] >>> (i % 32)) & 0xff)
|
||||
}
|
||||
return output
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Convert a raw string to an array of little-endian words
|
||||
* Characters >255 have their high-byte silently ignored.
|
||||
*/
|
||||
function rstr2binl(input) {
|
||||
var i
|
||||
var output = []
|
||||
output[(input.length >> 2) - 1] = undefined
|
||||
for (i = 0; i < output.length; i += 1) {
|
||||
output[i] = 0
|
||||
}
|
||||
var length8 = input.length * 8
|
||||
for (i = 0; i < length8; i += 8) {
|
||||
output[i >> 5] |= (input.charCodeAt(i / 8) & 0xff) << (i % 32)
|
||||
}
|
||||
return output
|
||||
}
|
||||
|
||||
|
||||
function encrypt_3(e) {
|
||||
return function (e) {
|
||||
if (Array.isArray(e)) return encrypt_3_3(e)
|
||||
}(e) || function (e) {
|
||||
if ("undefined" != typeof Symbol && Symbol.iterator in Object(e)) return Array.from(e)
|
||||
}(e) || function (e, t) {
|
||||
if (e) {
|
||||
if ("string" == typeof e) return encrypt_3_3(e, t);
|
||||
var n = Object.prototype.toString.call(e).slice(8, -1);
|
||||
return "Object" === n && e.constructor && (n = e.constructor.name), "Map" === n || "Set" === n ? Array.from(e) : "Arguments" === n || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n) ? encrypt_3_3(e, t) : void 0
|
||||
}
|
||||
}(e) || function () {
|
||||
throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")
|
||||
}()
|
||||
}
|
||||
|
||||
function encrypt_3_3(e, t) {
|
||||
(null == t || t > e.length) && (t = e.length);
|
||||
for (var n = 0, r = new Array(t); n < t; n++) r[n] = e[n];
|
||||
return r
|
||||
}
|
||||
|
||||
function rotateRight(n, x) {
|
||||
return ((x >>> n) | (x << (32 - n)));
|
||||
}
|
||||
|
||||
function choice(x, y, z) {
|
||||
return ((x & y) ^ (~x & z));
|
||||
}
|
||||
|
||||
function majority(x, y, z) {
|
||||
return ((x & y) ^ (x & z) ^ (y & z));
|
||||
}
|
||||
|
||||
function sha256_Sigma0(x) {
|
||||
return (rotateRight(2, x) ^ rotateRight(13, x) ^ rotateRight(22, x));
|
||||
}
|
||||
|
||||
function sha256_Sigma1(x) {
|
||||
return (rotateRight(6, x) ^ rotateRight(11, x) ^ rotateRight(25, x));
|
||||
}
|
||||
|
||||
function sha256_sigma0(x) {
|
||||
return (rotateRight(7, x) ^ rotateRight(18, x) ^ (x >>> 3));
|
||||
}
|
||||
|
||||
function sha256_sigma1(x) {
|
||||
return (rotateRight(17, x) ^ rotateRight(19, x) ^ (x >>> 10));
|
||||
}
|
||||
|
||||
function sha256_expand(W, j) {
|
||||
return (W[j & 0x0f] += sha256_sigma1(W[(j + 14) & 0x0f]) + W[(j + 9) & 0x0f] +
|
||||
sha256_sigma0(W[(j + 1) & 0x0f]));
|
||||
}
|
||||
|
||||
/* Hash constant words K: */
|
||||
var K256 = new Array(
|
||||
0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5,
|
||||
0x3956c25b, 0x59f111f1, 0x923f82a4, 0xab1c5ed5,
|
||||
0xd807aa98, 0x12835b01, 0x243185be, 0x550c7dc3,
|
||||
0x72be5d74, 0x80deb1fe, 0x9bdc06a7, 0xc19bf174,
|
||||
0xe49b69c1, 0xefbe4786, 0x0fc19dc6, 0x240ca1cc,
|
||||
0x2de92c6f, 0x4a7484aa, 0x5cb0a9dc, 0x76f988da,
|
||||
0x983e5152, 0xa831c66d, 0xb00327c8, 0xbf597fc7,
|
||||
0xc6e00bf3, 0xd5a79147, 0x06ca6351, 0x14292967,
|
||||
0x27b70a85, 0x2e1b2138, 0x4d2c6dfc, 0x53380d13,
|
||||
0x650a7354, 0x766a0abb, 0x81c2c92e, 0x92722c85,
|
||||
0xa2bfe8a1, 0xa81a664b, 0xc24b8b70, 0xc76c51a3,
|
||||
0xd192e819, 0xd6990624, 0xf40e3585, 0x106aa070,
|
||||
0x19a4c116, 0x1e376c08, 0x2748774c, 0x34b0bcb5,
|
||||
0x391c0cb3, 0x4ed8aa4a, 0x5b9cca4f, 0x682e6ff3,
|
||||
0x748f82ee, 0x78a5636f, 0x84c87814, 0x8cc70208,
|
||||
0x90befffa, 0xa4506ceb, 0xbef9a3f7, 0xc67178f2
|
||||
);
|
||||
|
||||
/* global arrays */
|
||||
var ihash, count, buffer;
|
||||
var sha256_hex_digits = "0123456789abcdef";
|
||||
|
||||
/* Add 32-bit integers with 16-bit operations (bug in some JS-interpreters:
|
||||
overflow) */
|
||||
function safe_add(x, y) {
|
||||
var lsw = (x & 0xffff) + (y & 0xffff);
|
||||
var msw = (x >> 16) + (y >> 16) + (lsw >> 16);
|
||||
return (msw << 16) | (lsw & 0xffff);
|
||||
}
|
||||
|
||||
/* Initialise the SHA256 computation */
|
||||
function sha256_init() {
|
||||
ihash = new Array(8);
|
||||
count = new Array(2);
|
||||
buffer = new Array(64);
|
||||
count[0] = count[1] = 0;
|
||||
ihash[0] = 0x6a09e667;
|
||||
ihash[1] = 0xbb67ae85;
|
||||
ihash[2] = 0x3c6ef372;
|
||||
ihash[3] = 0xa54ff53a;
|
||||
ihash[4] = 0x510e527f;
|
||||
ihash[5] = 0x9b05688c;
|
||||
ihash[6] = 0x1f83d9ab;
|
||||
ihash[7] = 0x5be0cd19;
|
||||
}
|
||||
|
||||
/* Transform a 512-bit message block */
|
||||
function sha256_transform() {
|
||||
var a, b, c, d, e, f, g, h, T1, T2;
|
||||
var W = new Array(16);
|
||||
|
||||
/* Initialize registers with the previous intermediate value */
|
||||
a = ihash[0];
|
||||
b = ihash[1];
|
||||
c = ihash[2];
|
||||
d = ihash[3];
|
||||
e = ihash[4];
|
||||
f = ihash[5];
|
||||
g = ihash[6];
|
||||
h = ihash[7];
|
||||
|
||||
/* make 32-bit words */
|
||||
for (var i = 0; i < 16; i++)
|
||||
W[i] = ((buffer[(i << 2) + 3]) | (buffer[(i << 2) + 2] << 8) | (buffer[(i << 2) + 1] <<
|
||||
16) | (buffer[i << 2] << 24));
|
||||
|
||||
for (var j = 0; j < 64; j++) {
|
||||
T1 = h + sha256_Sigma1(e) + choice(e, f, g) + K256[j];
|
||||
if (j < 16) T1 += W[j];
|
||||
else T1 += sha256_expand(W, j);
|
||||
T2 = sha256_Sigma0(a) + majority(a, b, c);
|
||||
h = g;
|
||||
g = f;
|
||||
f = e;
|
||||
e = safe_add(d, T1);
|
||||
d = c;
|
||||
c = b;
|
||||
b = a;
|
||||
a = safe_add(T1, T2);
|
||||
}
|
||||
|
||||
/* Compute the current intermediate hash value */
|
||||
ihash[0] += a;
|
||||
ihash[1] += b;
|
||||
ihash[2] += c;
|
||||
ihash[3] += d;
|
||||
ihash[4] += e;
|
||||
ihash[5] += f;
|
||||
ihash[6] += g;
|
||||
ihash[7] += h;
|
||||
}
|
||||
|
||||
/* Read the next chunk of data and update the SHA256 computation */
|
||||
function sha256_update(data, inputLen) {
|
||||
var i, index, curpos = 0;
|
||||
/* Compute number of bytes mod 64 */
|
||||
index = ((count[0] >> 3) & 0x3f);
|
||||
var remainder = (inputLen & 0x3f);
|
||||
|
||||
/* Update number of bits */
|
||||
if ((count[0] += (inputLen << 3)) < (inputLen << 3)) count[1]++;
|
||||
count[1] += (inputLen >> 29);
|
||||
|
||||
/* Transform as many times as possible */
|
||||
for (i = 0; i + 63 < inputLen; i += 64) {
|
||||
for (var j = index; j < 64; j++)
|
||||
buffer[j] = data.charCodeAt(curpos++);
|
||||
sha256_transform();
|
||||
index = 0;
|
||||
}
|
||||
|
||||
/* Buffer remaining input */
|
||||
for (var j = 0; j < remainder; j++)
|
||||
buffer[j] = data.charCodeAt(curpos++);
|
||||
}
|
||||
|
||||
/* Finish the computation by operations such as padding */
|
||||
function sha256_final() {
|
||||
var index = ((count[0] >> 3) & 0x3f);
|
||||
buffer[index++] = 0x80;
|
||||
if (index <= 56) {
|
||||
for (var i = index; i < 56; i++)
|
||||
buffer[i] = 0;
|
||||
} else {
|
||||
for (var i = index; i < 64; i++)
|
||||
buffer[i] = 0;
|
||||
sha256_transform();
|
||||
for (var i = 0; i < 56; i++)
|
||||
buffer[i] = 0;
|
||||
}
|
||||
buffer[56] = (count[1] >>> 24) & 0xff;
|
||||
buffer[57] = (count[1] >>> 16) & 0xff;
|
||||
buffer[58] = (count[1] >>> 8) & 0xff;
|
||||
buffer[59] = count[1] & 0xff;
|
||||
buffer[60] = (count[0] >>> 24) & 0xff;
|
||||
buffer[61] = (count[0] >>> 16) & 0xff;
|
||||
buffer[62] = (count[0] >>> 8) & 0xff;
|
||||
buffer[63] = count[0] & 0xff;
|
||||
sha256_transform();
|
||||
}
|
||||
|
||||
/* Split the internal hash values into an array of bytes */
|
||||
function sha256_encode_bytes() {
|
||||
var j = 0;
|
||||
var output = new Array(32);
|
||||
for (var i = 0; i < 8; i++) {
|
||||
output[j++] = ((ihash[i] >>> 24) & 0xff);
|
||||
output[j++] = ((ihash[i] >>> 16) & 0xff);
|
||||
output[j++] = ((ihash[i] >>> 8) & 0xff);
|
||||
output[j++] = (ihash[i] & 0xff);
|
||||
}
|
||||
return output;
|
||||
}
|
||||
|
||||
/* Get the internal hash as a hex string */
|
||||
function sha256_encode_hex() {
|
||||
var output = new String();
|
||||
for (var i = 0; i < 8; i++) {
|
||||
for (var j = 28; j >= 0; j -= 4)
|
||||
output += sha256_hex_digits.charAt((ihash[i] >>> j) & 0x0f);
|
||||
}
|
||||
return output;
|
||||
}
|
||||
let utils = {
|
||||
getDefaultVal: function (e) {
|
||||
try {
|
||||
return {
|
||||
undefined: "u",
|
||||
false: "f",
|
||||
true: "t"
|
||||
} [e] || e
|
||||
} catch (t) {
|
||||
return e
|
||||
}
|
||||
},
|
||||
requestUrl: {
|
||||
gettoken: "".concat("https://", "bh.m.jd.com/gettoken"),
|
||||
bypass: "".concat("https://blackhole", ".m.jd.com/bypass")
|
||||
},
|
||||
getTouchSession: function () {
|
||||
var e = (new Date).getTime(),
|
||||
t = this.getRandomInt(1e3, 9999);
|
||||
return String(e) + String(t)
|
||||
},
|
||||
sha256: function (data) {
|
||||
sha256_init();
|
||||
sha256_update(data, data.length);
|
||||
sha256_final();
|
||||
return sha256_encode_hex().toUpperCase();
|
||||
},
|
||||
atobPolyfill: function (e) {
|
||||
return function (e) {
|
||||
var t = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
|
||||
if (e = String(e).replace(/[\t\n\f\r ]+/g, ""), !/^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/.test(e)) throw new TypeError("解密错误");
|
||||
e += "==".slice(2 - (3 & e.length));
|
||||
for (var n, r, i, o = "", a = 0; a < e.length;) n = t.indexOf(e.charAt(a++)) << 18 | t.indexOf(e.charAt(a++)) << 12 | (r = t.indexOf(e.charAt(a++))) << 6 | (i = t.indexOf(e.charAt(a++))), o += 64 === r ? String.fromCharCode(n >> 16 & 255) : 64 === i ? String.fromCharCode(n >> 16 & 255, n >> 8 & 255) : String.fromCharCode(n >> 16 & 255, n >> 8 & 255, 255 & n);
|
||||
return o
|
||||
}(e)
|
||||
},
|
||||
btoaPolyfill: function (e) {
|
||||
var t = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
|
||||
return function (e) {
|
||||
for (var n, r, i, o, a = "", s = 0, u = (e = String(e)).length % 3; s < e.length;) {
|
||||
if ((r = e.charCodeAt(s++)) > 255 || (i = e.charCodeAt(s++)) > 255 || (o = e.charCodeAt(s++)) > 255) throw new TypeError("Failed to execute 'btoa' on 'Window': The string to be encoded contains characters outside of the Latin1 range.");
|
||||
a += t.charAt((n = r << 16 | i << 8 | o) >> 18 & 63) + t.charAt(n >> 12 & 63) + t.charAt(n >> 6 & 63) + t.charAt(63 & n)
|
||||
}
|
||||
return u ? a.slice(0, u - 3) + "===".substring(u) : a
|
||||
}(unescape(encodeURIComponent(e)))
|
||||
},
|
||||
xorEncrypt: function (e, t) {
|
||||
for (var n = t.length, r = "", i = 0; i < e.length; i++) r += String.fromCharCode(e[i].charCodeAt() ^ t[i % n].charCodeAt());
|
||||
return r
|
||||
},
|
||||
encrypt1: function (e, t) {
|
||||
for (var n = e.length, r = t.toString(), i = [], o = "", a = 0, s = 0; s < r.length; s++) a >= n && (a %= n), o = (r.charCodeAt(s) ^ e.charCodeAt(a)) % 10, i.push(o), a += 1;
|
||||
return i.join().replace(/,/g, "")
|
||||
},
|
||||
len_Fun: function (e, t) {
|
||||
return "".concat(e.substring(t, e.length)) + "".concat(e.substring(0, t))
|
||||
},
|
||||
encrypt2: function (e, t) {
|
||||
var n = t.toString(),
|
||||
r = t.toString().length,
|
||||
i = parseInt((r + e.length) / 3),
|
||||
o = "",
|
||||
a = "";
|
||||
return r > e.length ? (o = this.len_Fun(n, i), a = this.encrypt1(e, o)) : (o = this.len_Fun(e, i), a = this.encrypt1(n, o)), a
|
||||
},
|
||||
addZeroFront: function (e) {
|
||||
return e && e.length >= 5 ? e : ("00000" + String(e)).substr(-5)
|
||||
},
|
||||
addZeroBack: function (e) {
|
||||
return e && e.length >= 5 ? e : (String(e) + "00000").substr(0, 5)
|
||||
},
|
||||
encrypt3: function (e, t) {
|
||||
var n = this.addZeroBack(t).toString().substring(0, 5),
|
||||
r = this.addZeroFront(e).substring(e.length - 5),
|
||||
i = n.length,
|
||||
o = encrypt_3(Array(i).keys()),
|
||||
a = [];
|
||||
return o.forEach(function (e) {
|
||||
a.push(Math.abs(n.charCodeAt(e) - r.charCodeAt(e)))
|
||||
}), a.join().replace(/,/g, "")
|
||||
},
|
||||
getCurrentDate: function () {
|
||||
return new Date
|
||||
},
|
||||
getCurrentTime: function () {
|
||||
return this.getCurrentDate().getTime()
|
||||
},
|
||||
getRandomInt: function () {
|
||||
var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : 0,
|
||||
t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : 9;
|
||||
return e = Math.ceil(e), t = Math.floor(t), Math.floor(Math.random() * (t - e + 1)) + e
|
||||
},
|
||||
getRandomWord: function (e) {
|
||||
for (var t = "", n = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ", r = 0; r < e; r++) {
|
||||
var i = Math.round(Math.random() * (n.length - 1));
|
||||
t += n.substring(i, i + 1)
|
||||
}
|
||||
return t
|
||||
},
|
||||
getNumberInString: function (e) {
|
||||
return Number(e.replace(/[^0-9]/gi, ""))
|
||||
},
|
||||
getSpecialPosition: function (e) {
|
||||
for (var t = !(arguments.length > 1 && void 0 !== arguments[1]) || arguments[1], n = ((e = String(e)).length, t ? 1 : 0), r = "", i = 0; i < e.length; i++) i % 2 === n && (r += e[i]);
|
||||
return r
|
||||
},
|
||||
getLastAscii: function (e) {
|
||||
var t = e.charCodeAt(0).toString();
|
||||
return t[t.length - 1]
|
||||
},
|
||||
toAscii: function (e) {
|
||||
var t = "";
|
||||
for (var n in e) {
|
||||
var r = e[n],
|
||||
i = /[a-zA-Z]/.test(r);
|
||||
e.hasOwnProperty(n) && (t += i ? this.getLastAscii(r) : r)
|
||||
}
|
||||
return t
|
||||
},
|
||||
add0: function (e, t) {
|
||||
return (Array(t).join("0") + e).slice(-t)
|
||||
},
|
||||
minusByByte: function (e, t) {
|
||||
var n = e.length,
|
||||
r = t.length,
|
||||
i = Math.max(n, r),
|
||||
o = this.toAscii(e),
|
||||
a = this.toAscii(t),
|
||||
s = "",
|
||||
u = 0;
|
||||
for (n !== r && (o = this.add0(o, i), a = this.add0(a, i)); u < i;) s += Math.abs(o[u] - a[u]), u++;
|
||||
return s
|
||||
},
|
||||
Crc32: function (str) {
|
||||
var table = "00000000 77073096 EE0E612C 990951BA 076DC419 706AF48F E963A535 9E6495A3 0EDB8832 79DCB8A4 E0D5E91E 97D2D988 09B64C2B 7EB17CBD E7B82D07 90BF1D91 1DB71064 6AB020F2 F3B97148 84BE41DE 1ADAD47D 6DDDE4EB F4D4B551 83D385C7 136C9856 646BA8C0 FD62F97A 8A65C9EC 14015C4F 63066CD9 FA0F3D63 8D080DF5 3B6E20C8 4C69105E D56041E4 A2677172 3C03E4D1 4B04D447 D20D85FD A50AB56B 35B5A8FA 42B2986C DBBBC9D6 ACBCF940 32D86CE3 45DF5C75 DCD60DCF ABD13D59 26D930AC 51DE003A C8D75180 BFD06116 21B4F4B5 56B3C423 CFBA9599 B8BDA50F 2802B89E 5F058808 C60CD9B2 B10BE924 2F6F7C87 58684C11 C1611DAB B6662D3D 76DC4190 01DB7106 98D220BC EFD5102A 71B18589 06B6B51F 9FBFE4A5 E8B8D433 7807C9A2 0F00F934 9609A88E E10E9818 7F6A0DBB 086D3D2D 91646C97 E6635C01 6B6B51F4 1C6C6162 856530D8 F262004E 6C0695ED 1B01A57B 8208F4C1 F50FC457 65B0D9C6 12B7E950 8BBEB8EA FCB9887C 62DD1DDF 15DA2D49 8CD37CF3 FBD44C65 4DB26158 3AB551CE A3BC0074 D4BB30E2 4ADFA541 3DD895D7 A4D1C46D D3D6F4FB 4369E96A 346ED9FC AD678846 DA60B8D0 44042D73 33031DE5 AA0A4C5F DD0D7CC9 5005713C 270241AA BE0B1010 C90C2086 5768B525 206F85B3 B966D409 CE61E49F 5EDEF90E 29D9C998 B0D09822 C7D7A8B4 59B33D17 2EB40D81 B7BD5C3B C0BA6CAD EDB88320 9ABFB3B6 03B6E20C 74B1D29A EAD54739 9DD277AF 04DB2615 73DC1683 E3630B12 94643B84 0D6D6A3E 7A6A5AA8 E40ECF0B 9309FF9D 0A00AE27 7D079EB1 F00F9344 8708A3D2 1E01F268 6906C2FE F762575D 806567CB 196C3671 6E6B06E7 FED41B76 89D32BE0 10DA7A5A 67DD4ACC F9B9DF6F 8EBEEFF9 17B7BE43 60B08ED5 D6D6A3E8 A1D1937E 38D8C2C4 4FDFF252 D1BB67F1 A6BC5767 3FB506DD 48B2364B D80D2BDA AF0A1B4C 36034AF6 41047A60 DF60EFC3 A867DF55 316E8EEF 4669BE79 CB61B38C BC66831A 256FD2A0 5268E236 CC0C7795 BB0B4703 220216B9 5505262F C5BA3BBE B2BD0B28 2BB45A92 5CB36A04 C2D7FFA7 B5D0CF31 2CD99E8B 5BDEAE1D 9B64C2B0 EC63F226 756AA39C 026D930A 9C0906A9 EB0E363F 72076785 05005713 95BF4A82 E2B87A14 7BB12BAE 0CB61B38 92D28E9B E5D5BE0D 7CDCEFB7 0BDBDF21 86D3D2D4 F1D4E242 68DDB3F8 1FDA836E 81BE16CD F6B9265B 6FB077E1 18B74777 88085AE6 FF0F6A70 66063BCA 11010B5C 8F659EFF F862AE69 616BFFD3 166CCF45 A00AE278 D70DD2EE 4E048354 3903B3C2 A7672661 D06016F7 4969474D 3E6E77DB AED16A4A D9D65ADC 40DF0B66 37D83BF0 A9BCAE53 DEBB9EC5 47B2CF7F 30B5FFE9 BDBDF21C CABAC28A 53B39330 24B4A3A6 BAD03605 CDD70693 54DE5729 23D967BF B3667A2E C4614AB8 5D681B02 2A6F2B94 B40BBE37 C30C8EA1 5A05DF1B 2D02EF8D";
|
||||
crc = 0 ^ (-1);
|
||||
var n = 0; //a number between 0 and 255
|
||||
var x = 0; //an hex number
|
||||
|
||||
for (var i = 0, iTop = str.length; i < iTop; i++) {
|
||||
n = (crc ^ str.charCodeAt(i)) & 0xFF;
|
||||
x = "0x" + table.substr(n * 9, 8);
|
||||
crc = (crc >>> 8) ^ x;
|
||||
}
|
||||
return (crc ^ (-1)) >>> 0;
|
||||
},
|
||||
getCrcCode: function (e) {
|
||||
var t = "0000000",
|
||||
n = "";
|
||||
try {
|
||||
n = this.Crc32(e).toString(36), t = this.addZeroToSeven(n)
|
||||
} catch (e) {}
|
||||
return t
|
||||
},
|
||||
addZeroToSeven: function (e) {
|
||||
return e && e.length >= 7 ? e : ("0000000" + String(e)).substr(-7)
|
||||
},
|
||||
getInRange: function (e, t, n) {
|
||||
var r = [];
|
||||
return e.map(function (e, i) {
|
||||
e >= t && e <= n && r.push(e)
|
||||
}), r
|
||||
},
|
||||
RecursiveSorting: function () {
|
||||
var e = this,
|
||||
t = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {},
|
||||
n = {},
|
||||
r = t;
|
||||
if ("[object Object]" == Object.prototype.toString.call(r)) {
|
||||
var i = Object.keys(r).sort(function (e, t) {
|
||||
return e < t ? -1 : e > t ? 1 : 0
|
||||
});
|
||||
i.forEach(function (t) {
|
||||
var i = r[t];
|
||||
if ("[object Object]" === Object.prototype.toString.call(i)) {
|
||||
var o = e.RecursiveSorting(i);
|
||||
n[t] = o
|
||||
} else if ("[object Array]" === Object.prototype.toString.call(i)) {
|
||||
for (var a = [], s = 0; s < i.length; s++) {
|
||||
var u = i[s];
|
||||
if ("[object Object]" === Object.prototype.toString.call(u)) {
|
||||
var c = e.RecursiveSorting(u);
|
||||
a[s] = c
|
||||
} else a[s] = u
|
||||
}
|
||||
n[t] = a
|
||||
} else n[t] = i
|
||||
})
|
||||
} else n = t;
|
||||
return n
|
||||
},
|
||||
objToString2: function () {
|
||||
var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {},
|
||||
t = "";
|
||||
return Object.keys(e).forEach(function (n) {
|
||||
var r = e[n];
|
||||
null != r && (t += r instanceof Object || r instanceof Array ? "".concat("" === t ? "" : "&").concat(n, "=").concat(JSON.stringify(r)) : "".concat("" === t ? "" : "&").concat(n, "=").concat(r))
|
||||
}), t
|
||||
},
|
||||
getKey: function (e, t, n) {
|
||||
let r = this;
|
||||
return {
|
||||
1: function () {
|
||||
var e = r.getNumberInString(t),
|
||||
i = r.getSpecialPosition(n);
|
||||
return Math.abs(e - i)
|
||||
},
|
||||
2: function () {
|
||||
var e = r.getSpecialPosition(t, !1),
|
||||
i = r.getSpecialPosition(n);
|
||||
return r.minusByByte(e, i)
|
||||
},
|
||||
3: function () {
|
||||
var e = t.slice(0, 5),
|
||||
i = String(n).slice(-5);
|
||||
return r.minusByByte(e, i)
|
||||
},
|
||||
4: function () {
|
||||
return r.encrypt1(t, n)
|
||||
},
|
||||
5: function () {
|
||||
return r.encrypt2(t, n)
|
||||
},
|
||||
6: function () {
|
||||
return r.encrypt3(t, n)
|
||||
}
|
||||
} [e]()
|
||||
},
|
||||
decipherJoyToken: function (e, t) {
|
||||
let m = this;
|
||||
var n = {
|
||||
jjt: "a",
|
||||
expire: m.getCurrentTime(),
|
||||
outtime: 3,
|
||||
time_correction: !1
|
||||
};
|
||||
var r = "",
|
||||
i = e.indexOf(t) + t.length,
|
||||
o = e.length;
|
||||
if ((r = (r = e.slice(i, o).split(".")).map(function (e) {
|
||||
return m.atobPolyfill(e)
|
||||
}))[1] && r[0] && r[2]) {
|
||||
var a = r[0].slice(2, 7),
|
||||
s = r[0].slice(7, 9),
|
||||
u = m.xorEncrypt(r[1] || "", a).split("~");
|
||||
n.outtime = u[3] - 0, n.encrypt_id = u[2], n.jjt = "t";
|
||||
var c = u[0] - 0 || 0;
|
||||
c && "number" == typeof c && (n.time_correction = !0, n.expire = c);
|
||||
var l = c - m.getCurrentTime() || 0;
|
||||
return n.q = l, n.cf_v = s, n
|
||||
}
|
||||
return n
|
||||
},
|
||||
sha1: function (s) {
|
||||
var data = new Uint8Array(this.encodeUTF8(s))
|
||||
var i, j, t;
|
||||
var l = ((data.length + 8) >>> 6 << 4) + 16,
|
||||
s = new Uint8Array(l << 2);
|
||||
s.set(new Uint8Array(data.buffer)), s = new Uint32Array(s.buffer);
|
||||
for (t = new DataView(s.buffer), i = 0; i < l; i++) s[i] = t.getUint32(i << 2);
|
||||
s[data.length >> 2] |= 0x80 << (24 - (data.length & 3) * 8);
|
||||
s[l - 1] = data.length << 3;
|
||||
var w = [],
|
||||
f = [
|
||||
function () {
|
||||
return m[1] & m[2] | ~m[1] & m[3];
|
||||
},
|
||||
function () {
|
||||
return m[1] ^ m[2] ^ m[3];
|
||||
},
|
||||
function () {
|
||||
return m[1] & m[2] | m[1] & m[3] | m[2] & m[3];
|
||||
},
|
||||
function () {
|
||||
return m[1] ^ m[2] ^ m[3];
|
||||
}
|
||||
],
|
||||
rol = function (n, c) {
|
||||
return n << c | n >>> (32 - c);
|
||||
},
|
||||
k = [1518500249, 1859775393, -1894007588, -899497514],
|
||||
m = [1732584193, -271733879, null, null, -1009589776];
|
||||
m[2] = ~m[0], m[3] = ~m[1];
|
||||
for (var i = 0; i < s.length; i += 16) {
|
||||
var o = m.slice(0);
|
||||
for (j = 0; j < 80; j++)
|
||||
w[j] = j < 16 ? s[i + j] : rol(w[j - 3] ^ w[j - 8] ^ w[j - 14] ^ w[j - 16], 1),
|
||||
t = rol(m[0], 5) + f[j / 20 | 0]() + m[4] + w[j] + k[j / 20 | 0] | 0,
|
||||
m[1] = rol(m[1], 30), m.pop(), m.unshift(t);
|
||||
for (j = 0; j < 5; j++) m[j] = m[j] + o[j] | 0;
|
||||
};
|
||||
t = new DataView(new Uint32Array(m).buffer);
|
||||
for (var i = 0; i < 5; i++) m[i] = t.getUint32(i << 2);
|
||||
|
||||
var hex = Array.prototype.map.call(new Uint8Array(new Uint32Array(m).buffer), function (e) {
|
||||
return (e < 16 ? "0" : "") + e.toString(16);
|
||||
}).join("");
|
||||
return hex.toString().toUpperCase();
|
||||
},
|
||||
encodeUTF8: function (s) {
|
||||
var i, r = [],
|
||||
c, x;
|
||||
for (i = 0; i < s.length; i++)
|
||||
if ((c = s.charCodeAt(i)) < 0x80) r.push(c);
|
||||
else if (c < 0x800) r.push(0xC0 + (c >> 6 & 0x1F), 0x80 + (c & 0x3F));
|
||||
else {
|
||||
if ((x = c ^ 0xD800) >> 10 == 0) //对四字节UTF-16转换为Unicode
|
||||
c = (x << 10) + (s.charCodeAt(++i) ^ 0xDC00) + 0x10000,
|
||||
r.push(0xF0 + (c >> 18 & 0x7), 0x80 + (c >> 12 & 0x3F));
|
||||
else r.push(0xE0 + (c >> 12 & 0xF));
|
||||
r.push(0x80 + (c >> 6 & 0x3F), 0x80 + (c & 0x3F));
|
||||
};
|
||||
return r;
|
||||
},
|
||||
gettoken: function (UA) {
|
||||
const https = require('https');
|
||||
var body = `content={"appname":"50082","whwswswws":"","jdkey":"","body":{"platform":"1"}}`;
|
||||
return new Promise((resolve, reject) => {
|
||||
let options = {
|
||||
hostname: "bh.m.jd.com",
|
||||
port: 443,
|
||||
path: "/gettoken",
|
||||
method: "POST",
|
||||
rejectUnauthorized: false,
|
||||
headers: {
|
||||
"Content-Type": "text/plain;charset=UTF-8",
|
||||
"Host": "bh.m.jd.com",
|
||||
"Origin": "https://h5.m.jd.com",
|
||||
"X-Requested-With": "com.jingdong.app.mall",
|
||||
"Referer": "https://h5.m.jd.com/babelDiy/Zeus/41Lkp7DumXYCFmPYtU3LTcnTTXTX/index.html",
|
||||
"User-Agent": UA,
|
||||
}
|
||||
}
|
||||
const req = https.request(options, (res) => {
|
||||
res.setEncoding('utf-8');
|
||||
let rawData = '';
|
||||
res.on('error', reject);
|
||||
res.on('data', chunk => rawData += chunk);
|
||||
res.on('end', () => resolve(rawData));
|
||||
});
|
||||
req.write(body);
|
||||
req.on('error', reject);
|
||||
req.end();
|
||||
});
|
||||
},
|
||||
get_blog: function (pin) {
|
||||
let encrypefun = {
|
||||
"z": function (p1, p2) {
|
||||
var str = "";
|
||||
for (var vi = 0; vi < p1.length; vi++) {
|
||||
str += (p1.charCodeAt(vi) ^ p2.charCodeAt(vi % p2.length)).toString("16");
|
||||
}
|
||||
return str;
|
||||
},
|
||||
"y": function (p1, p2) {
|
||||
var str = "";
|
||||
for (var vi = 0; vi < p1.length; vi++) {
|
||||
str += (p1.charCodeAt(vi) & p2.charCodeAt(vi % p2.length)).toString("16");
|
||||
}
|
||||
return str;
|
||||
},
|
||||
"x": function (p1, p2) {
|
||||
p1 = p1.substring(1) + p1.substring(0, 1);
|
||||
p2 = p2.substring((p2.length - 1)) + p2.substring(0, (p2.length - 1));
|
||||
var str = "";
|
||||
for (var vi = 0; vi < p1.length; vi++) {
|
||||
str += (p1.charCodeAt(vi) ^ p2.charCodeAt(vi % p2.length)).toString("16");
|
||||
}
|
||||
return str;
|
||||
},
|
||||
"jiami": function (po, p1) {
|
||||
var str = "";
|
||||
for (vi = 0; vi < po.length; vi++) {
|
||||
str += String.fromCharCode(po.charCodeAt(vi) ^ p1.charCodeAt(vi % p1.length));
|
||||
}
|
||||
return new Buffer.from(str).toString('base64');
|
||||
}
|
||||
}
|
||||
const ids = ["x", "y", "z"];
|
||||
var encrypeid = ids[Math.floor(Math.random() * 1e8) % ids.length];
|
||||
var timestamp = this.getCurrentTime();
|
||||
var nonce_str = this.getRandomWord(10);
|
||||
var isDefaultKey = "B";
|
||||
refer = "com.miui.home";
|
||||
encrypeid = "x";
|
||||
var json = {
|
||||
r: refer,
|
||||
a: "",
|
||||
c: "a",
|
||||
v: "2.5.8",
|
||||
t: timestamp.toString().substring(timestamp.toString().length - 4)
|
||||
}
|
||||
var token = md5(pin);
|
||||
var key = encrypefun[encrypeid](timestamp.toString(), nonce_str);
|
||||
//console.log(key);
|
||||
var cipher = encrypefun["jiami"](JSON.stringify(json), key);
|
||||
return `${timestamp}~1${nonce_str+token}~${encrypeid}~~~${isDefaultKey}~${cipher}~${this.getCrcCode(cipher)}`;
|
||||
},
|
||||
get_risk_result: async function ($) {
|
||||
var appid = "50082";
|
||||
var TouchSession = this.getTouchSession();
|
||||
if (!$.joyytoken || $.joyytoken_count > 18) {
|
||||
$.joyytoken = JSON.parse(await this.gettoken($.UA))["joyytoken"];
|
||||
$.joyytoken_count = 0;
|
||||
}
|
||||
$.joyytoken_count++;
|
||||
let riskData;
|
||||
switch ($.action) {
|
||||
case 'startTask':
|
||||
riskData = {
|
||||
taskId: $.id
|
||||
};
|
||||
break;
|
||||
case 'chargeScores':
|
||||
riskData = {
|
||||
bubleId: $.id
|
||||
};
|
||||
break;
|
||||
case 'sign':
|
||||
riskData = {};
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
var random = Math.floor(1e+6 * Math.random()).toString().padEnd(6, '8');
|
||||
var senddata = this.objToString2(this.RecursiveSorting({
|
||||
pin: $.UserName,
|
||||
random,
|
||||
...riskData
|
||||
}));
|
||||
var time = this.getCurrentTime();
|
||||
var encrypt_id = this.decipherJoyToken(appid + $.joyytoken, appid)["encrypt_id"].split(",");
|
||||
var nonce_str = this.getRandomWord(10);
|
||||
var key = this.getKey(encrypt_id[2], nonce_str, time.toString());
|
||||
|
||||
var str1 = `${senddata}&token=${$.joyytoken}&time=${time}&nonce_str=${nonce_str}&key=${key}&is_trust=1`;
|
||||
str1 = this.sha1(str1);
|
||||
var outstr = [time, "1" + nonce_str + $.joyytoken, encrypt_id[2] + "," + encrypt_id[3]];
|
||||
outstr.push(str1);
|
||||
outstr.push(this.getCrcCode(str1));
|
||||
outstr.push("C");
|
||||
var data = {}
|
||||
data = {
|
||||
tm: [],
|
||||
tnm: [ 'd5-9L,JU,8DB,a,t', 'd7-9L,JU,8HF,a,t', 'd1-9M,JV,8JH,u,t' ],
|
||||
grn: $.joyytoken_count,
|
||||
ss: TouchSession,
|
||||
wed: 'ttttt',
|
||||
wea: 'ffttttua',
|
||||
pdn: [ 7, (Math.floor(Math.random() * 1e8) % 180) + 1, 6, 11, 1, 5 ],
|
||||
jj: 1,
|
||||
cs: hexMD5("Object.P.<computed>=&HTMLDocument.Ut.<computed>=https://storage.360buyimg.com/babel/00750963/1942873/production/dev/main.e5d1c436.js"),
|
||||
np: 'iPhone',
|
||||
t: time,
|
||||
jk: `${$.UUID}`,
|
||||
fpb: '',
|
||||
nv: 'Apple Computer, Inc.',
|
||||
nav: '167741',
|
||||
scr: [ 896, 414 ],
|
||||
ro: [
|
||||
'iPhone12,1',
|
||||
'iOS',
|
||||
'14.3',
|
||||
'10.0.10',
|
||||
'167741',
|
||||
`${$.UUID}`,
|
||||
'a'
|
||||
],
|
||||
ioa: 'fffffftt',
|
||||
aj: 'u',
|
||||
ci: 'w3.1.0',
|
||||
cf_v: '01',
|
||||
bd: senddata,
|
||||
mj: [1, 0, 0],
|
||||
blog: "a",
|
||||
msg: ''
|
||||
}
|
||||
data = new Buffer.from(this.xorEncrypt(JSON.stringify(data), key)).toString('base64');
|
||||
outstr.push(data);
|
||||
outstr.push(this.getCrcCode(data));
|
||||
return {
|
||||
extraData: {
|
||||
log: outstr.join("~"),
|
||||
sceneid: "DDhomePageh5"
|
||||
},
|
||||
...riskData,
|
||||
random,
|
||||
};
|
||||
}
|
||||
};
|
||||
module.exports = {
|
||||
utils
|
||||
}
|
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
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
File diff suppressed because one or more lines are too long
|
@ -0,0 +1,40 @@
|
|||
//'use strict';
|
||||
exports.main_handler = async (event, context, callback) => {
|
||||
try {
|
||||
const { TENCENTSCF_SOURCE_TYPE, TENCENTSCF_SOURCE_URL } = process.env
|
||||
//如果想在一个定时触发器里面执行多个js文件需要在定时触发器的【附加信息】里面填写对应的名称,用 & 链接
|
||||
//例如我想一个定时触发器里执行jd_speed.js和jd_bean_change.js,在定时触发器的【附加信息】里面就填写 jd_speed&jd_bean_change
|
||||
for (const v of event["Message"].split("&")) {
|
||||
console.log(v);
|
||||
var request = require('request');
|
||||
switch (TENCENTSCF_SOURCE_TYPE) {
|
||||
case 'local':
|
||||
//1.执行自己上传的js文件
|
||||
delete require.cache[require.resolve('./'+v+'.js')];
|
||||
require('./'+v+'.js')
|
||||
break;
|
||||
case 'git':
|
||||
//2.执行github远端的js文件(因github的raw类型的文件被墙,此方法云函数不推荐)
|
||||
request(`https://raw.githubusercontent.com/xxx/jd_scripts/master/${v}.js`, function (error, response, body) {
|
||||
eval(response.body)
|
||||
})
|
||||
break;
|
||||
case 'custom':
|
||||
//3.执行自定义远端js文件网址
|
||||
if (!TENCENTSCF_SOURCE_URL) return console.log('自定义模式需要设置TENCENTSCF_SOURCE_URL变量')
|
||||
request(`${TENCENTSCF_SOURCE_URL}${v}.js`, function (error, response, body) {
|
||||
eval(response.body)
|
||||
})
|
||||
break;
|
||||
default:
|
||||
//4.执行国内gitee远端的js文件(如果部署在国内节点,选择1或3。默认使用gitee的方式)
|
||||
request(`${v}.js`, function (error, response, body) {
|
||||
eval(response.body)
|
||||
})
|
||||
break;
|
||||
}
|
||||
}
|
||||
} catch (e) {
|
||||
console.error(e)
|
||||
}
|
||||
}
|
|
@ -0,0 +1,103 @@
|
|||
/*
|
||||
================================================================================
|
||||
魔改自 https://github.com/shufflewzc/faker2/blob/main/jdCookie.js
|
||||
修改内容:与task_before.sh配合,由task_before.sh设置要设置要做互助的活动的 ShareCodeConfigName 和 ShareCodeEnvName 环境变量,
|
||||
然后在这里实际解析/ql/log/.ShareCode中该活动对应的配置信息(由code.sh生成和维护),注入到nodejs的环境变量中
|
||||
修改原因:原先的task_before.sh直接将互助信息注入到shell的env中,在ck超过45以上时,互助码环境变量过大会导致调用一些系统命令
|
||||
(如date/cat)时报 Argument list too long,而在node中修改环境变量不会受这个限制,也不会影响外部shell环境,确保脚本可以正常运行
|
||||
魔改作者:风之凌殇
|
||||
================================================================================
|
||||
|
||||
此文件为Node.js专用。其他用户请忽略
|
||||
*/
|
||||
//此处填写京东账号cookie。
|
||||
let CookieJDs = [
|
||||
]
|
||||
// 判断环境变量里面是否有京东ck
|
||||
if (process.env.JD_COOKIE) {
|
||||
if (process.env.JD_COOKIE.indexOf('&') > -1) {
|
||||
CookieJDs = process.env.JD_COOKIE.split('&');
|
||||
} else if (process.env.JD_COOKIE.indexOf('\n') > -1) {
|
||||
CookieJDs = process.env.JD_COOKIE.split('\n');
|
||||
} else {
|
||||
CookieJDs = [process.env.JD_COOKIE];
|
||||
}
|
||||
}
|
||||
if (JSON.stringify(process.env).indexOf('GITHUB')>-1) {
|
||||
console.log(`请勿使用github action运行此脚本,无论你是从你自己的私库还是其他哪里拉取的源代码,都会导致我被封号\n`);
|
||||
!(async () => {
|
||||
await require('./sendNotify').sendNotify('提醒', `请勿使用github action、滥用github资源会封我仓库以及账号`)
|
||||
await process.exit(0);
|
||||
})()
|
||||
}
|
||||
CookieJDs = [...new Set(CookieJDs.filter(item => !!item))]
|
||||
console.log(`\n====================共${CookieJDs.length}个京东账号Cookie=========\n`);
|
||||
console.log(`==================脚本执行- 北京时间(UTC+8):${new Date(new Date().getTime() + new Date().getTimezoneOffset()*60*1000 + 8*60*60*1000).toLocaleString('zh', {hour12: false}).replace(' 24:',' 00:')}=====================\n`)
|
||||
if (process.env.JD_DEBUG && process.env.JD_DEBUG === 'false') console.log = () => {};
|
||||
for (let i = 0; i < CookieJDs.length; i++) {
|
||||
if (!CookieJDs[i].match(/pt_pin=(.+?);/) || !CookieJDs[i].match(/pt_key=(.+?);/)) console.log(`\n提示:京东cookie 【${CookieJDs[i]}】填写不规范,可能会影响部分脚本正常使用。正确格式为: pt_key=xxx;pt_pin=xxx;(分号;不可少)\n`);
|
||||
const index = (i + 1 === 1) ? '' : (i + 1);
|
||||
exports['CookieJD' + index] = CookieJDs[i].trim();
|
||||
}
|
||||
|
||||
// 以下为注入互助码环境变量(仅nodejs内起效)的代码
|
||||
function SetShareCodesEnv(nameChinese = "", nameConfig = "", envName = "") {
|
||||
let rawCodeConfig = {}
|
||||
|
||||
// 读取互助码
|
||||
shareCodeLogPath = `${process.env.QL_DIR}/log/.ShareCode/${nameConfig}.log`
|
||||
let fs = require('fs')
|
||||
if (fs.existsSync(shareCodeLogPath)) {
|
||||
// 因为faker2目前没有自带ini,改用已有的dotenv来解析
|
||||
// // 利用ini模块读取原始互助码和互助组信息
|
||||
// let ini = require('ini')
|
||||
// rawCodeConfig = ini.parse(fs.readFileSync(shareCodeLogPath, 'utf-8'))
|
||||
|
||||
// 使用env模块
|
||||
require('dotenv').config({path: shareCodeLogPath})
|
||||
rawCodeConfig = process.env
|
||||
}
|
||||
|
||||
// 解析每个用户的互助码
|
||||
codes = {}
|
||||
Object.keys(rawCodeConfig).forEach(function (key) {
|
||||
if (key.startsWith(`My${nameConfig}`)) {
|
||||
codes[key] = rawCodeConfig[key]
|
||||
}
|
||||
});
|
||||
|
||||
// 解析每个用户要帮助的互助码组,将用户实际的互助码填充进去
|
||||
let helpOtherCodes = {}
|
||||
Object.keys(rawCodeConfig).forEach(function (key) {
|
||||
if (key.startsWith(`ForOther${nameConfig}`)) {
|
||||
helpCode = rawCodeConfig[key]
|
||||
for (const [codeEnv, codeVal] of Object.entries(codes)) {
|
||||
helpCode = helpCode.replace("${" + codeEnv + "}", codeVal)
|
||||
}
|
||||
|
||||
helpOtherCodes[key] = helpCode
|
||||
}
|
||||
});
|
||||
|
||||
// 按顺序用&拼凑到一起,并放入环境变量,供目标脚本使用
|
||||
let shareCodes = []
|
||||
let totalCodeCount = Object.keys(helpOtherCodes).length
|
||||
for (let idx = 1; idx <= totalCodeCount; idx++) {
|
||||
shareCodes.push(helpOtherCodes[`ForOther${nameConfig}${idx}`])
|
||||
}
|
||||
let shareCodesStr = shareCodes.join('&')
|
||||
process.env[envName] = shareCodesStr
|
||||
|
||||
console.info(`${nameChinese} 的 互助码环境变量 ${envName},共计 ${totalCodeCount} 组互助码,总大小为 ${shareCodesStr.length} 字节`)
|
||||
}
|
||||
|
||||
// 若在task_before.sh 中设置了要设置互助码环境变量的活动名称和环境变量名称信息,则在nodejs中处理,供活动使用
|
||||
let nameChinese = process.env.ShareCodeConfigChineseName
|
||||
let nameConfig = process.env.ShareCodeConfigName
|
||||
let envName = process.env.ShareCodeEnvName
|
||||
if (nameChinese && nameConfig && envName) {
|
||||
SetShareCodesEnv(nameChinese, nameConfig, envName)
|
||||
} else {
|
||||
console.debug(`KingRan 频道通知:https://t.me/KingRan521\n`)
|
||||
console.debug(`云服务器IP须知:域名前缀为 'lzdz' 的禁用勿跑容易黑号\n`)
|
||||
}
|
|
@ -0,0 +1,35 @@
|
|||
/*
|
||||
京喜工厂互助码
|
||||
此文件为Node.js专用。其他用户请忽略
|
||||
支持京东N个账号
|
||||
*/
|
||||
//云服务器腾讯云函数等NOde.js用户在此处填写东东萌宠的好友码。
|
||||
// 同一个京东账号的好友互助码用@符号隔开,不同京东账号之间用&符号或者换行隔开,下面给一个示例
|
||||
// 如: 京东账号1的shareCode1@京东账号1的shareCode2&京东账号2的shareCode1@京东账号2的shareCode2
|
||||
let shareCodes = [
|
||||
'']
|
||||
|
||||
// 从日志获取互助码
|
||||
// const logShareCodes = require('./utils/jdShareCodes');
|
||||
// if (logShareCodes.DREAM_FACTORY_SHARE_CODES.length > 0 && !process.env.DREAM_FACTORY_SHARE_CODES) {
|
||||
// process.env.DREAM_FACTORY_SHARE_CODES = logShareCodes.DREAM_FACTORY_SHARE_CODES.join('&');
|
||||
// }
|
||||
|
||||
// 判断环境变量里面是否有京喜工厂互助码
|
||||
if (process.env.DREAM_FACTORY_SHARE_CODES) {
|
||||
if (process.env.DREAM_FACTORY_SHARE_CODES.indexOf('&') > -1) {
|
||||
console.log(`您的互助码选择的是用&隔开\n`)
|
||||
shareCodes = process.env.DREAM_FACTORY_SHARE_CODES.split('&');
|
||||
} else if (process.env.DREAM_FACTORY_SHARE_CODES.indexOf('\n') > -1) {
|
||||
console.log(`您的互助码选择的是用换行隔开\n`)
|
||||
shareCodes = process.env.DREAM_FACTORY_SHARE_CODES.split('\n');
|
||||
} else {
|
||||
shareCodes = process.env.DREAM_FACTORY_SHARE_CODES.split();
|
||||
}
|
||||
} else {
|
||||
console.log(`由于您环境变量(DREAM_FACTORY_SHARE_CODES)里面未提供助力码,故此处运行将会给脚本内置的码进行助力,请知晓!`)
|
||||
}
|
||||
for (let i = 0; i < shareCodes.length; i++) {
|
||||
const index = (i + 1 === 1) ? '' : (i + 1);
|
||||
exports['shareCodes' + index] = shareCodes[i];
|
||||
}
|
|
@ -0,0 +1,37 @@
|
|||
/*
|
||||
东东工厂互助码
|
||||
此文件为Node.js专用。其他用户请忽略
|
||||
支持京东N个账号
|
||||
*/
|
||||
//云服务器腾讯云函数等NOde.js用户在此处填写东东萌宠的好友码。
|
||||
// 同一个京东账号的好友互助码用@符号隔开,不同京东账号之间用&符号或者换行隔开,下面给一个示例
|
||||
// 如: 京东账号1的shareCode1@京东账号1的shareCode2&京东账号2的shareCode1@京东账号2的shareCode2
|
||||
let shareCodes = [
|
||||
'',//账号一的好友shareCode,不同好友中间用@符号隔开
|
||||
'',//账号二的好友shareCode,不同好友中间用@符号隔开
|
||||
]
|
||||
|
||||
// 从日志获取互助码
|
||||
// const logShareCodes = require('./utils/jdShareCodes');
|
||||
// if (logShareCodes.DDFACTORY_SHARECODES.length > 0 && !process.env.DDFACTORY_SHARECODES) {
|
||||
// process.env.DDFACTORY_SHARECODES = logShareCodes.DDFACTORY_SHARECODES.join('&');
|
||||
// }
|
||||
|
||||
// 判断环境变量里面是否有东东工厂互助码
|
||||
if (process.env.DDFACTORY_SHARECODES) {
|
||||
if (process.env.DDFACTORY_SHARECODES.indexOf('&') > -1) {
|
||||
console.log(`您的互助码选择的是用&隔开\n`)
|
||||
shareCodes = process.env.DDFACTORY_SHARECODES.split('&');
|
||||
} else if (process.env.DDFACTORY_SHARECODES.indexOf('\n') > -1) {
|
||||
console.log(`您的互助码选择的是用换行隔开\n`)
|
||||
shareCodes = process.env.DDFACTORY_SHARECODES.split('\n');
|
||||
} else {
|
||||
shareCodes = process.env.DDFACTORY_SHARECODES.split();
|
||||
}
|
||||
} else {
|
||||
console.log(`由于您环境变量(DDFACTORY_SHARECODES)里面未提供助力码,故此处运行将会给脚本内置的码进行助力,请知晓!`)
|
||||
}
|
||||
for (let i = 0; i < shareCodes.length; i++) {
|
||||
const index = (i + 1 === 1) ? '' : (i + 1);
|
||||
exports['shareCodes' + index] = shareCodes[i];
|
||||
}
|
|
@ -0,0 +1,35 @@
|
|||
/*
|
||||
东东农场互助码
|
||||
此文件为Node.js专用。其他用户请忽略
|
||||
支持京东N个账号
|
||||
*/
|
||||
//云服务器腾讯云函数等NOde.js用户在此处填写京东东农场的好友码。
|
||||
// 同一个京东账号的好友互助码用@符号隔开,不同京东账号之间用&符号或者换行隔开,下面给一个示例
|
||||
// 如: 京东账号1的shareCode1@京东账号1的shareCode2&京东账号2的shareCode1@京东账号2的shareCode2
|
||||
let FruitShareCodes = [
|
||||
'']
|
||||
|
||||
// 从日志获取互助码
|
||||
// const logShareCodes = require('./utils/jdShareCodes');
|
||||
// if (logShareCodes.FRUITSHARECODES.length > 0 && !process.env.FRUITSHARECODES) {
|
||||
// process.env.FRUITSHARECODES = logShareCodes.FRUITSHARECODES.join('&');
|
||||
// }
|
||||
|
||||
// 判断github action里面是否有东东农场互助码
|
||||
if (process.env.FRUITSHARECODES) {
|
||||
if (process.env.FRUITSHARECODES.indexOf('&') > -1) {
|
||||
console.log(`您的东东农场互助码选择的是用&隔开\n`)
|
||||
FruitShareCodes = process.env.FRUITSHARECODES.split('&');
|
||||
} else if (process.env.FRUITSHARECODES.indexOf('\n') > -1) {
|
||||
console.log(`您的东东农场互助码选择的是用换行隔开\n`)
|
||||
FruitShareCodes = process.env.FRUITSHARECODES.split('\n');
|
||||
} else {
|
||||
FruitShareCodes = process.env.FRUITSHARECODES.split();
|
||||
}
|
||||
} else {
|
||||
console.log(`由于您环境变量(FRUITSHARECODES)里面未提供助力码,故此处运行将会给脚本内置的码进行助力,请知晓!`)
|
||||
}
|
||||
for (let i = 0; i < FruitShareCodes.length; i++) {
|
||||
const index = (i + 1 === 1) ? '' : (i + 1);
|
||||
exports['FruitShareCode' + index] = FruitShareCodes[i];
|
||||
}
|
|
@ -0,0 +1,37 @@
|
|||
/*
|
||||
京喜农场助力码
|
||||
此助力码要求种子 active 相同才能助力,多个账号的话可以种植同样的种子,如果种子不同的话,会自动跳过使用云端助力
|
||||
此文件为Node.js专用。其他用户请忽略
|
||||
支持京东N个账号
|
||||
*/
|
||||
//云服务器腾讯云函数等NOde.js用户在此处填写京京喜农场的好友码。
|
||||
// 同一个京东账号的好友助力码用@符号隔开,不同京东账号之间用&符号或者换行隔开,下面给一个示例
|
||||
// 如: 京东账号1的shareCode1@京东账号1的shareCode2&京东账号2的shareCode1@京东账号2的shareCode2
|
||||
// 注意:京喜农场 种植种子发生变化的时候,互助码也会变!!
|
||||
// 注意:京喜农场 种植种子发生变化的时候,互助码也会变!!
|
||||
// 注意:京喜农场 种植种子发生变化的时候,互助码也会变!!
|
||||
// 每个账号 shareCdoe 是一个 json,示例如下
|
||||
// {"smp":"22bdadsfaadsfadse8a","active":"jdnc_1_btorange210113_2","joinnum":"1"}
|
||||
let JxncShareCodes = [
|
||||
'',//账号一的好友shareCode,不同好友中间用@符号隔开
|
||||
'',//账号二的好友shareCode,不同好友中间用@符号隔开
|
||||
]
|
||||
// 判断github action里面是否有京喜农场助力码
|
||||
if (process.env.JXNC_SHARECODES) {
|
||||
if (process.env.JXNC_SHARECODES.indexOf('&') > -1) {
|
||||
console.log(`您的京喜农场助力码选择的是用&隔开\n`)
|
||||
JxncShareCodes = process.env.JXNC_SHARECODES.split('&');
|
||||
} else if (process.env.JXNC_SHARECODES.indexOf('\n') > -1) {
|
||||
console.log(`您的京喜农场助力码选择的是用换行隔开\n`)
|
||||
JxncShareCodes = process.env.JXNC_SHARECODES.split('\n');
|
||||
} else {
|
||||
JxncShareCodes = process.env.JXNC_SHARECODES.split();
|
||||
}
|
||||
} else {
|
||||
console.log(`由于您环境变量里面(JXNC_SHARECODES)未提供助力码,故此处运行将会给脚本内置的码进行助力,请知晓!`)
|
||||
}
|
||||
JxncShareCodes = JxncShareCodes.filter(item => !!item);
|
||||
for (let i = 0; i < JxncShareCodes.length; i++) {
|
||||
const index = (i + 1 === 1) ? '' : (i + 1);
|
||||
exports['JxncShareCode' + index] = JxncShareCodes[i];
|
||||
}
|
|
@ -0,0 +1,35 @@
|
|||
/*
|
||||
东东萌宠互助码
|
||||
此文件为Node.js专用。其他用户请忽略
|
||||
支持京东N个账号
|
||||
*/
|
||||
//云服务器腾讯云函数等NOde.js用户在此处填写东东萌宠的好友码。
|
||||
// 同一个京东账号的好友互助码用@符号隔开,不同京东账号之间用&符号或者换行隔开,下面给一个示例
|
||||
// 如: 京东账号1的shareCode1@京东账号1的shareCode2&京东账号2的shareCode1@京东账号2的shareCode2
|
||||
let PetShareCodes = [
|
||||
'']
|
||||
|
||||
// 从日志获取互助码
|
||||
// const logShareCodes = require('./utils/jdShareCodes');
|
||||
// if (logShareCodes.PETSHARECODES.length > 0 && !process.env.PETSHARECODES) {
|
||||
// process.env.PETSHARECODES = logShareCodes.PETSHARECODES.join('&');
|
||||
// }
|
||||
|
||||
// 判断github action里面是否有东东萌宠互助码
|
||||
if (process.env.PETSHARECODES) {
|
||||
if (process.env.PETSHARECODES.indexOf('&') > -1) {
|
||||
console.log(`您的东东萌宠互助码选择的是用&隔开\n`)
|
||||
PetShareCodes = process.env.PETSHARECODES.split('&');
|
||||
} else if (process.env.PETSHARECODES.indexOf('\n') > -1) {
|
||||
console.log(`您的东东萌宠互助码选择的是用换行隔开\n`)
|
||||
PetShareCodes = process.env.PETSHARECODES.split('\n');
|
||||
} else {
|
||||
PetShareCodes = process.env.PETSHARECODES.split();
|
||||
}
|
||||
} else {
|
||||
console.log(`由于您环境变量(PETSHARECODES)里面未提供助力码,故此处运行将会给脚本内置的码进行助力,请知晓!`)
|
||||
}
|
||||
for (let i = 0; i < PetShareCodes.length; i++) {
|
||||
const index = (i + 1 === 1) ? '' : (i + 1);
|
||||
exports['PetShareCode' + index] = PetShareCodes[i];
|
||||
}
|
|
@ -0,0 +1,35 @@
|
|||
/*
|
||||
京东种豆得豆互助码
|
||||
此文件为Node.js专用。其他用户请忽略
|
||||
支持京东N个账号
|
||||
*/
|
||||
//云服务器腾讯云函数等NOde.js用户在此处填写东东萌宠的好友码。
|
||||
// 同一个京东账号的好友互助码用@符号隔开,不同京东账号之间用&符号或者换行隔开,下面给一个示例
|
||||
// 如: 京东账号1的shareCode1@京东账号1的shareCode2&京东账号2的shareCode1@京东账号2的shareCode2
|
||||
let PlantBeanShareCodes = [
|
||||
'']
|
||||
|
||||
// 从日志获取互助码
|
||||
// const logShareCodes = require('./utils/jdShareCodes');
|
||||
// if (logShareCodes.PLANT_BEAN_SHARECODES.length > 0 && !process.env.PLANT_BEAN_SHARECODES) {
|
||||
// process.env.PLANT_BEAN_SHARECODES = logShareCodes.PLANT_BEAN_SHARECODES.join('&');
|
||||
// }
|
||||
|
||||
// 判断github action里面是否有种豆得豆互助码
|
||||
if (process.env.PLANT_BEAN_SHARECODES) {
|
||||
if (process.env.PLANT_BEAN_SHARECODES.indexOf('&') > -1) {
|
||||
console.log(`您的种豆互助码选择的是用&隔开\n`)
|
||||
PlantBeanShareCodes = process.env.PLANT_BEAN_SHARECODES.split('&');
|
||||
} else if (process.env.PLANT_BEAN_SHARECODES.indexOf('\n') > -1) {
|
||||
console.log(`您的种豆互助码选择的是用换行隔开\n`)
|
||||
PlantBeanShareCodes = process.env.PLANT_BEAN_SHARECODES.split('\n');
|
||||
} else {
|
||||
PlantBeanShareCodes = process.env.PLANT_BEAN_SHARECODES.split();
|
||||
}
|
||||
} else {
|
||||
console.log(`由于您环境变量(PLANT_BEAN_SHARECODES)里面未提供助力码,故此处运行将会给脚本内置的码进行助力,请知晓!`)
|
||||
}
|
||||
for (let i = 0; i < PlantBeanShareCodes.length; i++) {
|
||||
const index = (i + 1 === 1) ? '' : (i + 1);
|
||||
exports['PlantBeanShareCodes' + index] = PlantBeanShareCodes[i];
|
||||
}
|
File diff suppressed because one or more lines are too long
|
@ -0,0 +1,975 @@
|
|||
/*
|
||||
cron "30 2-22/2 * * *" jd_CheckCK.js, tag:京东CK检测by-ccwav
|
||||
*/
|
||||
//详细说明参考 https://github.com/ccwav/QLScript2.
|
||||
const $ = new Env('京东CK检测');
|
||||
const notify = $.isNode() ? require('./sendNotify') : '';
|
||||
//Node.js用户请在jdCookie.js处填写京东ck;
|
||||
const jdCookieNode = $.isNode() ? require('./jdCookie.js') : '';
|
||||
const got = require('got');
|
||||
const {
|
||||
getEnvs,
|
||||
getEnvById,
|
||||
DisableCk,
|
||||
EnableCk,
|
||||
getstatus
|
||||
} = require('./ql');
|
||||
const api = got.extend({
|
||||
retry: {
|
||||
limit: 0
|
||||
},
|
||||
responseType: 'json',
|
||||
});
|
||||
|
||||
let ShowSuccess = "false",
|
||||
CKAlwaysNotify = "false",
|
||||
CKAutoEnable = "true",
|
||||
NoWarnError = "false";
|
||||
|
||||
let MessageUserGp2 = "";
|
||||
let MessageUserGp3 = "";
|
||||
let MessageUserGp4 = "";
|
||||
|
||||
let MessageGp2 = "";
|
||||
let MessageGp3 = "";
|
||||
let MessageGp4 = "";
|
||||
let MessageAll = "";
|
||||
|
||||
let userIndex2 = -1;
|
||||
let userIndex3 = -1;
|
||||
let userIndex4 = -1;
|
||||
|
||||
let IndexGp2 = 0;
|
||||
let IndexGp3 = 0;
|
||||
let IndexGp4 = 0;
|
||||
let IndexAll = 0;
|
||||
|
||||
let TempErrorMessage = '',
|
||||
TempSuccessMessage = '',
|
||||
TempDisableMessage = '',
|
||||
TempEnableMessage = '',
|
||||
TempOErrorMessage = '';
|
||||
|
||||
let allMessage = '',
|
||||
ErrorMessage = '',
|
||||
SuccessMessage = '',
|
||||
DisableMessage = '',
|
||||
EnableMessage = '',
|
||||
OErrorMessage = '';
|
||||
|
||||
let allMessageGp2 = '',
|
||||
ErrorMessageGp2 = '',
|
||||
SuccessMessageGp2 = '',
|
||||
DisableMessageGp2 = '',
|
||||
EnableMessageGp2 = '',
|
||||
OErrorMessageGp2 = '';
|
||||
|
||||
let allMessageGp3 = '',
|
||||
ErrorMessageGp3 = '',
|
||||
SuccessMessageGp3 = '',
|
||||
DisableMessageGp3 = '',
|
||||
EnableMessageGp3 = '',
|
||||
OErrorMessageGp3 = '';
|
||||
|
||||
let allMessageGp4 = '',
|
||||
ErrorMessageGp4 = '',
|
||||
SuccessMessageGp4 = '',
|
||||
DisableMessageGp4 = '',
|
||||
EnableMessageGp4 = '',
|
||||
OErrorMessageGp4 = '';
|
||||
|
||||
let strAllNotify = "";
|
||||
let strNotifyOneTemp = "";
|
||||
let WP_APP_TOKEN_ONE = "";
|
||||
if ($.isNode() && process.env.WP_APP_TOKEN_ONE) {
|
||||
WP_APP_TOKEN_ONE = process.env.WP_APP_TOKEN_ONE;
|
||||
}
|
||||
|
||||
let ReturnMessageTitle = '';
|
||||
|
||||
if ($.isNode() && process.env.BEANCHANGE_USERGP2) {
|
||||
MessageUserGp2 = process.env.BEANCHANGE_USERGP2 ? process.env.BEANCHANGE_USERGP2.split('&') : [];
|
||||
console.log(`检测到设定了分组推送2`);
|
||||
}
|
||||
|
||||
if ($.isNode() && process.env.BEANCHANGE_USERGP3) {
|
||||
MessageUserGp3 = process.env.BEANCHANGE_USERGP3 ? process.env.BEANCHANGE_USERGP3.split('&') : [];
|
||||
console.log(`检测到设定了分组推送3`);
|
||||
}
|
||||
|
||||
if ($.isNode() && process.env.BEANCHANGE_USERGP4) {
|
||||
MessageUserGp4 = process.env.BEANCHANGE_USERGP4 ? process.env.BEANCHANGE_USERGP4.split('&') : [];
|
||||
console.log(`检测到设定了分组推送4`);
|
||||
}
|
||||
|
||||
if ($.isNode() && process.env.CHECKCK_SHOWSUCCESSCK) {
|
||||
ShowSuccess = process.env.CHECKCK_SHOWSUCCESSCK;
|
||||
}
|
||||
if ($.isNode() && process.env.CHECKCK_CKALWAYSNOTIFY) {
|
||||
CKAlwaysNotify = process.env.CHECKCK_CKALWAYSNOTIFY;
|
||||
}
|
||||
if ($.isNode() && process.env.CHECKCK_CKAUTOENABLE) {
|
||||
CKAutoEnable = process.env.CHECKCK_CKAUTOENABLE;
|
||||
}
|
||||
if ($.isNode() && process.env.CHECKCK_CKNOWARNERROR) {
|
||||
NoWarnError = process.env.CHECKCK_CKNOWARNERROR;
|
||||
}
|
||||
|
||||
if ($.isNode() && process.env.CHECKCK_ALLNOTIFY) {
|
||||
|
||||
strAllNotify = process.env.CHECKCK_ALLNOTIFY;
|
||||
/* if (strTempNotify.length > 0) {
|
||||
for (var TempNotifyl in strTempNotify) {
|
||||
strAllNotify += strTempNotify[TempNotifyl] + '\n';
|
||||
}
|
||||
} */
|
||||
console.log(`检测到设定了温馨提示,将在推送信息中置顶显示...`);
|
||||
strAllNotify = `\n【✨✨✨✨温馨提示✨✨✨✨】\n` + strAllNotify;
|
||||
console.log(strAllNotify);
|
||||
}
|
||||
|
||||
!(async() => {
|
||||
const envs = await getEnvs();
|
||||
if (!envs[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;
|
||||
}
|
||||
|
||||
for (let i = 0; i < envs.length; i++) {
|
||||
if (envs[i].value) {
|
||||
var tempid=0;
|
||||
if(envs[i]._id){
|
||||
tempid=envs[i]._id;
|
||||
}
|
||||
if(envs[i].id){
|
||||
tempid=envs[i].id;
|
||||
}
|
||||
cookie = await getEnvById(tempid);
|
||||
$.UserName = (cookie.match(/pt_pin=([^; ]+)(?=;?)/) && cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1])
|
||||
$.UserName2 = decodeURIComponent($.UserName);
|
||||
$.index = i + 1;
|
||||
$.isLogin = true;
|
||||
$.error = '';
|
||||
$.NoReturn = '';
|
||||
$.nickName = "";
|
||||
TempErrorMessage = '';
|
||||
TempSuccessMessage = '';
|
||||
TempDisableMessage = '';
|
||||
TempEnableMessage = '';
|
||||
TempOErrorMessage = '';
|
||||
|
||||
console.log(`开始检测【京东账号${$.index}】${$.UserName2} ....\n`);
|
||||
if (MessageUserGp4) {
|
||||
userIndex4 = MessageUserGp4.findIndex((item) => item === $.UserName);
|
||||
}
|
||||
if (MessageUserGp2) {
|
||||
|
||||
userIndex2 = MessageUserGp2.findIndex((item) => item === $.UserName);
|
||||
}
|
||||
if (MessageUserGp3) {
|
||||
|
||||
userIndex3 = MessageUserGp3.findIndex((item) => item === $.UserName);
|
||||
}
|
||||
|
||||
if (userIndex2 != -1) {
|
||||
console.log(`账号属于分组2`);
|
||||
IndexGp2 += 1;
|
||||
ReturnMessageTitle = `【账号${IndexGp2}🆔】${$.UserName2}`;
|
||||
}
|
||||
if (userIndex3 != -1) {
|
||||
console.log(`账号属于分组3`);
|
||||
IndexGp3 += 1;
|
||||
ReturnMessageTitle = `【账号${IndexGp3}🆔】${$.UserName2}`;
|
||||
}
|
||||
if (userIndex4 != -1) {
|
||||
console.log(`账号属于分组4`);
|
||||
IndexGp4 += 1;
|
||||
ReturnMessageTitle = `【账号${IndexGp4}🆔】${$.UserName2}`;
|
||||
}
|
||||
if (userIndex4 == -1 && userIndex2 == -1 && userIndex3 == -1) {
|
||||
console.log(`账号没有分组`);
|
||||
IndexAll += 1;
|
||||
ReturnMessageTitle = `【账号${IndexAll}🆔】${$.UserName2}`;
|
||||
}
|
||||
|
||||
// await TotalBean();
|
||||
if ($.NoReturn) {
|
||||
console.log(`接口1检测失败,尝试使用接口2....\n`);
|
||||
await isLoginByX1a0He();
|
||||
} else {
|
||||
if ($.isLogin) {
|
||||
if (!$.nickName) {
|
||||
console.log(`获取的别名为空,尝试使用接口2验证....\n`);
|
||||
await isLoginByX1a0He();
|
||||
} else {
|
||||
console.log(`成功获取到别名: ${$.nickName},Pass!\n`);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ($.error) {
|
||||
console.log(`有错误,跳出....`);
|
||||
TempOErrorMessage = $.error;
|
||||
|
||||
} else {
|
||||
const strnowstatus = await getstatus(tempid);
|
||||
if (strnowstatus == 99) {
|
||||
strnowstatus = envs[i].status;
|
||||
}
|
||||
if (!$.isLogin) {
|
||||
|
||||
if (strnowstatus == 0) {
|
||||
const DisableCkBody = await DisableCk(tempid);
|
||||
if (DisableCkBody.code == 200) {
|
||||
if ($.isNode() && WP_APP_TOKEN_ONE) {
|
||||
strNotifyOneTemp = `京东账号: ${$.nickName || $.UserName2} 已失效,自动禁用成功!\n如果要继续挂机,请联系管理员重新登录账号.`
|
||||
|
||||
if (strAllNotify)
|
||||
strNotifyOneTemp += `\n` + strAllNotify;
|
||||
|
||||
await notify.sendNotifybyWxPucher(`${$.name}`, strNotifyOneTemp, `${$.UserName2}`,'\n\n本通知 By ccwav Mod',`账号过期通知`);
|
||||
}
|
||||
console.log(`京东账号${$.index} : ${$.nickName || $.UserName2} 已失效,自动禁用成功!\n`);
|
||||
TempDisableMessage = ReturnMessageTitle + ` (自动禁用成功!)\n`;
|
||||
TempErrorMessage = ReturnMessageTitle + ` 已失效,自动禁用成功!\n`;
|
||||
} else {
|
||||
if ($.isNode() && WP_APP_TOKEN_ONE) {
|
||||
strNotifyOneTemp = `京东账号: ${$.nickName || $.UserName2} 已失效!\n如果要继续挂机,请联系管理员重新登录账号.`
|
||||
|
||||
if (strAllNotify)
|
||||
strNotifyOneTemp += `\n` + strAllNotify;
|
||||
|
||||
await notify.sendNotifybyWxPucher(`${$.name}`, strNotifyOneTemp, `${$.UserName2}`,'\n\n本通知 By ccwav Mod',`账号过期通知`);
|
||||
}
|
||||
console.log(`京东账号${$.index} : ${$.nickName || $.UserName2} 已失效,自动禁用失败!\n`);
|
||||
TempDisableMessage = ReturnMessageTitle + ` (自动禁用失败!)\n`;
|
||||
TempErrorMessage = ReturnMessageTitle + ` 已失效,自动禁用失败!\n`;
|
||||
}
|
||||
} else {
|
||||
console.log(`京东账号${$.index} : ${$.nickName || $.UserName2} 已失效,已禁用!\n`);
|
||||
TempErrorMessage = ReturnMessageTitle + ` 已失效,已禁用.\n`;
|
||||
}
|
||||
} else {
|
||||
if (strnowstatus == 1) {
|
||||
|
||||
if (CKAutoEnable == "true") {
|
||||
const EnableCkBody = await EnableCk(tempid);
|
||||
if (EnableCkBody.code == 200) {
|
||||
if ($.isNode() && WP_APP_TOKEN_ONE) {
|
||||
await notify.sendNotifybyWxPucher(`${$.name}`, `京东账号: ${$.nickName || $.UserName2} 已恢复,自动启用成功!\n祝您挂机愉快...`, `${$.UserName2}`,'\n\n本通知 By ccwav Mod',`账号上线通知`);
|
||||
}
|
||||
console.log(`京东账号${$.index} : ${$.nickName || $.UserName2} 已恢复,自动启用成功!\n`);
|
||||
TempEnableMessage = ReturnMessageTitle + ` (自动启用成功!)\n`;
|
||||
TempSuccessMessage = ReturnMessageTitle + ` (自动启用成功!)\n`;
|
||||
} else {
|
||||
if ($.isNode() && WP_APP_TOKEN_ONE) {
|
||||
await notify.sendNotifybyWxPucher(`${$.name}`, `京东账号: ${$.nickName || $.UserName2} 已恢复,但自动启用失败!\n请联系管理员处理...`, `${$.UserName2}`,'\n\n本通知 By ccwav Mod',`账号上线失败通知`);
|
||||
}
|
||||
console.log(`京东账号${$.index} : ${$.nickName || $.UserName2} 已恢复,但自动启用失败!\n`);
|
||||
TempEnableMessage = ReturnMessageTitle + ` (自动启用失败!)\n`;
|
||||
}
|
||||
} else {
|
||||
console.log(`京东账号${$.index} : ${$.nickName || $.UserName2} 已恢复,可手动启用!\n`);
|
||||
TempEnableMessage = ReturnMessageTitle + ` 已恢复,可手动启用.\n`;
|
||||
}
|
||||
} else {
|
||||
console.log(`京东账号${$.index} : ${$.nickName || $.UserName2} 状态正常!\n`);
|
||||
TempSuccessMessage = ReturnMessageTitle + `\n`;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (userIndex2 != -1) {
|
||||
ErrorMessageGp2 += TempErrorMessage;
|
||||
SuccessMessageGp2 += TempSuccessMessage;
|
||||
DisableMessageGp2 += TempDisableMessage;
|
||||
EnableMessageGp2 += TempEnableMessage;
|
||||
OErrorMessageGp2 += TempOErrorMessage;
|
||||
}
|
||||
if (userIndex3 != -1) {
|
||||
ErrorMessageGp3 += TempErrorMessage;
|
||||
SuccessMessageGp3 += TempSuccessMessage;
|
||||
DisableMessageGp3 += TempDisableMessage;
|
||||
EnableMessageGp3 += TempEnableMessage;
|
||||
OErrorMessageGp3 += TempOErrorMessage;
|
||||
}
|
||||
if (userIndex4 != -1) {
|
||||
ErrorMessageGp4 += TempErrorMessage;
|
||||
SuccessMessageGp4 += TempSuccessMessage;
|
||||
DisableMessageGp4 += TempDisableMessage;
|
||||
EnableMessageGp4 += TempEnableMessage;
|
||||
OErrorMessageGp4 += TempOErrorMessage;
|
||||
}
|
||||
|
||||
if (userIndex4 == -1 && userIndex2 == -1 && userIndex3 == -1) {
|
||||
ErrorMessage += TempErrorMessage;
|
||||
SuccessMessage += TempSuccessMessage;
|
||||
DisableMessage += TempDisableMessage;
|
||||
EnableMessage += TempEnableMessage;
|
||||
OErrorMessage += TempOErrorMessage;
|
||||
}
|
||||
|
||||
}
|
||||
console.log(`等待2秒....... \n`);
|
||||
await $.wait(2 * 1000)
|
||||
}
|
||||
|
||||
if ($.isNode()) {
|
||||
if (MessageUserGp2) {
|
||||
if (OErrorMessageGp2) {
|
||||
allMessageGp2 += `👇👇👇👇👇检测出错账号👇👇👇👇👇\n` + OErrorMessageGp2 + `\n\n`;
|
||||
}
|
||||
if (DisableMessageGp2) {
|
||||
allMessageGp2 += `👇👇👇👇👇自动禁用账号👇👇👇👇👇\n` + DisableMessageGp2 + `\n\n`;
|
||||
}
|
||||
if (EnableMessageGp2) {
|
||||
if (CKAutoEnable == "true") {
|
||||
allMessageGp2 += `👇👇👇👇👇自动启用账号👇👇👇👇👇\n` + EnableMessageGp2 + `\n\n`;
|
||||
} else {
|
||||
allMessageGp2 += `👇👇👇👇👇账号已恢复👇👇👇👇👇\n` + EnableMessageGp2 + `\n\n`;
|
||||
}
|
||||
}
|
||||
|
||||
if (ErrorMessageGp2) {
|
||||
allMessageGp2 += `👇👇👇👇👇失效账号👇👇👇👇👇\n` + ErrorMessageGp2 + `\n\n`;
|
||||
} else {
|
||||
allMessageGp2 += `👇👇👇👇👇失效账号👇👇👇👇👇\n 一个失效的都没有呢,羡慕啊...\n\n`;
|
||||
}
|
||||
|
||||
if (ShowSuccess == "true" && SuccessMessage) {
|
||||
allMessageGp2 += `👇👇👇👇👇有效账号👇👇👇👇👇\n` + SuccessMessageGp2 + `\n`;
|
||||
}
|
||||
|
||||
if (NoWarnError == "true") {
|
||||
OErrorMessageGp2 = "";
|
||||
}
|
||||
|
||||
if ($.isNode() && (EnableMessageGp2 || DisableMessageGp2 || OErrorMessageGp2 || CKAlwaysNotify == "true")) {
|
||||
console.log("京东CK检测#2:");
|
||||
console.log(allMessageGp2);
|
||||
|
||||
if (strAllNotify)
|
||||
allMessageGp2 += `\n` + strAllNotify;
|
||||
|
||||
await notify.sendNotify("京东CK检测#2", `${allMessageGp2}`, {
|
||||
url: `https://bean.m.jd.com/beanDetail/index.action?resourceValue=bean`
|
||||
})
|
||||
}
|
||||
}
|
||||
if (MessageUserGp3) {
|
||||
if (OErrorMessageGp3) {
|
||||
allMessageGp3 += `👇👇👇👇👇检测出错账号👇👇👇👇👇\n` + OErrorMessageGp3 + `\n\n`;
|
||||
}
|
||||
if (DisableMessageGp3) {
|
||||
allMessageGp3 += `👇👇👇👇👇自动禁用账号👇👇👇👇👇\n` + DisableMessageGp3 + `\n\n`;
|
||||
}
|
||||
if (EnableMessageGp3) {
|
||||
if (CKAutoEnable == "true") {
|
||||
allMessageGp3 += `👇👇👇👇👇自动启用账号👇👇👇👇👇\n` + EnableMessageGp3 + `\n\n`;
|
||||
} else {
|
||||
allMessageGp3 += `👇👇👇👇👇账号已恢复👇👇👇👇👇\n` + EnableMessageGp3 + `\n\n`;
|
||||
}
|
||||
}
|
||||
|
||||
if (ErrorMessageGp3) {
|
||||
allMessageGp3 += `👇👇👇👇👇失效账号👇👇👇👇👇\n` + ErrorMessageGp3 + `\n\n`;
|
||||
} else {
|
||||
allMessageGp3 += `👇👇👇👇👇失效账号👇👇👇👇👇\n 一个失效的都没有呢,羡慕啊...\n\n`;
|
||||
}
|
||||
|
||||
if (ShowSuccess == "true" && SuccessMessage) {
|
||||
allMessageGp3 += `👇👇👇👇👇有效账号👇👇👇👇👇\n` + SuccessMessageGp3 + `\n`;
|
||||
}
|
||||
|
||||
if (NoWarnError == "true") {
|
||||
OErrorMessageGp3 = "";
|
||||
}
|
||||
|
||||
if ($.isNode() && (EnableMessageGp3 || DisableMessageGp3 || OErrorMessageGp3 || CKAlwaysNotify == "true")) {
|
||||
console.log("京东CK检测#3:");
|
||||
console.log(allMessageGp3);
|
||||
if (strAllNotify)
|
||||
allMessageGp3 += `\n` + strAllNotify;
|
||||
|
||||
await notify.sendNotify("京东CK检测#3", `${allMessageGp3}`, {
|
||||
url: `https://bean.m.jd.com/beanDetail/index.action?resourceValue=bean`
|
||||
})
|
||||
}
|
||||
}
|
||||
if (MessageUserGp4) {
|
||||
if (OErrorMessageGp4) {
|
||||
allMessageGp4 += `👇👇👇👇👇检测出错账号👇👇👇👇👇\n` + OErrorMessageGp4 + `\n\n`;
|
||||
}
|
||||
if (DisableMessageGp4) {
|
||||
allMessageGp4 += `👇👇👇👇👇自动禁用账号👇👇👇👇👇\n` + DisableMessageGp4 + `\n\n`;
|
||||
}
|
||||
if (EnableMessageGp4) {
|
||||
if (CKAutoEnable == "true") {
|
||||
allMessageGp4 += `👇👇👇👇👇自动启用账号👇👇👇👇👇\n` + EnableMessageGp4 + `\n\n`;
|
||||
} else {
|
||||
allMessageGp4 += `👇👇👇👇👇账号已恢复👇👇👇👇👇\n` + EnableMessageGp4 + `\n\n`;
|
||||
}
|
||||
}
|
||||
|
||||
if (ErrorMessageGp4) {
|
||||
allMessageGp4 += `👇👇👇👇👇失效账号👇👇👇👇👇\n` + ErrorMessageGp4 + `\n\n`;
|
||||
} else {
|
||||
allMessageGp4 += `👇👇👇👇👇失效账号👇👇👇👇👇\n 一个失效的都没有呢,羡慕啊...\n\n`;
|
||||
}
|
||||
|
||||
if (ShowSuccess == "true" && SuccessMessage) {
|
||||
allMessageGp4 += `👇👇👇👇👇有效账号👇👇👇👇👇\n` + SuccessMessageGp4 + `\n`;
|
||||
}
|
||||
|
||||
if (NoWarnError == "true") {
|
||||
OErrorMessageGp4 = "";
|
||||
}
|
||||
|
||||
if ($.isNode() && (EnableMessageGp4 || DisableMessageGp4 || OErrorMessageGp4 || CKAlwaysNotify == "true")) {
|
||||
console.log("京东CK检测#4:");
|
||||
console.log(allMessageGp4);
|
||||
if (strAllNotify)
|
||||
allMessageGp4 += `\n` + strAllNotify;
|
||||
|
||||
await notify.sendNotify("京东CK检测#4", `${allMessageGp4}`, {
|
||||
url: `https://bean.m.jd.com/beanDetail/index.action?resourceValue=bean`
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
if (OErrorMessage) {
|
||||
allMessage += `👇👇👇👇👇检测出错账号👇👇👇👇👇\n` + OErrorMessage + `\n\n`;
|
||||
}
|
||||
if (DisableMessage) {
|
||||
allMessage += `👇👇👇👇👇自动禁用账号👇👇👇👇👇\n` + DisableMessage + `\n\n`;
|
||||
}
|
||||
if (EnableMessage) {
|
||||
if (CKAutoEnable == "true") {
|
||||
allMessage += `👇👇👇👇👇自动启用账号👇👇👇👇👇\n` + EnableMessage + `\n\n`;
|
||||
} else {
|
||||
allMessage += `👇👇👇👇👇账号已恢复👇👇👇👇👇\n` + EnableMessage + `\n\n`;
|
||||
}
|
||||
}
|
||||
|
||||
if (ErrorMessage) {
|
||||
allMessage += `👇👇👇👇👇失效账号👇👇👇👇👇\n` + ErrorMessage + `\n\n`;
|
||||
} else {
|
||||
allMessage += `👇👇👇👇👇失效账号👇👇👇👇👇\n 一个失效的都没有呢,羡慕啊...\n\n`;
|
||||
}
|
||||
|
||||
if (ShowSuccess == "true" && SuccessMessage) {
|
||||
allMessage += `👇👇👇👇👇有效账号👇👇👇👇👇\n` + SuccessMessage + `\n`;
|
||||
}
|
||||
|
||||
if (NoWarnError == "true") {
|
||||
OErrorMessage = "";
|
||||
}
|
||||
|
||||
if ($.isNode() && (EnableMessage || DisableMessage || OErrorMessage || CKAlwaysNotify == "true")) {
|
||||
console.log("京东CK检测:");
|
||||
console.log(allMessage);
|
||||
if (strAllNotify)
|
||||
allMessage += `\n` + strAllNotify;
|
||||
|
||||
await notify.sendNotify(`${$.name}`, `${allMessage}`, {
|
||||
url: `https://bean.m.jd.com/beanDetail/index.action?resourceValue=bean`
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
})()
|
||||
.catch((e) => $.logErr(e))
|
||||
.finally(() => $.done())
|
||||
|
||||
function TotalBean() {
|
||||
return new Promise(async resolve => {
|
||||
const options = {
|
||||
url: "https://me-api.jd.com/user_new/info/GetJDUserInfoUnion",
|
||||
headers: {
|
||||
Host: "me-api.jd.com",
|
||||
Accept: "*/*",
|
||||
Connection: "keep-alive",
|
||||
Cookie: cookie,
|
||||
"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"
|
||||
}
|
||||
}
|
||||
$.get(options, (err, resp, data) => {
|
||||
try {
|
||||
if (err) {
|
||||
$.logErr(err)
|
||||
$.nickName = decodeURIComponent($.UserName);
|
||||
$.NoReturn = `${$.nickName} :` + `${JSON.stringify(err)}\n`;
|
||||
} else {
|
||||
if (data) {
|
||||
data = JSON.parse(data);
|
||||
if (data['retcode'] === "1001") {
|
||||
$.isLogin = false; //cookie过期
|
||||
$.nickName = decodeURIComponent($.UserName);
|
||||
return;
|
||||
}
|
||||
if (data['retcode'] === "0" && data.data && data.data.hasOwnProperty("userInfo")) {
|
||||
$.nickName = (data.data.userInfo.baseInfo.nickname);
|
||||
} else {
|
||||
$.nickName = decodeURIComponent($.UserName);
|
||||
console.log("Debug Code:" + data['retcode']);
|
||||
$.NoReturn = `${$.nickName} :` + `服务器返回未知状态,不做变动\n`;
|
||||
}
|
||||
} else {
|
||||
$.nickName = decodeURIComponent($.UserName);
|
||||
$.log('京东服务器返回空数据');
|
||||
$.NoReturn = `${$.nickName} :` + `服务器返回空数据,不做变动\n`;
|
||||
}
|
||||
}
|
||||
} catch (e) {
|
||||
$.nickName = decodeURIComponent($.UserName);
|
||||
$.logErr(e)
|
||||
$.NoReturn = `${$.nickName} : 检测出错,不做变动\n`;
|
||||
}
|
||||
finally {
|
||||
resolve();
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
function isLoginByX1a0He() {
|
||||
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": "jdapp;iPhone;10.1.2;15.0;network/wifi;Mozilla/5.0 (iPhone; CPU iPhone OS 15_0 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1",
|
||||
},
|
||||
}
|
||||
$.get(options, (err, resp, data) => {
|
||||
try {
|
||||
if (data) {
|
||||
data = JSON.parse(data);
|
||||
if (data.islogin === "1") {
|
||||
console.log(`使用X1a0He写的接口加强检测: Cookie有效\n`)
|
||||
} else if (data.islogin === "0") {
|
||||
$.isLogin = false;
|
||||
console.log(`使用X1a0He写的接口加强检测: Cookie无效\n`)
|
||||
} else {
|
||||
console.log(`使用X1a0He写的接口加强检测: 未知返回,不作变更...\n`)
|
||||
$.error = `${$.nickName} :` + `使用X1a0He写的接口加强检测: 未知返回...\n`
|
||||
}
|
||||
}
|
||||
} catch (e) {
|
||||
console.log(e);
|
||||
}
|
||||
finally {
|
||||
resolve();
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
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)
|
||||
}
|
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
File diff suppressed because it is too large
Load Diff
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
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
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
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -0,0 +1,209 @@
|
|||
# -*- coding:utf-8 -*-
|
||||
"""
|
||||
cron: 20 10 * * *
|
||||
new Env('禁用重复任务');
|
||||
"""
|
||||
|
||||
import json
|
||||
import logging
|
||||
import os
|
||||
import sys
|
||||
import time
|
||||
import traceback
|
||||
|
||||
import requests
|
||||
|
||||
logger = logging.getLogger(name=None) # 创建一个日志对象
|
||||
logging.Formatter("%(message)s") # 日志内容格式化
|
||||
logger.setLevel(logging.INFO) # 设置日志等级
|
||||
logger.addHandler(logging.StreamHandler()) # 添加控制台日志
|
||||
# logger.addHandler(logging.FileHandler(filename="text.log", mode="w")) # 添加文件日志
|
||||
|
||||
|
||||
ipport = os.getenv("IPPORT")
|
||||
if not ipport:
|
||||
logger.info(
|
||||
"如果报错请在环境变量中添加你的真实 IP:端口\n名称:IPPORT\t值:127.0.0.1:5700\n或在 config.sh 中添加 export IPPORT='127.0.0.1:5700'"
|
||||
)
|
||||
ipport = "localhost:5700"
|
||||
else:
|
||||
ipport = ipport.lstrip("http://").rstrip("/")
|
||||
sub_str = os.getenv("RES_SUB", "KingRan_KR")
|
||||
sub_list = sub_str.split("&")
|
||||
res_only = os.getenv("RES_ONLY", True)
|
||||
headers = {
|
||||
"Accept": "application/json",
|
||||
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.131 Safari/537.36",
|
||||
}
|
||||
|
||||
|
||||
def load_send() -> None:
|
||||
logger.info("加载推送功能中...")
|
||||
global send
|
||||
send = None
|
||||
cur_path = os.path.abspath(os.path.dirname(__file__))
|
||||
sys.path.append(cur_path)
|
||||
if os.path.exists(cur_path + "/notify.py"):
|
||||
try:
|
||||
from notify import send
|
||||
except Exception:
|
||||
send = None
|
||||
logger.info(f"❌加载通知服务失败!!!\n{traceback.format_exc()}")
|
||||
|
||||
|
||||
def get_tasklist() -> list:
|
||||
tasklist = []
|
||||
t = round(time.time() * 1000)
|
||||
url = f"http://{ipport}/api/crons?searchValue=&t={t}"
|
||||
response = requests.get(url=url, headers=headers)
|
||||
datas = json.loads(response.content.decode("utf-8"))
|
||||
if datas.get("code") == 200:
|
||||
try:
|
||||
tasklist = datas.get("data").get("data")
|
||||
except Exception:
|
||||
tasklist = datas.get("data")
|
||||
return tasklist
|
||||
|
||||
|
||||
def filter_res_sub(tasklist: list) -> tuple:
|
||||
filter_list = []
|
||||
res_list = []
|
||||
for task in tasklist:
|
||||
for sub in sub_list:
|
||||
if task.get("command").find(sub) == -1:
|
||||
flag = False
|
||||
else:
|
||||
flag = True
|
||||
break
|
||||
if flag:
|
||||
res_list.append(task)
|
||||
else:
|
||||
filter_list.append(task)
|
||||
return filter_list, res_list
|
||||
|
||||
|
||||
def get_index(lst: list, item: str) -> list:
|
||||
return [index for (index, value) in enumerate(lst) if value == item]
|
||||
|
||||
|
||||
def get_duplicate_list(tasklist: list) -> tuple:
|
||||
logger.info("\n=== 第一轮初筛开始 ===")
|
||||
|
||||
ids = []
|
||||
names = []
|
||||
cmds = []
|
||||
for task in tasklist:
|
||||
ids.append(task.get("_id",task.get("id")))
|
||||
names.append(task.get("name"))
|
||||
cmds.append(task.get("command"))
|
||||
|
||||
name_list = []
|
||||
for i, name in enumerate(names):
|
||||
if name not in name_list:
|
||||
name_list.append(name)
|
||||
|
||||
tem_tasks = []
|
||||
tem_ids = []
|
||||
dup_ids = []
|
||||
for name2 in name_list:
|
||||
name_index = get_index(names, name2)
|
||||
for i in range(len(name_index)):
|
||||
if i == 0:
|
||||
logger.info(f"【✅保留】{cmds[name_index[0]]}")
|
||||
tem_tasks.append(tasklist[name_index[0]])
|
||||
tem_ids.append(ids[name_index[0]])
|
||||
else:
|
||||
logger.info(f"【🚫禁用】{cmds[name_index[i]]}")
|
||||
dup_ids.append(ids[name_index[i]])
|
||||
logger.info("")
|
||||
|
||||
logger.info("=== 第一轮初筛结束 ===")
|
||||
|
||||
return tem_ids, tem_tasks, dup_ids
|
||||
|
||||
|
||||
def reserve_task_only(
|
||||
tem_ids: list, tem_tasks: list, dup_ids: list, res_list: list
|
||||
) -> list:
|
||||
if len(tem_ids) == 0:
|
||||
return tem_ids
|
||||
|
||||
logger.info("\n=== 最终筛选开始 ===")
|
||||
task3 = None
|
||||
for task1 in tem_tasks:
|
||||
for task2 in res_list:
|
||||
if task1.get("name") == task2.get("name"):
|
||||
dup_ids.append(task1.get("_id",task1.get("id")))
|
||||
logger.info(f"【✅保留】{task2.get('command')}")
|
||||
task3 = task1
|
||||
if task3:
|
||||
logger.info(f"【🚫禁用】{task3.get('command')}\n")
|
||||
task3 = None
|
||||
logger.info("=== 最终筛选结束 ===")
|
||||
return dup_ids
|
||||
|
||||
|
||||
def disable_duplicate_tasks(ids: list) -> None:
|
||||
t = round(time.time() * 1000)
|
||||
url = f"http://{ipport}/api/crons/disable?t={t}"
|
||||
data = json.dumps(ids)
|
||||
headers["Content-Type"] = "application/json;charset=UTF-8"
|
||||
response = requests.put(url=url, headers=headers, data=data)
|
||||
datas = json.loads(response.content.decode("utf-8"))
|
||||
if datas.get("code") != 200:
|
||||
logger.info(f"❌出错!!!错误信息为:{datas}")
|
||||
else:
|
||||
logger.info("🎉成功禁用重复任务~")
|
||||
|
||||
|
||||
def get_token() -> str or None:
|
||||
path = '/ql/config/auth.json' # 设置青龙 auth文件地址
|
||||
global flag1
|
||||
flag1 = True
|
||||
if not os.path.isfile(path):
|
||||
path = '/ql/data/config/auth.json' # 尝试设置青龙 auth 新版文件地址
|
||||
flag1 = False
|
||||
try:
|
||||
with open(path, "r", encoding="utf-8") as f:
|
||||
data = json.load(f)
|
||||
except Exception:
|
||||
logger.info(f"❌无法获取 token!!!\n{traceback.format_exc()}")
|
||||
send("💔禁用重复任务失败", "无法获取 token!!!")
|
||||
exit(1)
|
||||
return data.get("token")
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
logger.info("===> 禁用重复任务开始 <===")
|
||||
load_send()
|
||||
token = get_token()
|
||||
headers["Authorization"] = f"Bearer {token}"
|
||||
|
||||
# 获取过滤后的任务列表
|
||||
sub_str = "\n".join(sub_list)
|
||||
logger.info(f"\n=== 你选择过滤的任务前缀为 ===\n{sub_str}")
|
||||
tasklist = get_tasklist()
|
||||
if len(tasklist) == 0:
|
||||
logger.info("❌无法获取 tasklist!!!")
|
||||
exit(1)
|
||||
filter_list, res_list = filter_res_sub(tasklist)
|
||||
|
||||
tem_ids, tem_tasks, dup_ids = get_duplicate_list(filter_list)
|
||||
# 是否在重复任务中只保留设置的前缀
|
||||
if res_only:
|
||||
ids = reserve_task_only(tem_ids, tem_tasks, dup_ids, res_list)
|
||||
else:
|
||||
ids = dup_ids
|
||||
logger.info("你选择保留除了设置的前缀以外的其他任务")
|
||||
|
||||
sum = f"所有任务数量为:{len(tasklist)}"
|
||||
filter = f"过滤的任务数量为:{len(res_list)}"
|
||||
disable = f"禁用的任务数量为:{len(ids)}"
|
||||
logging.info("\n=== 禁用数量统计 ===\n" + sum + "\n" + filter + "\n" + disable)
|
||||
|
||||
if len(ids) == 0:
|
||||
logger.info("😁没有重复任务~")
|
||||
else:
|
||||
disable_duplicate_tasks(ids)
|
||||
#if send:
|
||||
#send("💖禁用重复任务成功", f"\n{sum}\n{filter}\n{disable}")
|
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
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
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
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
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
|
@ -0,0 +1,177 @@
|
|||
/*
|
||||
京东快递
|
||||
@Leaf
|
||||
|
||||
随机定时
|
||||
*/
|
||||
const $ = new Env('京东快递');
|
||||
const got = require('got');
|
||||
|
||||
const envSplitor = ['&','\n','@']
|
||||
const ckNames = ['JD_COOKIE']
|
||||
|
||||
const MAX_THREAD = parseInt(process.env['jd_jdkd_thread']) || 5
|
||||
const DEFAULT_TIMEOUT=8000, DEFAULT_RETRY=3;
|
||||
|
||||
const default_UA = '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.31(0x18001f2f) NetType/WIFI Language/zh_CN miniProgram/wx73247c7819d61796'
|
||||
const Referer = 'https://jingcai-h5.jd.com/'
|
||||
const Origin = 'https://jingcai-h5.jd.com'
|
||||
|
||||
const client = got.extend({
|
||||
headers:{
|
||||
Connection:'keep-alive',
|
||||
'User-Agent': default_UA,
|
||||
Referer,
|
||||
Origin,
|
||||
AppParams: JSON.stringify({"appid":158,"ticket_type":"m"}),
|
||||
ClientInfo: JSON.stringify({"appName":"jingcai","client":"m"}),
|
||||
'LOP-DN': 'jingcai.jd.com',
|
||||
'X-Requested-With': 'XMLHttpRequest',
|
||||
},
|
||||
retry: {limit:0},
|
||||
timeout: DEFAULT_TIMEOUT,
|
||||
followRedirect: false,
|
||||
})
|
||||
|
||||
class BasicClass{constructor(){this.index=$.userIdx++;this.name='';} log(msg,opt={}){var m='',n=$.userCount.toString().length;;if(this.index)m+=`账号[${$.padStr(this.index,n)}]`;if(this.name)m+=`[${this.name}]`;$.log(m+msg,opt);} async request(opt){var resp=null,count=0;var fn=opt.fn||opt.url;opt.method=opt?.method?.toUpperCase()||'GET';while(count++<DEFAULT_RETRY){try{await client(opt).then(t=>{resp=t},e=>{resp=e.response});if(((resp?.statusCode/100)|0)<=4)break;}catch(e){if(e.name=='TimeoutError'){this.log(`[${fn}]请求超时,重试第${count}次`);}else{this.log(`[${fn}]请求错误(${e.message}),重试第${count}次`);}};} if(resp==null)return Promise.resolve({statusCode:-1,headers:null,result:null});let{statusCode,headers,body}=resp;if(body)try{body=JSON.parse(body);}catch{};return Promise.resolve({statusCode,headers,result:body})}}
|
||||
let http = new BasicClass();
|
||||
|
||||
class UserClass extends BasicClass {
|
||||
constructor(ck) {
|
||||
super()
|
||||
this.cookie = ck
|
||||
this.pt_pin = ck.match(/pin=([\w\-\%]+)/) ? ck.match(/pin=([\w\-\%]+)/)[1] : ''
|
||||
this.name = decodeURIComponent(this.pt_pin)
|
||||
}
|
||||
|
||||
async queryTaskList() {
|
||||
try {
|
||||
let options = {
|
||||
fn: 'queryTaskList',
|
||||
method: 'post',
|
||||
url: 'https://lop-proxy.jd.com/ESGApi/queryTaskList',
|
||||
headers: {Cookie:this.cookie,'event-id':$.randomPattern('xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxxx')},
|
||||
json: [{"pin":"$cooMrdGatewayUid$"}],
|
||||
}
|
||||
let {result} = await this.request(options)
|
||||
let code = result?.code
|
||||
if(code == 1) {
|
||||
for(let task of (result?.content?.taskInfoList||[]).filter(x => x.taskReachNum < x.taskNeedReachNum && x.triggerType==1)) {
|
||||
await this.reachTaskInfo(task);
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
let errCode = code || result?.error_response?.code
|
||||
let errMsg = result?.msg || result?.error_response?.zh_desc
|
||||
this.log(`查询任务列表出错[${errCode}]: ${errMsg}`)
|
||||
}
|
||||
} catch (e) {
|
||||
$.log(e)
|
||||
} finally {
|
||||
return Promise.resolve()
|
||||
}
|
||||
}
|
||||
|
||||
async reachTaskInfo(task) {
|
||||
try {
|
||||
let options = {
|
||||
fn: 'reachTaskInfo',
|
||||
method: 'post',
|
||||
url: 'https://lop-proxy.jd.com/ESGApi/reachTaskInfo',
|
||||
headers: {Cookie:this.cookie,'event-id':$.randomPattern('xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxxx')},
|
||||
json: [{
|
||||
taskNo: task.taskNo,
|
||||
childTaskId: task.childTaskId,
|
||||
pin: "$cooMrdGatewayUid$",
|
||||
}],
|
||||
}
|
||||
let {result} = await this.request(options)
|
||||
let code = result?.code
|
||||
if(code == 1) {
|
||||
this.log(`完成任务[${task.taskTitle}]成功`)
|
||||
await this.queryTaskList();
|
||||
} else {
|
||||
let errCode = code || result?.error_response?.code
|
||||
let errMsg = result?.msg || result?.error_response?.zh_desc
|
||||
this.log(`完成任务[${task.taskTitle}]失败[${errCode}]: ${errMsg}`)
|
||||
}
|
||||
} catch (e) {
|
||||
$.log(e)
|
||||
} finally {
|
||||
return Promise.resolve()
|
||||
}
|
||||
}
|
||||
|
||||
async queryCanGetRewardTaskList() {
|
||||
try {
|
||||
let options = {
|
||||
fn: 'queryCanGetRewardTaskList',
|
||||
method: 'post',
|
||||
url: 'https://lop-proxy.jd.com/ESGApi/queryCanGetRewardTaskList',
|
||||
headers: {Cookie:this.cookie,'event-id':$.randomPattern('xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxxx')},
|
||||
json: [{"pin":"$cooMrdGatewayUid$"}],
|
||||
}
|
||||
let {result} = await this.request(options)
|
||||
let code = result?.code
|
||||
if(code == 1) {
|
||||
for(let item of (result?.content?.personalCarbonRewardRespDtoList||[])) {
|
||||
await this.operationPersonalCarbonIntegral(item)
|
||||
}
|
||||
} else {
|
||||
let errCode = code || result?.error_response?.code
|
||||
let errMsg = result?.msg || result?.error_response?.zh_desc
|
||||
this.log(`查询可领取奖励出错[${errCode}]: ${errMsg}`)
|
||||
}
|
||||
} catch (e) {
|
||||
$.log(e)
|
||||
} finally {
|
||||
return Promise.resolve()
|
||||
}
|
||||
}
|
||||
|
||||
async operationPersonalCarbonIntegral(item) {
|
||||
try {
|
||||
let options = {
|
||||
fn: 'operationPersonalCarbonIntegral',
|
||||
method: 'post',
|
||||
url: 'https://lop-proxy.jd.com/ESGApi/operationPersonalCarbonIntegral',
|
||||
headers: {Cookie:this.cookie,'event-id':$.randomPattern('xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxxx')},
|
||||
json: [{
|
||||
type: 2,
|
||||
operationType: 1,
|
||||
rewardNo: item.rewardNo,
|
||||
taskNo: item.taskNo,
|
||||
pin: "$cooMrdGatewayUid$",
|
||||
}],
|
||||
}
|
||||
let {result} = await this.request(options)
|
||||
let code = result?.code
|
||||
if(code == 1) {
|
||||
this.log(`收取[${item.taskTitle}]奖励成功, 现在有${result?.content?.carbonIntegral}g能量`)
|
||||
} else {
|
||||
let errCode = code || result?.error_response?.code
|
||||
let errMsg = result?.msg || result?.error_response?.zh_desc
|
||||
this.log(`收取[${item.taskTitle}]奖励失败[${errCode}]: ${errMsg}`)
|
||||
}
|
||||
} catch (e) {
|
||||
$.log(e)
|
||||
} finally {
|
||||
return Promise.resolve()
|
||||
}
|
||||
}
|
||||
|
||||
async userTask() {
|
||||
await this.queryTaskList();
|
||||
await this.queryCanGetRewardTaskList();
|
||||
}
|
||||
}
|
||||
|
||||
!(async () => {
|
||||
$.read_env(UserClass);
|
||||
|
||||
await $.threadTask('userTask',MAX_THREAD)
|
||||
})()
|
||||
.catch((e) => $.log(e))
|
||||
.finally(() => $.exitNow())
|
||||
|
||||
function Env(name){return new class{constructor(name){this.name=name;this.startTime=Date.now();this.log(`[${this.name}]开始运行\n`,{time:true});this.notifyStr=[];this.notifyFlag=true;this.userIdx=0;this.userList=[];this.userCount=0;} log(msg,options={}){let opt={console:true};Object.assign(opt,options);if(opt.time){let fmt=opt.fmt||'hh:mm:ss';msg=`[${this.time(fmt)}]`+msg;} if(opt.notify)this.notifyStr.push(msg);if(opt.console)console.log(msg);} read_env(Class){let envStrList=ckNames.map(x=>process.env[x]);for(let env_str of envStrList.filter(x=>!!x)){let sp=envSplitor.filter(x=>env_str.includes(x));let splitor=sp.length>0?sp[0]:envSplitor[0];for(let ck of env_str.split(splitor).filter(x=>!!x)){this.userList.push(new Class(ck));}} this.userCount=this.userList.length;if(!this.userCount){this.log(`未找到变量,请检查变量${ckNames.map(x => '['+x+']').join('或')}`,{notify:true});return false;} this.log(`共找到${this.userCount}个账号`);return true;} async threads(taskName,conf,opt={}){while(conf.idx<$.userList.length){let user=$.userList[conf.idx++];await user[taskName](opt);}} async threadTask(taskName,thread){let taskAll=[];let taskConf={idx:0};while(thread--)taskAll.push(this.threads(taskName,taskConf));await Promise.all(taskAll);} time(t,x=null){let xt=x?new Date(x):new Date;let e={"M+":xt.getMonth()+1,"d+":xt.getDate(),"h+":xt.getHours(),"m+":xt.getMinutes(),"s+":xt.getSeconds(),"q+":Math.floor((xt.getMonth()+3)/3),S:this.padStr(xt.getMilliseconds(),3)};/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(xt.getFullYear()+"").substr(4-RegExp.$1.length)));for(let s in e)new RegExp("("+s+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?e[s]:("00"+e[s]).substr((""+e[s]).length)));return t;} async showmsg(){if(!this.notifyFlag)return;if(!this.notifyStr.length)return;var notify=require('./sendNotify');this.log('\n============== 推送 ==============');await notify.sendNotify(this.name,this.notifyStr.join('\n'));} padStr(num,length,opt={}){let padding=opt.padding||'0';let mode=opt.mode||'l';let numStr=String(num);let numPad=(length>numStr.length)?(length-numStr.length):0;let pads='';for(let i=0;i<numPad;i++){pads+=padding;} if(mode=='r'){numStr=numStr+pads;}else{numStr=pads+numStr;} return numStr;} json2str(obj,c,encode=false){let ret=[];for(let keys of Object.keys(obj).sort()){let v=obj[keys];if(v&&encode)v=encodeURIComponent(v);ret.push(keys+'='+v);} return ret.join(c);} str2json(str,decode=false){let ret={};for(let item of str.split('&')){if(!item)continue;let idx=item.indexOf('=');if(idx==-1)continue;let k=item.substr(0,idx);let v=item.substr(idx+1);if(decode)v=decodeURIComponent(v);ret[k]=v;} return ret;} randomPattern(pattern,charset='abcdef0123456789'){let str='';for(let chars of pattern){if(chars=='x'){str+=charset.charAt(Math.floor(Math.random()*charset.length));}else if(chars=='X'){str+=charset.charAt(Math.floor(Math.random()*charset.length)).toUpperCase();}else{str+=chars;}} return str;} randomString(len,charset='abcdef0123456789'){let str='';for(let i=0;i<len;i++){str+=charset.charAt(Math.floor(Math.random()*charset.length));} return str;} randomList(a){let idx=Math.floor(Math.random()*a.length);return a[idx];} wait(t){return new Promise(e=>setTimeout(e,t));} async exitNow(){await this.showmsg();let e=Date.now();let s=(e-this.startTime)/1000;this.log('');this.log(`[${this.name}]运行结束,共运行了${s}秒`,{time:true});process.exit(0);}} (name)}
|
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
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
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
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
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
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
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
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -0,0 +1,281 @@
|
|||
"""
|
||||
# 邀好友赢大礼 create by doubi 通用模板
|
||||
# 17:/椋东送福利,邀请好友,争排行榜排位,大礼送不停,(E1Y7RAtC4b) ,升级新版猄·=·Dσσōngαpρ
|
||||
# https://prodev.m.jd.com/mall/active/dVF7gQUVKyUcuSsVhuya5d2XD4F/index.html?code=16dde1860f1b4f1b9a93db6612abf0b9&invitePin=pin值
|
||||
# 注意事项 pin 为助力pin 必须保证ck在里面
|
||||
# 作者要求 注释不能删除 否则后续不再更新
|
||||
# 作者授权发布KR库。搬运请完整保留注释。
|
||||
|
||||
环境变量说明:
|
||||
export yhypin="需要助力的pin值"
|
||||
export yhyauthorCode="活动ID"
|
||||
|
||||
cron: 6 6 6 6 *
|
||||
new Env('邀请赢大礼');
|
||||
"""
|
||||
|
||||
""#line:15
|
||||
import json #line:17
|
||||
import sys #line:18
|
||||
import urllib #line:19
|
||||
import requests #line:20
|
||||
import time #line:21
|
||||
import re #line:22
|
||||
import os #line:23
|
||||
from urllib .parse import quote_plus ,unquote_plus #line:24
|
||||
import logging #line:25
|
||||
import asyncio #line:26
|
||||
logging .basicConfig (level =logging .INFO ,format ="%(asctime)s %(levelname)s %(lineno)d %(message)s",datefmt ="%H:%M:%S")#line:31
|
||||
logger =logging .getLogger ('prodev邀请好友赢大礼通用模板')#line:33
|
||||
CK_FILE ='cklist.txt'#line:35
|
||||
NUM_TYR =1 #line:36
|
||||
UNSUCC =0 #line:37
|
||||
Appid ='jdchoujiang_h5'#line:38
|
||||
appid ='9c0f9'#line:39
|
||||
venderId =int #line:40
|
||||
inviterList =[]#line:41
|
||||
activityId =''#line:42
|
||||
activityUrl =f'https://prodev.m.jd.com/mall/active/dVF7gQUVKyUcuSsVhuya5d2XD4F/index.html?code={activityId}'#line:43
|
||||
globalExitFlag =False #line:44
|
||||
index =0 #line:45
|
||||
cks =[]#line:46
|
||||
def get_time ():#line:49
|
||||
return int (time .time ()*1000 )#line:50
|
||||
class Userinfo :#line:53
|
||||
userIdx =0 #line:54
|
||||
def __init__ (OOOO00O0000O00O0O ,O000OO0OOO00OO0O0 ):#line:56
|
||||
try :#line:57
|
||||
Userinfo .userIdx +=1 #line:58
|
||||
OOOO00O0000O00O0O .userIdx =Userinfo .userIdx #line:59
|
||||
OOOO00O0000O00O0O .cookie =O000OO0OOO00OO0O0 #line:60
|
||||
OOOO00O0000O00O0O .pt_pin =(str (re .findall (r'(pt_pin=([^; ]+)(?=;?))',OOOO00O0000O00O0O .cookie )[0 ][1 ]))#line:61
|
||||
OOOO00O0000O00O0O .name =unquote_plus (OOOO00O0000O00O0O .pt_pin )#line:62
|
||||
OOOO00O0000O00O0O .UA ='jdapp;iPhone;10.1.4;${this.iosVer};${this.uuid};network/wifi;model/iPhone${this.iphone},1;addressid/${this.addressid};' 'appBuild/167707;jdSupportDarkMode/0;Mozilla/5.0 (iPhone; CPU iPhone OS ${this.iosVer_} like Mac OS X) AppleWebKit/605.1.15 ' '(KHTML, like Gecko) Mobile/null;supportJDSHWK/1'#line:65
|
||||
OOOO00O0000O00O0O .successCount =0 #line:66
|
||||
OOOO00O0000O00O0O .loggin =True #line:67
|
||||
OOOO00O0000O00O0O .needHelp =False #line:68
|
||||
OOOO00O0000O00O0O .black =False #line:69
|
||||
OOOO00O0000O00O0O .stageReward =[]#line:70
|
||||
OOOO00O0000O00O0O .needInviteNum =0 #line:71
|
||||
except :#line:73
|
||||
logger .info (f'京东账户[{OOOO00O0000O00O0O.userIdx}]无效,请检查')#line:74
|
||||
def getActivityPage (OOOO0OO0O00O000OO ):#line:76
|
||||
global globalExitFlag ,Now_Time ,venderId #line:77
|
||||
O0OO0O0O00O000OO0 =getUrl ('memberBringActPage',{"code":activityId ,"invitePin":OOOO0OO0O00O000OO .pt_pin ,"_t":get_time ()},OOOO0OO0O00O000OO .pt_pin )#line:81
|
||||
OOOO0OO0O0O0O000O =postUrl (O0OO0O0O00O000OO0 ,OOOO0OO0O00O000OO .cookie ,OOOO0OO0O00O000OO .UA ,'get')#line:82
|
||||
O00OO0O0O00O0OO0O =json .loads (OOOO0OO0O0O0O000O )#line:83
|
||||
if O00OO0O0O00O0OO0O ['success']:#line:84
|
||||
OOOOOOOO00OOOO00O =O00OO0O0O00O0OO0O .get ('data').get ('shopId')#line:85
|
||||
O0O000O000OOOO00O =O00OO0O0O00O0OO0O .get ('data').get ('shopName')#line:86
|
||||
venderId =O00OO0O0O00O0OO0O .get ('data').get ('venderId')#line:87
|
||||
Now_Time =get_time ()#line:88
|
||||
OO00OOOO00OOOO0O0 =O00OO0O0O00O0OO0O .get ('data').get ('beginTime')/1000 #line:89
|
||||
O0OOOOO0000000OO0 =O00OO0O0O00O0OO0O .get ('data').get ('endTime')/1000 #line:90
|
||||
O00OO00000O0OOOO0 =O00OO0O0O00O0OO0O .get ('data').get ('inviteFloor')#line:91
|
||||
OOOO0OO0O00O000OO .successCount =O00OO0O0O00O0OO0O .get ('data').get ('successCount')#line:92
|
||||
logger .info (f'京东账户{OOOO0OO0O00O000OO.userIdx}[{OOOO0OO0O00O000OO.name}]:已邀请{OOOO0OO0O00O000OO.successCount}人')#line:93
|
||||
logger .info (f'活动:{O00OO00000O0OOOO0}')#line:94
|
||||
logger .info (f'开始时间:{time.strftime("%Y-%m-%d %H:%M:%S", time.localtime(OO00OOOO00OOOO0O0))}')#line:95
|
||||
logger .info (f'结束时间:{time.strftime("%Y-%m-%d %H:%M:%S", time.localtime(O0OOOOO0000000OO0))}')#line:96
|
||||
logger .info (f'店铺:{O0O000O000OOOO00O}')#line:97
|
||||
logger .info (f'shopid:{OOOOOOOO00OOOO00O}')#line:98
|
||||
logger .info (f'venderId:{venderId}')#line:99
|
||||
logger .info (f'已邀请{OOOO0OO0O00O000OO.successCount}人')#line:100
|
||||
logger .info (f'奖品:')#line:101
|
||||
for OO00OOO0000OOOO0O in O00OO0O0O00O0OO0O .get ('data').get ('rewards'):#line:102
|
||||
if OO00OOO0000OOOO0O ['rewardStock']>1 :#line:103
|
||||
if OO00OOO0000OOOO0O ["inviteNum"]>OOOO0OO0O00O000OO .successCount :#line:104
|
||||
OOOO0OO0O00O000OO .needHelp =True #line:105
|
||||
OOOO0OO0O00O000OO .needInviteNum =OO00OOO0000OOOO0O ['inviteNum']#line:106
|
||||
OOOO0OO0O00O000OO .stageReward .append ({'stage':OO00OOO0000OOOO0O ['stage'],'inviteNum':OO00OOO0000OOOO0O ['inviteNum'],'rewardName':OO00OOO0000OOOO0O ['rewardName'],'rewardStatus':OO00OOO0000OOOO0O ['rewardStatus'],'rewardStock':OO00OOO0000OOOO0O ['rewardStock']})#line:113
|
||||
O00O000O0OOOO0O00 ='未达标'#line:114
|
||||
if OO00OOO0000OOOO0O ['rewardStatus']==2 :#line:115
|
||||
O00O000O0OOOO0O00 ='待领取'#line:116
|
||||
if OO00OOO0000OOOO0O ['rewardStatus']==3 :#line:117
|
||||
O00O000O0OOOO0O00 ='已领取'#line:118
|
||||
if OO00OOO0000OOOO0O ['rewardStatus']==4 :#line:119
|
||||
O00O000O0OOOO0O00 ='已发完'#line:120
|
||||
O0O00000OO0000O00 =OO00OOO0000OOOO0O ['stage']#line:121
|
||||
OO0000OO000O0OO0O =OO00OOO0000OOOO0O ['rewardStock']#line:122
|
||||
O0O0OO00OOOOOO0OO =OO00OOO0000OOOO0O ['rewardName']#line:123
|
||||
logger .info (f'-- [{O0O00000OO0000O00}] 需[{OO00OOO0000OOOO0O["inviteNum"]}]已{OOOO0OO0O00O000OO.successCount}人:{O0O0OO00OOOOOO0OO},剩余{OO0000OO000O0OO0O}份,{O00O000O0OOOO0O00}')#line:125
|
||||
if Now_Time >=O00OO0O0O00O0OO0O .get ('data').get ('endTime'):#line:126
|
||||
logger .info ('活动结束了别玩了哈')#line:127
|
||||
globalExitFlag =True #line:128
|
||||
if Now_Time <O00OO0O0O00O0OO0O .get ('data').get ('beginTime'):#line:129
|
||||
logger .info ('活动还没开始,别着急')#line:130
|
||||
globalExitFlag =True #line:131
|
||||
else :#line:132
|
||||
logger .info (f'账户{OOOO0OO0O00O000OO.userIdx}{OOOO0OO0O00O000OO.name}:进入活动失败')#line:133
|
||||
def firstInvite (OOOOO00O0O00OO000 ,tyess =0 ):#line:135
|
||||
O0OO0000O0000OOOO =getUrl ('memberBringFirstInvite',{"code":activityId ,"fp":"92c2eaecd929167b42f5f873769f5921","eid":"EJKJDGG4CM4CMPC4S27BYKCN2IXTSLPCXTM2CUSGB2BQTXMLLM7IXOUJAZHCEJQ44SFMGGMTBROUO4BG473S5SNVJE"},OOOOO00O0O00OO000 .pt_pin )#line:138
|
||||
O0000OO00O0O0OO00 =postUrl (O0OO0000O0000OOOO ,OOOOO00O0O00OO000 .cookie ,OOOOO00O0O00OO000 .UA ,'get')#line:139
|
||||
OO0O00000000O0OOO =json .loads (O0000OO00O0O0OO00 )#line:140
|
||||
if OO0O00000000O0OOO ['success']:#line:141
|
||||
logger .info (f'{OOOOO00O0O00OO000.name}:开启邀请成功')#line:142
|
||||
else :#line:143
|
||||
logger .info (f'{OOOOO00O0O00OO000.name}:开启失败'+OO0O00000000O0OOO ['errorMessage'])#line:144
|
||||
if tyess >=NUM_TYR :#line:145
|
||||
OOOOO00O0O00OO000 .black =True #line:146
|
||||
return #line:147
|
||||
logger .info (f'{OOOOO00O0O00OO000.name}:等待2秒')#line:148
|
||||
time .sleep (2 )#line:149
|
||||
O0O00OO000OOO0OO0 =tyess +1 #line:150
|
||||
logger .info (f"重试第{O0O00OO000OOO0OO0}次")#line:151
|
||||
OOOOO00O0O00OO000 .firstInvite (O0O00OO000OOO0OO0 )#line:152
|
||||
def getInviteReward (OO000OO0OO000OOOO ,OOOO0O00O0O00OOOO ,ttry =0 ):#line:154
|
||||
global addressIdx ,inviterList #line:155
|
||||
OOOO0OO0O0000OO0O =getUrl ('memberBringInviteReward',{"code":activityId ,"stage":OOOO0O00O0O00OOOO ["stage"]},OO000OO0OO000OOOO .pt_pin )#line:158
|
||||
OOO0O000000OO000O =postUrl (OOOO0OO0O0000OO0O +f"&code={activityId}&stage={OOOO0O00O0O00OOOO['stage']}",OO000OO0OO000OOOO .cookie ,OO000OO0OO000OOOO .UA ,'get')#line:159
|
||||
O0O0OOOO0OO0000OO =json .loads (OOO0O000000OO000O )#line:160
|
||||
if O0O0OOOO0OO0000OO ['success']:#line:161
|
||||
OOOO0O00O0O00OOOO ['rewardStatus']=3 #line:162
|
||||
logger .info (f'京东账户{OO000OO0OO000OOOO.userIdx}[{OO000OO0OO000OOOO.name}]:领取阶段{OOOO0O00O0O00OOOO["stage"]},奖励{OOOO0O00O0O00OOOO["rewardName"]}成功')#line:164
|
||||
return #line:165
|
||||
if '操作过于频繁'in str (O0O0OOOO0OO0000OO ['errorMessage']):#line:166
|
||||
logger .info (f'京东账户{OO000OO0OO000OOOO.userIdx}[{OO000OO0OO000OOOO.name}]:领取阶段{OOOO0O00O0O00OOOO["stage"]},奖励{OOOO0O00O0O00OOOO["rewardName"]}失败'+O0O0OOOO0OO0000OO ['errorMessage'])#line:170
|
||||
logger .info ("等待5秒")#line:171
|
||||
time .sleep (5 )#line:172
|
||||
OO000OO0OO000OOOO .getInviteReward (OOOO0O00O0O00OOOO ,ttry +1 )#line:173
|
||||
if "交易失败"in O0O0OOOO0OO0000OO ['errorMessage']:#line:174
|
||||
logger .info ("实物不自动领取请自行前往查看")#line:175
|
||||
else :#line:176
|
||||
logger .info (f'京东账户{OO000OO0OO000OOOO.userIdx}[{OO000OO0OO000OOOO.name}]:领取阶段{OOOO0O00O0O00OOOO["stage"]},奖励{OOOO0O00O0O00OOOO["rewardName"]}失败'+O0O0OOOO0OO0000OO ['errorMessage'])#line:180
|
||||
OOOO0O00O0O00OOOO ['rewardStatus']=3 #line:181
|
||||
def getShopOpenCardInfo (O00O00O0OO00O00O0 ):#line:183
|
||||
global UNSUCC ,cks #line:184
|
||||
O0O00OOOO000OO00O ={"venderId":venderId ,"channel":"401"}#line:185
|
||||
OO00OO00O00OO0OO0 =f'https://api.m.jd.com/client.action?appid=jd_shop_member&functionId=getShopOpenCardInfo&body={quote_plus(json.dumps(O0O00OOOO000OO00O))}&client=H5&clientVersion=9.2.0&uuid=88888'#line:186
|
||||
OOOO00O00O0OO00O0 ={'Host':'api.m.jd.com','Accept':'*/*','Connection':'keep-alive','Cookie':O00O00O0OO00O00O0 .cookie ,'User-Agent':O00O00O0OO00O00O0 .UA ,'Accept-Language':'zh-cn','Referer':f'https://shopmember.m.jd.com/shopcard/?venderId={venderId}&channel=801&returnUrl={json.dumps(activityUrl)}','Accept-Encoding':'gzip, deflate'}#line:196
|
||||
O00OOO00O0OO0O0OO =requests .get (url =OO00OO00O00OO0OO0 ,headers =OOOO00O00O0OO00O0 ,timeout =5 )#line:197
|
||||
try :#line:198
|
||||
if O00OOO00O0OO0O0OO .status_code ==200 :#line:199
|
||||
O00OOO00O0OO0O0OO =O00OOO00O0OO0O0OO .json ()#line:200
|
||||
if O00OOO00O0OO0O0OO ['success']:#line:201
|
||||
logger .info (f'京东账户{O00O00O0OO00O00O0.userIdx}[{O00O00O0OO00O00O0.name}]店铺入会状态:'+str (O00OOO00O0OO0O0OO .get ("result").get ("userInfo").get ("openCardStatus")).replace ("0",'未入会').replace ("1",'已入会'))#line:204
|
||||
if O00OOO00O0OO0O0OO .get ("result").get ("userInfo").get ("openCardStatus")==0 :#line:205
|
||||
Userinfo .joinMember (O00O00O0OO00O00O0 ,O00O00O0OO00O00O0 )#line:206
|
||||
else :#line:207
|
||||
pass #line:208
|
||||
else :#line:209
|
||||
if '火爆'in O00OOO00O0OO0O0OO ['message']:#line:210
|
||||
logger .info (f'京东账户{O00O00O0OO00O00O0.userIdx}[{O00O00O0OO00O00O0.name}]店铺入会状态:火爆')#line:211
|
||||
if UNSUCC <NUM_TYR :#line:212
|
||||
logger .info (f'京东账户{O00O00O0OO00O00O0.userIdx}[{O00O00O0OO00O00O0.name}]检查入会状态失败,重试第{UNSUCC + 1}次'+O00OOO00O0OO0O0OO ['message'])#line:213
|
||||
UNSUCC +=1 #line:214
|
||||
time .sleep (1 )#line:215
|
||||
O00O00O0OO00O00O0 .getShopOpenCardInfo ()#line:216
|
||||
else :#line:217
|
||||
logger .info (f'京东账户{O00O00O0OO00O00O0.userIdx}[{O00O00O0OO00O00O0.name}]检查入会状态失败,result:'+O00OOO00O0OO0O0OO ['message'])#line:218
|
||||
except Exception as O0O0OOO0OO000OOOO :#line:220
|
||||
print (O0O0OOO0OO000OOOO )#line:221
|
||||
def joinMember (O00O0O0O00000O00O ,OO000O00OOOO0000O ,retry =0 ):#line:223
|
||||
global UNSUCC #line:224
|
||||
OOO0OOOOO0OO0OOO0 =getUrl ('memberBringJoinMember',{"code":activityId ,"invitePin":OO000O00OOOO0000O .pt_pin },OO000O00OOOO0000O .pt_pin )#line:227
|
||||
O00OOO000O00OOOO0 =postUrl (OOO0OOOOO0OO0OOO0 ,O00O0O0O00000O00O .cookie ,O00O0O0O00000O00O .UA ,'get')#line:228
|
||||
OOO0OO0OO00OOOO00 =json .loads (O00OOO000O00OOOO0 )#line:229
|
||||
try :#line:230
|
||||
if OOO0OO0OO00OOOO00 ['success']:#line:231
|
||||
if OO000O00OOOO0000O .pt_pin !=O00O0O0O00000O00O .pt_pin :#line:232
|
||||
OO000O00OOOO0000O .successCount +=1 #line:233
|
||||
logger .info (f'京东账户{O00O0O0O00000O00O.userIdx}[{O00O0O0O00000O00O.name}]入会成功!,已助力{OO000O00OOOO0000O.name}')#line:234
|
||||
else :#line:236
|
||||
if '交易失败'in OOO0OO0OO00OOOO00 ['errorMessage']:#line:237
|
||||
if OO000O00OOOO0000O .pt_pin !=O00O0O0O00000O00O .pt_pin :#line:238
|
||||
OO000O00OOOO0000O .successCount +=1 #line:239
|
||||
logger .info (f'京东账户{O00O0O0O00000O00O.userIdx}[{O00O0O0O00000O00O.name}]入会成功!,已助力{OO000O00OOOO0000O.name}')#line:240
|
||||
elif 'already'in OOO0OO0OO00OOOO00 ['errorMessage']:#line:242
|
||||
logger .info (f'京东账户{O00O0O0O00000O00O.userIdx}[{O00O0O0O00000O00O.name}]已是会员')#line:243
|
||||
elif '火爆'in OOO0OO0OO00OOOO00 ['errorMessage']:#line:245
|
||||
logger .info (f'京东账户{O00O0O0O00000O00O.userIdx}[{O00O0O0O00000O00O.name}]:'+OOO0OO0OO00OOOO00 ['errorMessage'])#line:246
|
||||
if UNSUCC <NUM_TYR :#line:248
|
||||
logger .info (f'京东账户{O00O0O0O00000O00O.userIdx}[{O00O0O0O00000O00O.name}]入会失败,重试第{UNSUCC}次'+OOO0OO0OO00OOOO00 ['errorMessage'])#line:249
|
||||
UNSUCC +=1 #line:250
|
||||
time .sleep (0.1 )#line:251
|
||||
Userinfo .joinMember (O00O0O0O00000O00O ,OO000O00OOOO0000O )#line:252
|
||||
else :#line:253
|
||||
logger .info (f'京东账户{O00O0O0O00000O00O.userIdx}[{O00O0O0O00000O00O.name}]入会失败')#line:254
|
||||
except Exception as O0OO0O000O00OO00O :#line:256
|
||||
logger .error (O0OO0O000O00OO00O )#line:257
|
||||
async def userInviteTask (OO000OO00OO0OO0O0 ):#line:259
|
||||
global globalExitFlag ,cks ,index #line:260
|
||||
logger .info (f'京东账户{OO000OO00OO0OO0O0.userIdx}[{OO000OO00OO0OO0O0.name}]开始邀请 --------')#line:261
|
||||
globalExitFlag =False #line:262
|
||||
OO000OO00OO0OO0O0 .getActivityPage ()#line:263
|
||||
if globalExitFlag :#line:264
|
||||
return #line:265
|
||||
OO000OO00OO0OO0O0 .getShopOpenCardInfo ()#line:266
|
||||
if not globalExitFlag :#line:267
|
||||
OO000OO00OO0OO0O0 .firstInvite ()#line:268
|
||||
if OO000OO00OO0OO0O0 .black :#line:269
|
||||
logger .info (OO000OO00OO0OO0O0 .name +'黑号不助力了')#line:270
|
||||
return #line:271
|
||||
for OO0000000O0000000 in OO000OO00OO0OO0O0 .stageReward :#line:273
|
||||
if OO0000000O0000000 ['rewardStatus']<=2 and OO000OO00OO0OO0O0 .successCount >=OO0000000O0000000 ['inviteNum']:#line:274
|
||||
OO000OO00OO0OO0O0 .getInviteReward (OO0000000O0000000 )#line:275
|
||||
if OO000OO00OO0OO0O0 .needHelp :#line:277
|
||||
for OO0OO0O0OO0O0000O in cks :#line:278
|
||||
index =cks .index (OO0OO0O0OO0O0000O )#line:279
|
||||
OO00O000OO0OOO00O =Userinfo (OO0OO0O0OO0O0000O )#line:280
|
||||
OO00O000OO0OOO00O .joinMember (OO000OO00OO0OO0O0 )#line:281
|
||||
for OO0000000O0000000 in OO000OO00OO0OO0O0 .stageReward :#line:282
|
||||
if OO0000000O0000000 ['rewardStatus']<=2 and OO000OO00OO0OO0O0 .successCount >=OO0000000O0000000 ['inviteNum']:#line:283
|
||||
OO000OO00OO0OO0O0 .getInviteReward (OO0000000O0000000 )#line:284
|
||||
if OO000OO00OO0OO0O0 .successCount >=OO000OO00OO0OO0O0 .needInviteNum :#line:285
|
||||
return #line:286
|
||||
time .sleep (3 )#line:287
|
||||
globalExitFlag =True #line:288
|
||||
else :#line:290
|
||||
logger .info (f'京东账户{OO000OO00OO0OO0O0.userIdx}[{OO000OO00OO0OO0O0.name}]助力已满,无需助力')#line:291
|
||||
def postUrl (O0O0OO0O0O0O000OO ,OO00O000OO00OOOOO ,O0O0000O0O0000000 ,O00000000OOO0O0OO ,body =''):#line:294
|
||||
O000O00OO0OOO0OO0 ={'Accept':'*/*','Accept-Encoding':'gzip, deflate, br','Accept-Language':'zh-CN,zh-Hans;q=0.9','Connection':'keep-alive','Cookie':OO00O000OO00OOOOO ,'Host':'api.m.jd.com','Referer':'https://prodev.m.jd.com/','User-Agent':O0O0000O0O0000000 }#line:304
|
||||
if O00000000OOO0O0OO =='get':#line:305
|
||||
OO0OO00O0OOOOOOO0 =requests .get (url =O0O0OO0O0O0O000OO ,headers =O000O00OO0OOO0OO0 )#line:306
|
||||
return OO0OO00O0OOOOOOO0 .text #line:307
|
||||
if O00000000OOO0O0OO =='post':#line:308
|
||||
O000O00OO0OOO0OO0 ["Content-Type"]="application/json"#line:309
|
||||
OO0OO00O0OOOOOOO0 =requests .post (url =O0O0OO0O0O0O000OO ,headers =O000O00OO0OOO0OO0 ,data =body )#line:310
|
||||
return OO0OO00O0OOOOOOO0 .text #line:311
|
||||
def getUrl (O0OO0O000O0OO00O0 ,OO0O0OOOO000OOO00 ,O00OOO0000OOOOO00 ):#line:314
|
||||
O0OOO0OO000OO00O0 =f'https://api.m.jd.com/api?client=&clientVersion=&appid={Appid}&t={get_time()}&functionId={O0OO0O000O0OO00O0}&'#line:315
|
||||
OOO00OO0OO00000OO =O0OOO0OO000OO00O0 +'body='+json .dumps (OO0O0OOOO000OOO00 )+f'&openid=-1&code={activityId}&invitePin={O00OOO0000OOOOO00}'#line:316
|
||||
return OOO00OO0OO00000OO #line:317
|
||||
if __name__ =='__main__':#line:320
|
||||
async def main ():#line:321
|
||||
global cks ,inviterList ,activityId #line:322
|
||||
try :#line:323
|
||||
cks =os .environ ['JD_COOKIE'].split ('&')#line:324
|
||||
except :#line:325
|
||||
try :#line:326
|
||||
with open (os .path .join (os .path .dirname (__file__ ),'cklist.txt'),'r')as O00O0O0OO0O0OOOOO :#line:327
|
||||
cks =O00O0O0OO0O0OOOOO .read ().split ('\n')#line:328
|
||||
except FileNotFoundError :#line:329
|
||||
logger .info ('没有找到该路径下的ck:'+os .path .join (os .path .dirname (__file__ ),'cklist.txt'))#line:330
|
||||
sys .exit ()#line:331
|
||||
O0O0O0O0OOO0OOOOO =os .environ .get ('yhypin',"")#line:332
|
||||
if O0O0O0O0OOO0OOOOO =="":#line:333
|
||||
logger .info ('没有填写yhypin:export yhypin="pt_pin"')#line:334
|
||||
sys .exit ()#line:335
|
||||
O0O0O0O0OOO0OOOOO =O0O0O0O0OOO0OOOOO .split (',')#line:336
|
||||
set (O0O0O0O0OOO0OOOOO )#line:337
|
||||
activityId =os .environ .get ('yhyauthorCode',"")#line:338
|
||||
if activityId =="":#line:339
|
||||
logger .info ('没有填写yhyauthorCode:export yhyauthorCode="xxxx"')#line:340
|
||||
sys .exit ()#line:341
|
||||
try :#line:342
|
||||
activityId =activityId .split ('code=')[1 ].split ('&')[0 ]#line:343
|
||||
except :#line:344
|
||||
pass #line:345
|
||||
OO00OO0OOO00O00O0 =f'https://prodev.m.jd.com/mall/active/dVF7gQUVKyUcuSsVhuya5d2XD4F/index.html?code={activityId}'#line:346
|
||||
logger .info (f'活动链接:{OO00OO0OOO00O00O0}')#line:347
|
||||
inviterList =[OOOO0O0O000000OO0 for OOOO0O0O000000OO0 in cks for O0O0O00OO0O0O0OOO in O0O0O0O0OOO0OOOOO if O0O0O00OO0O0O0OOO in OOOO0O0O000000OO0 ]#line:348
|
||||
logger .info (f'一共找到{len(inviterList)}个车头pin')#line:349
|
||||
if len (inviterList )==0 :#line:350
|
||||
sys .exit ()#line:351
|
||||
for O0OO0OOOO00OO0OOO in inviterList :#line:352
|
||||
OO00O0OOO000000O0 =Userinfo (O0OO0OOOO00OO0OOO )#line:353
|
||||
await OO00O0OOO000000O0 .userInviteTask ()#line:354
|
||||
if globalExitFlag :#line:355
|
||||
break #line:356
|
||||
loop =asyncio .get_event_loop ()#line:358
|
||||
loop .run_until_complete (main ())#line:359
|
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
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
File diff suppressed because one or more lines are too long
|
@ -0,0 +1,579 @@
|
|||
/*
|
||||
入口>京东极速版>首页>签到免单
|
||||
京东极速版,先下单,第二天开始签到
|
||||
18 8,20 * * * jd_speed_signfree.js 签到免单
|
||||
*/
|
||||
const $ = new Env('京东极速版签到免单');
|
||||
const notify = $.isNode() ? require('./sendNotify') : '';
|
||||
//Node.js用户请在jdCookie.js处填写京东ck;
|
||||
const jdCookieNode = $.isNode() ? require('./jdCookie.js') : '';
|
||||
const UA = $.isNode() ? (process.env.JS_USER_AGENT ? process.env.JS_USER_AGENT : (require('./JS_USER_AGENTS').USER_AGENT)) : ($.getdata('JSUA') ? $.getdata('JSUA') : "'jdltapp;iPad;3.1.0;14.4;network/wifi;Mozilla/5.0 (iPad; CPU OS 14_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1")
|
||||
//IOS等用户直接用NobyDa的jd cookie
|
||||
let cookiesArr = [],
|
||||
cookie,
|
||||
msg = []
|
||||
|
||||
const activityId = 'PiuLvM8vamONsWzC0wqBGQ'
|
||||
|
||||
if ($.isNode()) {
|
||||
console.log('\n入口>京东极速版>首页>签到免单')
|
||||
console.log('京东极速版,先下单,第二天开始签到')
|
||||
console.log('请自行测试是否有效!!!')
|
||||
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/';
|
||||
!(async () => {
|
||||
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;
|
||||
$.nickName = '';
|
||||
message = '';
|
||||
console.log(`\n******开始【京东账号${$.index}】${$.nickName || $.UserName}*********\n`);
|
||||
msg.push(($.nickName || $.UserName) + ':')
|
||||
first_flag = true
|
||||
await sign_all()
|
||||
}
|
||||
}
|
||||
if (msg.length) {
|
||||
// console.log('有消息,推送消息')
|
||||
// await notify.sendNotify($.name, msg.join('\n'))
|
||||
} else {
|
||||
console.error('无消息,推送错误')
|
||||
// await notify.sendNotify($.name + '错误!!', "无消息可推送!!")
|
||||
}
|
||||
})()
|
||||
.catch((e) => {
|
||||
$.log('', `❌ ${$.name}, 失败! 原因: ${e}!`, '')
|
||||
notify.sendNotify($.name + '异常!!', msg.join('\n') + '\n' + e)
|
||||
})
|
||||
.finally(() => {
|
||||
$.msg($.name, '', `结束`);
|
||||
$.done();
|
||||
})
|
||||
async function sign_all() {
|
||||
await query()
|
||||
if (!$.signFreeOrderInfoList){
|
||||
return
|
||||
}
|
||||
await $.wait(3000)
|
||||
for (const order of $.signFreeOrderInfoList) {
|
||||
// console.debug('now:', order)
|
||||
$.productName = order.productName
|
||||
await sign(order.orderId)
|
||||
await $.wait(3000)
|
||||
}
|
||||
await $.wait(3000)
|
||||
await query()
|
||||
await $.wait(3000)
|
||||
for (const order of $.signFreeOrderInfoList) {
|
||||
// console.debug('2nd now:', order)
|
||||
if (order.needSignDays == order.hasSignDays) {
|
||||
console.log(order.productName, '可提现,执行提现')
|
||||
$.productName = order.productName
|
||||
await cash(order.orderId)
|
||||
await $.wait(3000)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function query() {
|
||||
return new Promise(resolve => {
|
||||
$.get(taskGetUrl("signFreeHome", { "linkId": activityId }), async (err, resp, data) => {
|
||||
try {
|
||||
if (err) {
|
||||
console.error(`${JSON.stringify(err)}`)
|
||||
} else {
|
||||
// console.debug('query:', data)
|
||||
data = JSON.parse(data)
|
||||
$.signFreeOrderInfoList = data.data.signFreeOrderInfoList
|
||||
if (data.success == true) {
|
||||
if (!data.data.signFreeOrderInfoList) {
|
||||
console.log("没有需要签到的商品,请到京东极速版[签到免单]购买商品");
|
||||
// msg.push("没有需要签到的商品,请到京东极速版[签到免单]购买商品")
|
||||
} else {
|
||||
$.signFreeOrderInfoList = data.data.signFreeOrderInfoList
|
||||
if (first_flag) {
|
||||
first_flag = false
|
||||
console.log("脚本也许随时失效,请注意");
|
||||
// msg.push("脚本也许随时失效,请注意")
|
||||
if (data.data.risk == false) {
|
||||
console.log("风控用户,可能有异常");
|
||||
// msg.push("风控用户,可能有异常")
|
||||
}
|
||||
}
|
||||
}
|
||||
}else{
|
||||
console.error("失败");
|
||||
}
|
||||
}
|
||||
} catch (e) {
|
||||
$.logErr(e, resp)
|
||||
} finally {
|
||||
resolve(data);
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
function sign(orderId) {
|
||||
return new Promise(resolve => {
|
||||
// console.debug('sign orderId:', orderId)
|
||||
$.post(taskPostUrl("signFreeSignIn", { "linkId": activityId, "orderId": orderId }), async (err, resp, data) => {
|
||||
try {
|
||||
if (err) {
|
||||
console.error(`${JSON.stringify(err)}`)
|
||||
} else {
|
||||
// console.debug('sign:', data)
|
||||
data = JSON.parse(data)
|
||||
let msg_temp
|
||||
if (data.success) {
|
||||
msg_temp = $.productName + ' 签到成功'
|
||||
} else {
|
||||
msg_temp = $.productName + ' ' + (data.errMsg || '未知错误')
|
||||
}
|
||||
console.log(msg_temp)
|
||||
msg.push(msg_temp)
|
||||
}
|
||||
} catch (e) {
|
||||
$.logErr(e, resp)
|
||||
} finally {
|
||||
resolve(data);
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
function cash(orderId) {
|
||||
return new Promise(resolve => {
|
||||
// console.debug('cash orderId:', orderId)
|
||||
$.post(taskPostUrl("signFreePrize", { "linkId": activityId, "orderId": orderId, "prizeType": 2 }), async (err, resp, data) => {
|
||||
try {
|
||||
if (err) {
|
||||
console.error(`${JSON.stringify(err)}`)
|
||||
} else {
|
||||
// console.debug('cash:', data)
|
||||
data = JSON.parse(data)
|
||||
let msg_temp
|
||||
if (data.success) {
|
||||
msg_temp = $.productName + ' 提现成功'
|
||||
} else {
|
||||
msg_temp = $.productName + ' ' + (data.errMsg || '未知错误')
|
||||
}
|
||||
console.log(msg_temp)
|
||||
msg.push(msg_temp)
|
||||
}
|
||||
} catch (e) {
|
||||
$.logErr(e, resp)
|
||||
} finally {
|
||||
resolve(data);
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
function taskPostUrl(function_id, body) {
|
||||
return {
|
||||
url: `${JD_API_HOST}`,
|
||||
body: `functionId=${function_id}&body=${escape(JSON.stringify(body))}&_t=${new Date()}&appid=activities_platform`,
|
||||
headers: {
|
||||
'Cookie': cookie,
|
||||
'Host': 'api.m.jd.com',
|
||||
// 'Connection': 'keep-alive',
|
||||
'Content-Type': 'application/x-www-form-urlencoded',
|
||||
"User-Agent": UA,
|
||||
'accept-language': 'en-US,zh-CN;q=0.9',
|
||||
'accept-encoding': 'gzip, deflate, br',
|
||||
"referer": "https://signfree.jd.com/?activityId=" + activityId
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function taskGetUrl(function_id, body) {
|
||||
return {
|
||||
url: `${JD_API_HOST}?functionId=${function_id}&body=${escape(JSON.stringify(body))}&_t=${new Date()}&appid=activities_platform`,
|
||||
headers: {
|
||||
'Cookie': cookie,
|
||||
'Host': 'api.m.jd.com',
|
||||
'Accept': 'application/json, text/plain, */*',
|
||||
'origin': 'https://signfree.jd.com',
|
||||
// 'Connection': 'keep-alive',
|
||||
'user-agent': UA,
|
||||
'accept-language': 'en-US,zh-CN;q=0.9',
|
||||
'accept-encoding': 'gzip, deflate, br',
|
||||
"referer": "https://signfree.jd.com/?activityId=" + activityId
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
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)
|
||||
}
|
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
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
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
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
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue