Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
shufflewzc committed Nov 13, 2021
1 parent 4e1d197 commit 5d79149
Show file tree
Hide file tree
Showing 9 changed files with 2,054 additions and 130 deletions.
9 changes: 8 additions & 1 deletion JDJRValidator_Smiek.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,16 @@ const pipelineAsync = promisify(stream.pipeline);
const zlib = require('zlib');
const vm = require('vm');
const PNG = require('png-js');
let UA = require('./USER_AGENTS.js').USER_AGENT;
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;
Expand Down
434 changes: 434 additions & 0 deletions jd_cfd_loop.js

Large diffs are not rendered by default.

885 changes: 885 additions & 0 deletions jd_cfd_mooncake.js

Large diffs are not rendered by default.

191 changes: 144 additions & 47 deletions jd_connoisseur.js

Large diffs are not rendered by default.

550 changes: 550 additions & 0 deletions jd_joy_park.js

Large diffs are not rendered by default.

84 changes: 5 additions & 79 deletions jd_jxmc.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 19 additions & 1 deletion jd_productZ4Brand.js
Original file line number Diff line number Diff line change
Expand Up @@ -140,10 +140,25 @@ async function doTask(){
'max':true,
'encryptAssignmentId':$.oneTask.encryptAssignmentId
});
} else if($.oneTask.assignmentType === 5) {
let signList = $.oneTask.ext.sign2 || [];
if (signList.length === 0) {
console.log(`任务:${$.oneTask.assignmentName},信息异常`);
}
if ($.oneTask.assignmentName.indexOf('首页下拉') !== -1) {
for (let j = 0; j < signList.length; j++) {
if (signList[j].status === 1) {
console.log(`任务:${$.oneTask.assignmentName},去执行,请稍稍`);
let itemId = signList[j].itemId;
$.runInfo = {'itemId':itemId};
await takeRequest('superBrandDoTask');
await $.wait(3000);
}
}
}
}
}
}

async function takeRequest(type) {
let url = ``;
let myRequest = ``;
Expand All @@ -160,6 +175,9 @@ async function takeRequest(type) {
}else{
url = `https://api.m.jd.com/api?functionId=superBrandDoTask&appid=ProductZ4Brand&client=wh5&t=${Date.now()}&body=%7B%22source%22:%22secondfloor%22,%22activityId%22:${$.activityId},%22encryptProjectId%22:%22${$.encryptProjectId}%22,%22encryptAssignmentId%22:%22${$.oneTask.encryptAssignmentId}%22,%22assignmentType%22:${$.oneTask.assignmentType},%22itemId%22:%22${$.runInfo.itemId}%22,%22actionType%22:0%7D`;
}
if($.oneTask.assignmentType === 5){
url = `https://api.m.jd.com/api?functionId=superBrandDoTask&appid=ProductZ4Brand&client=wh5&t=${Date.now()}&body=%7B%22source%22:%22secondfloor%22,%22activityId%22:${$.activityId},%22encryptProjectId%22:%22${$.encryptProjectId}%22,%22encryptAssignmentId%22:%22${$.oneTask.encryptAssignmentId}%22,%22assignmentType%22:${$.oneTask.assignmentType},%22itemId%22:%22${$.runInfo.itemId}%22,%22actionType%22:0,%22dropDownChannel%22:1%7D`;
}
break;
case 'superBrandTaskLottery':
url = `https://api.m.jd.com/api?functionId=superBrandTaskLottery&appid=ProductZ4Brand&client=wh5&t=${Date.now()}&body=%7B%22source%22:%22secondfloor%22,%22activityId%22:${$.activityId}%7D`;
Expand Down
2 changes: 1 addition & 1 deletion ql.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const qlDir = process.env.QL_DIR || '/ql';
const authFile = path.join(qlDir, 'config/auth.json');

const api = got.extend({
prefixUrl: process.env.QL_URL || 'http://localhost:5600',
prefixUrl: 'http://localhost:5600',
retry: { limit: 0 },
});

Expand Down
9 changes: 8 additions & 1 deletion sign_graphics_validate.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,15 @@
const navigator = {
userAgent: require('./USER_AGENTS').USER_AGENT,
userAgent: `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`,
plugins: { length: 0 },
language: "zh-CN",
};
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
}
const screen = {
availHeight: 812,
availWidth: 375,
Expand Down

0 comments on commit 5d79149

Please sign in to comment.