del
parent
4a155d648c
commit
fc943dd592
|
@ -1,554 +0,0 @@
|
||||||
/*
|
|
||||||
由于 canvas 依赖系统底层需要编译且预编译包在 github releases 上,改用另一个纯 js 解码图片。若想继续使用 canvas 可调用 runWithCanvas 。
|
|
||||||
|
|
||||||
添加 injectToRequest 用以快速修复需验证的请求。eg: $.get=injectToRequest($.get.bind($))
|
|
||||||
*/
|
|
||||||
const https = require('https');
|
|
||||||
const http = require('http');
|
|
||||||
const stream = require('stream');
|
|
||||||
const { promisify } = require('util');
|
|
||||||
const pipelineAsync = promisify(stream.pipeline);
|
|
||||||
const zlib = require('zlib');
|
|
||||||
const vm = require('vm');
|
|
||||||
const PNG = require('png-js');
|
|
||||||
const UA = require('./USER_AGENTS.js').USER_AGENT;
|
|
||||||
|
|
||||||
|
|
||||||
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) => {
|
|
||||||
try {
|
|
||||||
this.decode((pixels) => {
|
|
||||||
this.pixels = pixels;
|
|
||||||
resolve();
|
|
||||||
});
|
|
||||||
} catch (e) {
|
|
||||||
console.info(e)
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
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() {
|
|
||||||
try {
|
|
||||||
await this.bg.decodeToPixels();
|
|
||||||
await this.patch.decodeToPixels();
|
|
||||||
|
|
||||||
return this.recognize();
|
|
||||||
} catch (e) {
|
|
||||||
console.info(e)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
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 = '61.49.99.122';
|
|
||||||
|
|
||||||
class JDJRValidator {
|
|
||||||
constructor() {
|
|
||||||
this.data = {};
|
|
||||||
this.x = 0;
|
|
||||||
this.t = Date.now();
|
|
||||||
}
|
|
||||||
|
|
||||||
async run(scene) {
|
|
||||||
try {
|
|
||||||
const tryRecognize = async () => {
|
|
||||||
const x = await this.recognize(scene);
|
|
||||||
|
|
||||||
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());
|
|
||||||
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.count("验证失败");
|
|
||||||
// console.count(JSON.stringify(result));
|
|
||||||
await sleep(300);
|
|
||||||
return await this.run(scene);
|
|
||||||
}
|
|
||||||
} catch (e) {
|
|
||||||
console.info(e)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
async recognize(scene) {
|
|
||||||
try {
|
|
||||||
const data = await JDJRValidator.jsonp('/slide/g.html', {e: ''}, 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);
|
|
||||||
const puzzleX = await re.run();
|
|
||||||
|
|
||||||
if (puzzleX > 0) {
|
|
||||||
this.data = {
|
|
||||||
c: data.challenge,
|
|
||||||
w: re.w,
|
|
||||||
e: '',
|
|
||||||
s: '',
|
|
||||||
o: '',
|
|
||||||
};
|
|
||||||
this.x = puzzleX;
|
|
||||||
}
|
|
||||||
return puzzleX;
|
|
||||||
} catch (e) {
|
|
||||||
console.info(e)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
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.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 = `http://${SERVER}${api}?${query}`;
|
|
||||||
const headers = {
|
|
||||||
'Accept': '*/*',
|
|
||||||
'Accept-Encoding': 'gzip,deflate,br',
|
|
||||||
'Accept-Language': 'zh-CN,en-US',
|
|
||||||
'Connection': 'keep-alive',
|
|
||||||
'Host': SERVER,
|
|
||||||
'Proxy-Connection': 'keep-alive',
|
|
||||||
'Referer': 'https://h5.m.jd.com/babelDiy/Zeus/2wuqXrZrhygTQzYA7VufBEpj4amH/index.html',
|
|
||||||
'User-Agent': UA,
|
|
||||||
};
|
|
||||||
const req = http.get(url, {headers}, (response) => {
|
|
||||||
let res = response;
|
|
||||||
if (res.headers['content-encoding'] === 'gzip') {
|
|
||||||
const unzipStream = new stream.PassThrough();
|
|
||||||
pipelineAsync(
|
|
||||||
response,
|
|
||||||
zlib.createGunzip(),
|
|
||||||
unzipStream,
|
|
||||||
);
|
|
||||||
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 = 5;
|
|
||||||
|
|
||||||
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);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// new JDJRValidator().run();
|
|
||||||
// new JDJRValidator().report(1000);
|
|
||||||
// console.log(getCoordinate(new MousePosFaker(100).run()));
|
|
||||||
|
|
||||||
function injectToRequest2(fn, scene = 'cww') {
|
|
||||||
return (opts, cb) => {
|
|
||||||
fn(opts, async (err, resp, data) => {
|
|
||||||
try {
|
|
||||||
if (err) {
|
|
||||||
console.error('验证请求失败.');
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (data.search('验证') > -1) {
|
|
||||||
console.log('JDJR验证中......');
|
|
||||||
const res = await new JDJRValidator().run(scene);
|
|
||||||
if (res) {
|
|
||||||
opts.url += `&validate=${res.validate}`;
|
|
||||||
}
|
|
||||||
fn(opts, cb);
|
|
||||||
} else {
|
|
||||||
cb(err, resp, data);
|
|
||||||
}
|
|
||||||
} catch (e) {
|
|
||||||
console.info(e)
|
|
||||||
}
|
|
||||||
});
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
async function injectToRequest(scene = 'cww') {
|
|
||||||
console.log('JDJR验证中......');
|
|
||||||
const res = await new JDJRValidator().run(scene);
|
|
||||||
return `&validate=${res.validate}`
|
|
||||||
}
|
|
||||||
|
|
||||||
module.exports = {
|
|
||||||
sleep,
|
|
||||||
injectToRequest,
|
|
||||||
injectToRequest2
|
|
||||||
}
|
|
|
@ -1,540 +0,0 @@
|
||||||
const https = require('https');
|
|
||||||
const http = require('http');
|
|
||||||
const stream = require('stream');
|
|
||||||
const { promisify } = require('util');
|
|
||||||
const pipelineAsync = promisify(stream.pipeline);
|
|
||||||
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();
|
|
||||||
pipelineAsync(
|
|
||||||
response,
|
|
||||||
zlib.createGunzip(),
|
|
||||||
unzipStream,
|
|
||||||
);
|
|
||||||
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;
|
|
|
@ -1,92 +0,0 @@
|
||||||
const USER_AGENTS = [
|
|
||||||
'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',
|
|
||||||
'jdltapp;android;3.1.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.1.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.1.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.1.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.1.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.1.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.1.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.1.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.1.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.1.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.1.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.1.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;2.1.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|2.1.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.1.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.1.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.1.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.1.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.1.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.1.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.1.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.1.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.1.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.1.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.1.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.1.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.1.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.1.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.1.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.1.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.1.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.1.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.1.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.1.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.1.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.1.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.1.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.1.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.1.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.1.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.1.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.1.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.1.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.1.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.1.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.1.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.1.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.1.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.1.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.1.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.1.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.1.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.1.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.1.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.1.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.1.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.1.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.1.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.1.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.1.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.1.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.1.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.1.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.1.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.1.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.1.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.1.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.1.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.1.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.1.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.1.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.1.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.1.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.1.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.1.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.1.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.1.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.1.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.1.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.1.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.1.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.1.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.1.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.1.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.1.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.1.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.1.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.1.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.1.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.1.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.1.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.1.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.1.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.1.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.1.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.1.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.1.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.1.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.1.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.1.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.1.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.1.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.1.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.1.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.1.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.1.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.1.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.1.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.1.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.1.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.1.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.1.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.1.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.1.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.1.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.1.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.1.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.1.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.1.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.1.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.1.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.1.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.1.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.1.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.1.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.1.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.1.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.1.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.1.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.1.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.1.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.1.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.1.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.1.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.1.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.1.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.1.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.1.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.1.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.1.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.1.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.1.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.1.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.1.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.1.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.1.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.1.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.1.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,HelloWorld: true
|
|
||||||
}
|
|
21
SECURITY.md
21
SECURITY.md
|
@ -1,21 +0,0 @@
|
||||||
# Security Policy
|
|
||||||
|
|
||||||
## Supported Versions
|
|
||||||
|
|
||||||
Use this section to tell people about which versions of your project are
|
|
||||||
currently being supported with security updates.
|
|
||||||
|
|
||||||
| Version | Supported |
|
|
||||||
| ------- | ------------------ |
|
|
||||||
| 5.1.x | :white_check_mark: |
|
|
||||||
| 5.0.x | :x: |
|
|
||||||
| 4.0.x | :white_check_mark: |
|
|
||||||
| < 4.0 | :x: |
|
|
||||||
|
|
||||||
## Reporting a Vulnerability
|
|
||||||
|
|
||||||
Use this section to tell people how to report a vulnerability.
|
|
||||||
|
|
||||||
Tell them where to go, how often they can expect to get an update on a
|
|
||||||
reported vulnerability, what to expect if the vulnerability is accepted or
|
|
||||||
declined, etc.
|
|
|
@ -1,237 +0,0 @@
|
||||||
import axios from "axios";
|
|
||||||
import {format} from 'date-fns';
|
|
||||||
import * as dotenv from "dotenv";
|
|
||||||
import {Md5} from "ts-md5";
|
|
||||||
|
|
||||||
const CryptoJS = require('crypto-js')
|
|
||||||
dotenv.config()
|
|
||||||
|
|
||||||
let fingerprint: string | number, token: string = '', enCryptMethodJD: any;
|
|
||||||
|
|
||||||
const USER_AGENTS: Array<string> = [
|
|
||||||
"jdapp;android;10.0.2;10;network/wifi;Mozilla/5.0 (Linux; Android 10; ONEPLUS A5010 Build/QKQ1.191014.012; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/77.0.3865.120 MQQBrowser/6.2 TBS/045230 Mobile Safari/537.36",
|
|
||||||
"jdapp;iPhone;10.0.2;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1",
|
|
||||||
"jdapp;android;10.0.2;9;network/4g;Mozilla/5.0 (Linux; Android 9; Mi Note 3 Build/PKQ1.181007.001; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/66.0.3359.126 MQQBrowser/6.2 TBS/045131 Mobile Safari/537.36",
|
|
||||||
"jdapp;android;10.0.2;10;network/wifi;Mozilla/5.0 (Linux; Android 10; GM1910 Build/QKQ1.190716.003; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/77.0.3865.120 MQQBrowser/6.2 TBS/045230 Mobile Safari/537.36",
|
|
||||||
"jdapp;android;10.0.2;9;network/wifi;Mozilla/5.0 (Linux; Android 9; 16T Build/PKQ1.190616.001; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/66.0.3359.126 MQQBrowser/6.2 TBS/044942 Mobile Safari/537.36",
|
|
||||||
"jdapp;iPhone;10.0.2;13.6;network/wifi;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.0.2;13.6;network/wifi;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.0.2;13.5;network/wifi;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.0.2;14.1;network/wifi;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.0.2;13.3;network/wifi;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.0.2;13.7;network/wifi;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;10.0.2;14.1;network/wifi;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.0.2;13.3;network/wifi;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.0.2;13.4;network/wifi;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.0.2;14.3;network/wifi;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;10.0.2;9;network/wifi;Mozilla/5.0 (Linux; Android 9; MI 6 Build/PKQ1.190118.001; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/66.0.3359.126 MQQBrowser/6.2 TBS/044942 Mobile Safari/537.36",
|
|
||||||
"jdapp;android;10.0.2;11;network/wifi;Mozilla/5.0 (Linux; Android 11; Redmi K30 5G Build/RKQ1.200826.002; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/77.0.3865.120 MQQBrowser/6.2 TBS/045511 Mobile Safari/537.36",
|
|
||||||
"jdapp;iPhone;10.0.2;11.4;network/wifi;Mozilla/5.0 (iPhone; CPU iPhone OS 11_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15F79",
|
|
||||||
"jdapp;android;10.0.2;10;;network/wifi;Mozilla/5.0 (Linux; Android 10; M2006J10C Build/QP1A.190711.020; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/77.0.3865.120 MQQBrowser/6.2 TBS/045230 Mobile Safari/537.36",
|
|
||||||
"jdapp;android;10.0.2;10;network/wifi;Mozilla/5.0 (Linux; Android 10; M2006J10C Build/QP1A.190711.020; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/77.0.3865.120 MQQBrowser/6.2 TBS/045230 Mobile Safari/537.36",
|
|
||||||
"jdapp;android;10.0.2;10;network/wifi;Mozilla/5.0 (Linux; Android 10; ONEPLUS A6000 Build/QKQ1.190716.003; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/77.0.3865.120 MQQBrowser/6.2 TBS/045224 Mobile Safari/537.36",
|
|
||||||
"jdapp;android;10.0.2;9;network/wifi;Mozilla/5.0 (Linux; Android 9; MHA-AL00 Build/HUAWEIMHA-AL00; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/66.0.3359.126 MQQBrowser/6.2 TBS/044942 Mobile Safari/537.36",
|
|
||||||
"jdapp;android;10.0.2;8.1.0;network/wifi;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/66.0.3359.126 MQQBrowser/6.2 TBS/044942 Mobile Safari/537.36",
|
|
||||||
"jdapp;android;10.0.2;8.0.0;network/wifi;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/66.0.3359.126 MQQBrowser/6.2 TBS/044942 Mobile Safari/537.36",
|
|
||||||
"jdapp;iPhone;10.0.2;14.0.1;network/wifi;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;10.0.2;10;network/wifi;Mozilla/5.0 (Linux; Android 10; LYA-AL00 Build/HUAWEILYA-AL00L; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/77.0.3865.120 MQQBrowser/6.2 TBS/045230 Mobile Safari/537.36",
|
|
||||||
"jdapp;iPhone;10.0.2;14.2;network/wifi;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.0.2;14.3;network/wifi;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.0.2;14.2;network/wifi;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.0.2;8.1.0;network/wifi;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/66.0.3359.126 MQQBrowser/6.2 TBS/045131 Mobile Safari/537.36",
|
|
||||||
"jdapp;android;10.0.2;10;network/wifi;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/77.0.3865.120 MQQBrowser/6.2 TBS/045227 Mobile Safari/537.36",
|
|
||||||
"jdapp;iPhone;10.0.2;14.3;network/wifi;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.0.2;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1",
|
|
||||||
"jdapp;android;10.0.2;11;network/wifi;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/77.0.3865.120 MQQBrowser/6.2 TBS/045513 Mobile Safari/537.36",
|
|
||||||
"jdapp;android;10.0.2;10;network/wifi;Mozilla/5.0 (Linux; Android 10; MI 8 Build/QKQ1.190828.002; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/77.0.3865.120 MQQBrowser/6.2 TBS/045227 Mobile Safari/537.36",
|
|
||||||
"jdapp;iPhone;10.0.2;14.1;network/wifi;Mozilla/5.0 (iPhone; CPU iPhone OS 14_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1",
|
|
||||||
]
|
|
||||||
|
|
||||||
function TotalBean(cookie: string) {
|
|
||||||
return {
|
|
||||||
cookie: cookie,
|
|
||||||
isLogin: true,
|
|
||||||
nickName: ''
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function getRandomNumberByRange(start: number, end: number) {
|
|
||||||
return Math.floor(Math.random() * (end - start) + start)
|
|
||||||
}
|
|
||||||
|
|
||||||
let USER_AGENT = USER_AGENTS[getRandomNumberByRange(0, USER_AGENTS.length)];
|
|
||||||
|
|
||||||
async function getBeanShareCode(cookie: string) {
|
|
||||||
let {data} = await axios.post('https://api.m.jd.com/client.action',
|
|
||||||
`functionId=plantBeanIndex&body=${escape(
|
|
||||||
JSON.stringify({version: "9.0.0.1", "monitor_source": "plant_app_plant_index", "monitor_refer": ""})
|
|
||||||
)}&appid=ld&client=apple&area=5_274_49707_49973&build=167283&clientVersion=9.1.0`, {
|
|
||||||
headers: {
|
|
||||||
Cookie: cookie,
|
|
||||||
Host: "api.m.jd.com",
|
|
||||||
Accept: "*/*",
|
|
||||||
Connection: "keep-alive",
|
|
||||||
"User-Agent": USER_AGENT
|
|
||||||
}
|
|
||||||
})
|
|
||||||
if (data.data?.jwordShareInfo?.shareUrl)
|
|
||||||
return data.data.jwordShareInfo.shareUrl.split('Uuid=')![1]
|
|
||||||
else
|
|
||||||
return ''
|
|
||||||
}
|
|
||||||
|
|
||||||
async function getFarmShareCode(cookie: string) {
|
|
||||||
let {data} = await axios.post('https://api.m.jd.com/client.action?functionId=initForFarm', `body=${escape(JSON.stringify({"version": 4}))}&appid=wh5&clientVersion=9.1.0`, {
|
|
||||||
headers: {
|
|
||||||
"cookie": cookie,
|
|
||||||
"origin": "https://home.m.jd.com",
|
|
||||||
"referer": "https://home.m.jd.com/myJd/newhome.action",
|
|
||||||
"User-Agent": USER_AGENT,
|
|
||||||
"Content-Type": "application/x-www-form-urlencoded"
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
if (data.farmUserPro)
|
|
||||||
return data.farmUserPro.shareCode
|
|
||||||
else
|
|
||||||
return ''
|
|
||||||
}
|
|
||||||
|
|
||||||
function requireConfig() {
|
|
||||||
let cookiesArr: string[] = []
|
|
||||||
return new Promise(resolve => {
|
|
||||||
console.log('开始获取配置文件\n')
|
|
||||||
const jdCookieNode = require('./jdCookie.js');
|
|
||||||
Object.keys(jdCookieNode).forEach((item) => {
|
|
||||||
if (jdCookieNode[item]) {
|
|
||||||
cookiesArr.push(jdCookieNode[item])
|
|
||||||
}
|
|
||||||
})
|
|
||||||
console.log(`共${cookiesArr.length}个京东账号\n`)
|
|
||||||
resolve(cookiesArr)
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
function wait(timeout: number) {
|
|
||||||
return new Promise(resolve => {
|
|
||||||
setTimeout(resolve, timeout)
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
async function requestAlgo(appId = 10032) {
|
|
||||||
fingerprint = generateFp();
|
|
||||||
return new Promise<void>(async resolve => {
|
|
||||||
let {data} = await axios.post('https://cactus.jd.com/request_algo?g_ty=ajax', {
|
|
||||||
"version": "1.0",
|
|
||||||
"fp": fingerprint,
|
|
||||||
"appId": appId,
|
|
||||||
"timestamp": Date.now(),
|
|
||||||
"platform": "web",
|
|
||||||
"expandParams": ""
|
|
||||||
}, {
|
|
||||||
"headers": {
|
|
||||||
'Authority': 'cactus.jd.com',
|
|
||||||
'Pragma': 'no-cache',
|
|
||||||
'Cache-Control': 'no-cache',
|
|
||||||
'Accept': 'application/json',
|
|
||||||
'User-Agent': USER_AGENT,
|
|
||||||
'Content-Type': 'application/json',
|
|
||||||
'Origin': 'https://st.jingxi.com',
|
|
||||||
'Sec-Fetch-Site': 'cross-site',
|
|
||||||
'Sec-Fetch-Mode': 'cors',
|
|
||||||
'Sec-Fetch-Dest': 'empty',
|
|
||||||
'Referer': 'https://st.jingxi.com/',
|
|
||||||
'Accept-Language': 'zh-CN,zh;q=0.9,zh-TW;q=0.8,en;q=0.7'
|
|
||||||
},
|
|
||||||
})
|
|
||||||
if (data['status'] === 200) {
|
|
||||||
token = data.data.result.tk;
|
|
||||||
console.log('token:', token)
|
|
||||||
let enCryptMethodJDString = data.data.result.algo;
|
|
||||||
if (enCryptMethodJDString) enCryptMethodJD = new Function(`return ${enCryptMethodJDString}`)();
|
|
||||||
} else {
|
|
||||||
console.log(`fp: ${fingerprint}`)
|
|
||||||
console.log('request_algo 签名参数API请求失败:')
|
|
||||||
}
|
|
||||||
resolve()
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
function generateFp() {
|
|
||||||
let e = "0123456789";
|
|
||||||
let a = 13;
|
|
||||||
let i = '';
|
|
||||||
for (; a--;)
|
|
||||||
i += e[Math.random() * e.length | 0];
|
|
||||||
return (i + Date.now()).slice(0, 16)
|
|
||||||
}
|
|
||||||
|
|
||||||
function getQueryString(url: string, name: string) {
|
|
||||||
let reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");
|
|
||||||
let r = url.split('?')[1].match(reg);
|
|
||||||
if (r != null) return unescape(r[2]);
|
|
||||||
return '';
|
|
||||||
}
|
|
||||||
|
|
||||||
function decrypt(stk: string, url: string, appId: number) {
|
|
||||||
const timestamp = (format(new Date(), 'yyyyMMddhhmmssSSS'))
|
|
||||||
let hash1: string;
|
|
||||||
if (fingerprint && token && enCryptMethodJD) {
|
|
||||||
hash1 = enCryptMethodJD(token, fingerprint.toString(), timestamp.toString(), appId.toString(), CryptoJS).toString(CryptoJS.enc.Hex);
|
|
||||||
} else {
|
|
||||||
const random = '5gkjB6SpmC9s';
|
|
||||||
token = `tk01wcdf61cb3a8nYUtHcmhSUFFCfddDPRvKvYaMjHkxo6Aj7dhzO+GXGFa9nPXfcgT+mULoF1b1YIS1ghvSlbwhE0Xc`;
|
|
||||||
fingerprint = 9686767825751161;
|
|
||||||
const str = `${token}${fingerprint}${timestamp}${appId}${random}`;
|
|
||||||
hash1 = CryptoJS.SHA512(str, token).toString(CryptoJS.enc.Hex);
|
|
||||||
}
|
|
||||||
let st: string = '';
|
|
||||||
stk.split(',').map((item, index) => {
|
|
||||||
st += `${item}:${getQueryString(url, item)}${index === stk.split(',').length - 1 ? '' : '&'}`;
|
|
||||||
})
|
|
||||||
const hash2 = CryptoJS.HmacSHA256(st, hash1.toString()).toString(CryptoJS.enc.Hex);
|
|
||||||
return encodeURIComponent(["".concat(timestamp.toString()), "".concat(fingerprint.toString()), "".concat(appId.toString()), "".concat(token), "".concat(hash2)].join(";"))
|
|
||||||
}
|
|
||||||
|
|
||||||
function h5st(url: string, stk: string, params: object, appId: number = 10032) {
|
|
||||||
for (const [key, val] of Object.entries(params)) {
|
|
||||||
url += `&${key}=${val}`
|
|
||||||
}
|
|
||||||
url += '&h5st=' + decrypt(stk, url, appId)
|
|
||||||
return url
|
|
||||||
}
|
|
||||||
|
|
||||||
function getJxToken(cookie: string) {
|
|
||||||
function generateStr(input: number) {
|
|
||||||
let src = 'abcdefghijklmnopqrstuvwxyz1234567890';
|
|
||||||
let res = '';
|
|
||||||
for (let i = 0; i < input; i++) {
|
|
||||||
res += src[Math.floor(src.length * Math.random())];
|
|
||||||
}
|
|
||||||
return res;
|
|
||||||
}
|
|
||||||
|
|
||||||
let phoneId = generateStr(40);
|
|
||||||
let timestamp = Date.now().toString();
|
|
||||||
let nickname = cookie.match(/pt_pin=([^;]*)/)![1];
|
|
||||||
let jstoken = Md5.hashStr('' + decodeURIComponent(nickname) + timestamp + phoneId + 'tPOamqCuk9NLgVPAljUyIHcPRmKlVxDy');
|
|
||||||
return {
|
|
||||||
'strPgtimestamp': timestamp,
|
|
||||||
'strPhoneID': phoneId,
|
|
||||||
'strPgUUNum': jstoken
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
export default USER_AGENT
|
|
||||||
export {
|
|
||||||
TotalBean,
|
|
||||||
getBeanShareCode,
|
|
||||||
getFarmShareCode,
|
|
||||||
requireConfig,
|
|
||||||
wait,
|
|
||||||
getRandomNumberByRange,
|
|
||||||
requestAlgo,
|
|
||||||
decrypt,
|
|
||||||
getJxToken,
|
|
||||||
h5st
|
|
||||||
}
|
|
Loading…
Reference in New Issue