@xinyultd/whistle.inspect 1.0.11 → 1.0.13
Sign up to get free protection for your applications and to get access to all the features.
- package/assets/nongchang.js +8 -4
- package/lib/resStatsServer.js +5 -0
- package/package.json +1 -1
- package/rules.txt +3 -2
- package/schemas/cookie.js +5 -0
- package/schemas/phf.js +9 -0
- package/services/meituan/orderlist.js +1 -3
- package/services/pinhaofan/index.js +76 -0
- package/services/{task.js → qxz/action.js} +7 -6
- package/services/qxz/tasklist.js +8 -6
- package/meituan/order-list +0 -1
package/assets/nongchang.js
CHANGED
@@ -3,7 +3,7 @@
|
|
3
3
|
window['___whistle.inspect-is-inited'] = true;
|
4
4
|
var exports = {};
|
5
5
|
var module = { exports: exports };
|
6
|
-
|
6
|
+
console.log('农场注入');
|
7
7
|
var btn = document.createElement("input");
|
8
8
|
btn.type = "button";
|
9
9
|
btn.style = `position: absolute;
|
@@ -17,12 +17,14 @@
|
|
17
17
|
border: none;
|
18
18
|
z-index: 10`;
|
19
19
|
btn.value = "获取京东CK";
|
20
|
+
let wskey = JD.cookie.get('wskey');
|
21
|
+
console.log(wskey);
|
20
22
|
btn.addEventListener('click', function () {
|
21
|
-
let
|
23
|
+
let wskey = JD.cookie.get('wskey');
|
22
24
|
let text = ``;
|
23
|
-
console.log(
|
25
|
+
console.log(wskey);
|
24
26
|
// JD.wxappext.chooseWXPay();
|
25
|
-
wx.jumpBlankWebview('https://
|
27
|
+
wx.jumpBlankWebview('https://bill.jd.com/bill/getBillDetail.html');
|
26
28
|
});
|
27
29
|
document.body.prepend(btn);
|
28
30
|
// setInterval(() => {
|
@@ -30,3 +32,5 @@
|
|
30
32
|
// }, 1000);
|
31
33
|
new module.exports();
|
32
34
|
})();
|
35
|
+
|
36
|
+
BATQW722QTLYVCRD = { "tk": "jdd01KAEZD64JRWDQRMMC45NMN3VHZBRPASHXISKAQCFKWRMCBBUWDIZDYYMR2DIIHFYPVAZ2V5FFEL5R26IZJAPMWSRS5Z3BBBOKGGQDXYI01234567", "t": 1669622195411 }
|
package/lib/resStatsServer.js
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
|
2
2
|
const qxzTaskList = require('../services/qxz/tasklist');
|
3
3
|
// const mtOrderList = require('../services/meituan/orderlist');
|
4
|
+
const mtPhfStoreList = require('../services/pinhaofan/index');
|
4
5
|
|
5
6
|
module.exports = (server, options) => {
|
6
7
|
server.on('request', (req, res) => {
|
@@ -11,6 +12,10 @@ module.exports = (server, options) => {
|
|
11
12
|
switch (oReq.ruleValue) {
|
12
13
|
case 'qxz/task-list':
|
13
14
|
qxzTaskList.onRequest(req, res);
|
15
|
+
break
|
16
|
+
case 'phf/store-list':
|
17
|
+
mtPhfStoreList.onRequest(req, res);
|
18
|
+
break
|
14
19
|
}
|
15
20
|
});
|
16
21
|
};
|
package/package.json
CHANGED
package/rules.txt
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
wap.huayingrc.com/reward/list/ whistle.inspect://qxz/task-list
|
2
|
-
* jsAppend://assets/vConsole.js includeFilter://
|
3
|
-
^pro.m.jd.com/mini/active/**/index.html
|
2
|
+
* jsAppend://assets/vConsole.js includeFilter://reqH:Accept=html
|
3
|
+
^pro.m.jd.com/mini/active/**/index.html jsAppend://assets/nongchang.js includeFilter://reqH:Accept=html
|
4
4
|
^mp.weixin.qq.com/*** jsAppend://assets/mp.js includeFilter://resH:content-type=html
|
5
5
|
^m.**/fast_reada jsAppend://assets/read.js includeFilter://resH:content-type=html
|
6
6
|
union.meituan.com/api/data/order whistle.inspect://meituan/order-list pipe://whistle.inspect
|
7
|
+
wx-pinhaofan.meituan.com/weapp/pinhaofan/v1/page/list whistle.inspect://phf/store-list pipe://whistle.inspect
|
package/schemas/phf.js
ADDED
@@ -0,0 +1,9 @@
|
|
1
|
+
var mongoose = require("mongoose");
|
2
|
+
|
3
|
+
module.exports = new mongoose.Schema({
|
4
|
+
id: { type: String, unique: true },
|
5
|
+
poi_name: { type: String, default: '' },
|
6
|
+
name: { type: String, default: '' },
|
7
|
+
price: { type: Number, default: null },
|
8
|
+
single_buy_price: { type: Number, default: null }
|
9
|
+
});
|
@@ -11,9 +11,7 @@ function onRequest (req, res) {
|
|
11
11
|
let result = JSON.parse(resultText);
|
12
12
|
if (result.status === 0) {
|
13
13
|
result.data.dataList.forEach(x => {
|
14
|
-
|
15
|
-
x.orderCreateTime = '2022-11-27 11:47:53';
|
16
|
-
}
|
14
|
+
// x.orderCreateTime = '2022-11-27 11:47:53';
|
17
15
|
})
|
18
16
|
}
|
19
17
|
resultText = JSON.stringify(result);
|
@@ -0,0 +1,76 @@
|
|
1
|
+
var mongoose = require("mongoose");
|
2
|
+
var phfSchema = require('../../schemas/phf');
|
3
|
+
const moment = require('moment');
|
4
|
+
|
5
|
+
mongoose.connect(`mongodb://101.35.25.221:27017/qxz`, {
|
6
|
+
auth: { "authSource": "qxz" },
|
7
|
+
user: 'test',
|
8
|
+
pass: 'Password01!02!'
|
9
|
+
});
|
10
|
+
|
11
|
+
function onRequest (req, res) {
|
12
|
+
// do something
|
13
|
+
const oReq = req.originalReq;
|
14
|
+
const oRes = req.originalRes;
|
15
|
+
// console.log(oReq, oRes);
|
16
|
+
req.getSession((s) => {
|
17
|
+
// 如果设置了 enable://hide 会获取到空数据
|
18
|
+
if (!s) {
|
19
|
+
return;
|
20
|
+
}
|
21
|
+
let host = s.req.headers['host']
|
22
|
+
let bodyType = typeof s.res.body;
|
23
|
+
let contentTypeValue = s.res.headers['content-type'] || '';
|
24
|
+
let isJson = contentTypeValue.indexOf('json') > -1;
|
25
|
+
// console.log(s.res.body);
|
26
|
+
if (isJson && bodyType === 'string' && s.res.body !== '') {
|
27
|
+
let datetime = moment().format('YYYY-MM-DD HH:mm:ss');
|
28
|
+
console.log(`------[拼好饭]------`);
|
29
|
+
let res = JSON.parse(s.res.body)
|
30
|
+
let list = res.data.module_list[0]['module_list'].map(x => x.json_data).map(item => {
|
31
|
+
let { poi_info, spu_info } = item
|
32
|
+
return {
|
33
|
+
id: spu_info.id,
|
34
|
+
poi_name: poi_info.poi_name,
|
35
|
+
name: spu_info.name,
|
36
|
+
price: Number(spu_info.price),
|
37
|
+
single_buy_price: Number(spu_info.single_buy_price),
|
38
|
+
}
|
39
|
+
})
|
40
|
+
batchSaveStores(list)
|
41
|
+
console.log(list)
|
42
|
+
}
|
43
|
+
// do sth
|
44
|
+
});
|
45
|
+
}
|
46
|
+
|
47
|
+
async function batchSaveStores (docs) {
|
48
|
+
const phfMongooseModel = mongoose.model('phf', phfSchema);
|
49
|
+
let list = docs.map(x => {
|
50
|
+
return {
|
51
|
+
...x
|
52
|
+
}
|
53
|
+
});
|
54
|
+
let result = phfMongooseModel.insertMany(list, {
|
55
|
+
ordered: false,
|
56
|
+
rawResult: true
|
57
|
+
}).then(res => {
|
58
|
+
}).catch(error => {
|
59
|
+
console.log('批量插入报错', error.message);
|
60
|
+
let successIds = error.insertedDocs.map(x => x.id);
|
61
|
+
docs.filter(origin => !successIds.includes(origin.id)).forEach(origin => {
|
62
|
+
// console.log('[exist]', origin);
|
63
|
+
phfMongooseModel.update({ id: origin.id }, {
|
64
|
+
$set: origin
|
65
|
+
}, {
|
66
|
+
upsert: false
|
67
|
+
}, function (error, data) {
|
68
|
+
})
|
69
|
+
});
|
70
|
+
});
|
71
|
+
return result;
|
72
|
+
}
|
73
|
+
|
74
|
+
module.exports = {
|
75
|
+
onRequest
|
76
|
+
}
|
@@ -5,12 +5,12 @@
|
|
5
5
|
var moment = require('moment');
|
6
6
|
// var axios = require('axios');
|
7
7
|
var mongoose = require("mongoose");
|
8
|
-
var taskSchema = require('
|
8
|
+
var taskSchema = require('../../schemas/task');
|
9
9
|
|
10
|
-
mongoose.connect(`mongodb://101.35.25.221:27017/
|
11
|
-
auth: { "authSource": "
|
12
|
-
user: '
|
13
|
-
pass: '
|
10
|
+
mongoose.connect(`mongodb://101.35.25.221:27017/qxz`, {
|
11
|
+
auth: { "authSource": "qxz" },
|
12
|
+
user: 'test',
|
13
|
+
pass: 'Password01!02!'
|
14
14
|
});
|
15
15
|
|
16
16
|
module.exports = {
|
@@ -25,8 +25,9 @@ module.exports = {
|
|
25
25
|
ordered: false,
|
26
26
|
rawResult: true
|
27
27
|
}).then(res => {
|
28
|
-
console.log(1, res)
|
28
|
+
console.log(1, res.insertedCount)
|
29
29
|
}).catch(error => {
|
30
|
+
console.log('批量插入报错', error.message)
|
30
31
|
let successIds = error.insertedDocs.map(x => x.reward_id);
|
31
32
|
docs.filter(origin => !successIds.includes(origin.reward_id)).forEach(origin => {
|
32
33
|
// console.log('[exist]', origin);
|
package/services/qxz/tasklist.js
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
const moment = require('moment');
|
2
|
-
const
|
2
|
+
const action = require('./action');
|
3
3
|
|
4
4
|
function onRequest (req, res) {
|
5
5
|
// do something
|
@@ -15,7 +15,7 @@ function onRequest (req, res) {
|
|
15
15
|
let bodyType = typeof s.res.body;
|
16
16
|
let contentTypeValue = s.res.headers['content-type'] || '';
|
17
17
|
let isJson = contentTypeValue.indexOf('json') > -1;
|
18
|
-
// console.log(s.
|
18
|
+
// console.log(s.res.body);
|
19
19
|
if (isJson && bodyType === 'string' && s.res.body !== '') {
|
20
20
|
let datetime = moment().format('YYYY-MM-DD HH:mm:ss');
|
21
21
|
console.log(`------[${datetime}]------`);
|
@@ -24,8 +24,9 @@ function onRequest (req, res) {
|
|
24
24
|
if (response.state === 1) {
|
25
25
|
let rewardList = response.reward_list || [];
|
26
26
|
console.log(`${rewardList.length}条数据`);
|
27
|
-
|
27
|
+
action.batchSaveTasks(rewardList);
|
28
28
|
} else {
|
29
|
+
console.log(response)
|
29
30
|
console.log('请求任务报错')
|
30
31
|
}
|
31
32
|
}
|
@@ -35,15 +36,16 @@ function onRequest (req, res) {
|
|
35
36
|
|
36
37
|
let cmd = require('node-cmd');
|
37
38
|
let proxy = `--proxy "http://127.0.0.1:8899"`;
|
38
|
-
let
|
39
|
-
|
40
|
-
timer(curl);
|
39
|
+
let cookie = `tzb_formhash_cookie=fec99136acb12f1cfab2ccf8fd14474f; tzb_session=7060raarqubp3c8rt9n6461rdrdb8phf; Hm_lpvt_ec81d629e36e3f956a30ff78c78b07f8=1670496073; Hm_lvt_ec81d629e36e3f956a30ff78c78b07f8=1670405804,1670421139,1670465422,1670486644; tzb_user_cryptograph=db44d46f8ad0cc060d40424cd7285b06ade22649361a6f6ff5b82c7d6652ea2f9aabfd81c03940839db4025a52d7c3f2e93ee6175d5411062df77cef377b7e506FwGzX4e9RVW4vniLWqzj%2BXUtfZ30BpTAwLL8TJu1VeGFBQTtnGvEnEiHWiYsbZv`
|
40
|
+
let curl = `curl -X POST ${proxy} "https://wap.huayingrc.com/reward/list/" -H "host: wap.huayingrc.com" -H "content-type: application/x-www-form-urlencoded" -H "accept: application/json" -H "x-requested-with: XMLHttpRequest" -H "accept-language: zh-CN,zh-Hans;q=0.9" -H "origin: https://wap.huayingrc.com" -H "user-agent: Mozilla/5.0 (iPhone; CPU iPhone OS 16_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 LT-APP/43/258" -H "referer: https://wap.huayingrc.com/reward/list/?xapp-target=blank" -H "cookie: ${cookie}" -d 'formhash=fec99136acb12f1cfab2ccf8fd14474f&page=1&cat_id=0&type=zuixin&rand=528232&limit=40&search=&search_type=top&level=0&refresh_page=1&tags_id=0&exclusive=0&inajax=1'`;
|
41
41
|
|
42
42
|
function timer (curl) {
|
43
43
|
cmd.run(curl, function (err, data, stderr) {
|
44
44
|
console.log('CMD')
|
45
45
|
});
|
46
46
|
}
|
47
|
+
|
48
|
+
timer(curl);
|
47
49
|
setInterval(function () {
|
48
50
|
timer(curl);
|
49
51
|
}, 10000);
|
package/meituan/order-list
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
{"status":0,"des":"","data":{"dataList":[{"orderViewId":"\t1000304081254728848","orderCreateTime":"2022-11-28 04:04:16","appkeyName":"clcj10103520221121165945","sid":"\t001","totalPayPrice":"31.90","orderStatus":"订单完成","isRiskOrder":"否","tradeTypes":"CPS","businessLine":"到家_外卖&闪购&美团电商","activityName":"外卖社群加粉CPA","poiName":"鹿小味的一日三餐(宝龙国际店)","quantity":1,"productId":"\t0","productName":"\t"},{"orderViewId":"\tFLW_1596538583601336404","orderCreateTime":"2022-11-27 00:17:15","appkeyName":"clcj10103520221121165945","sid":"\t001","totalPayPrice":"0.00","orderStatus":"订单完成","isRiskOrder":"否","tradeTypes":"CPS","businessLine":"到家_外卖&闪购&美团电商","activityName":"外卖社群加粉CPA","poiName":"社群关注奖励","quantity":0,"productId":"\t0","productName":"\t"},{"orderViewId":"\tFLW_1596531827332390994","orderCreateTime":"2022-11-26 23:50:24","appkeyName":"clcj10103520221121165945","sid":"\t001","totalPayPrice":"0.00","orderStatus":"订单完成","isRiskOrder":"否","tradeTypes":"CPS","businessLine":"到家_外卖&闪购&美团电商","activityName":"外卖社群加粉CPA","poiName":"社群关注奖励","quantity":0,"productId":"\t0","productName":"\t"},{"orderViewId":"\tFLW_1596521985259642891","orderCreateTime":"2022-11-26 23:11:17","appkeyName":"clcj10103520221121165945","sid":"\t001","totalPayPrice":"0.00","orderStatus":"订单完成","isRiskOrder":"否","tradeTypes":"CPS","businessLine":"到家_外卖&闪购&美团电商","activityName":"外卖社群加粉CPA","poiName":"社群关注奖励","quantity":0,"productId":"\t0","productName":"\t"},{"orderViewId":"\tFLW_1596110671152545792","orderCreateTime":"2022-11-25 19:56:52","appkeyName":"clcj10103520221121165945","sid":"\t001","totalPayPrice":"0.00","orderStatus":"订单完成","isRiskOrder":"否","tradeTypes":"CPS","businessLine":"到家_外卖&闪购&美团电商","activityName":"外卖社群加粉CPA","poiName":"社群关注奖励","quantity":0,"productId":"\t0","productName":"\t"},{"orderViewId":"\tFLW_1596046171032403991","orderCreateTime":"2022-11-25 15:40:34","appkeyName":"clcj10103520221121165945","sid":"\t001","totalPayPrice":"0.00","orderStatus":"订单完成","isRiskOrder":"否","tradeTypes":"CPS","businessLine":"到家_外卖&闪购&美团电商","activityName":"外卖社群加粉CPA","poiName":"社群关注奖励","quantity":0,"productId":"\t0","productName":"\t"},{"orderViewId":"\tFLW_1595488904058912829","orderCreateTime":"2022-11-24 02:46:12","appkeyName":"clcj10103520221121165945","sid":"\t001","totalPayPrice":"0.00","orderStatus":"订单完成","isRiskOrder":"否","tradeTypes":"CPS","businessLine":"到家_外卖&闪购&美团电商","activityName":"外卖社群加粉CPA","poiName":"社群关注奖励","quantity":0,"productId":"\t0","productName":"\t"},{"orderViewId":"\tFLW_1595486403595239464","orderCreateTime":"2022-11-24 02:36:15","appkeyName":"clcj10103520221121165945","sid":"\t001","totalPayPrice":"0.00","orderStatus":"订单完成","isRiskOrder":"否","tradeTypes":"CPS","businessLine":"到家_外卖&闪购&美团电商","activityName":"外卖社群加粉CPA","poiName":"社群关注奖励","quantity":0,"productId":"\t0","productName":"\t"},{"orderViewId":"\tFLW_1595468559524397072","orderCreateTime":"2022-11-24 01:25:21","appkeyName":"clcj10103520221121165945","sid":"\t001","totalPayPrice":"0.00","orderStatus":"订单完成","isRiskOrder":"否","tradeTypes":"CPS","businessLine":"到家_外卖&闪购&美团电商","activityName":"外卖社群加粉CPA","poiName":"社群关注奖励","quantity":0,"productId":"\t0","productName":"\t"},{"orderViewId":"\tFLW_1595297533847044159","orderCreateTime":"2022-11-23 14:05:45","appkeyName":"clcj10103520221121165945","sid":"\t001","totalPayPrice":"0.00","orderStatus":"订单完成","isRiskOrder":"否","tradeTypes":"CPS","businessLine":"到家_外卖&闪购&美团电商","activityName":"外卖社群加粉CPA","poiName":"社群关注奖励","quantity":0,"productId":"\t0","productName":"\t"},{"orderViewId":"\tFLW_1595296692008230944","orderCreateTime":"2022-11-23 14:02:25","appkeyName":"clcj10103520221121165945","sid":"\t001","totalPayPrice":"0.00","orderStatus":"订单完成","isRiskOrder":"否","tradeTypes":"CPS","businessLine":"到家_外卖&闪购&美团电商","activityName":"外卖社群加粉CPA","poiName":"社群关注奖励","quantity":0,"productId":"\t0","productName":"\t"},{"orderViewId":"\tFLW_1595217831140642832","orderCreateTime":"2022-11-23 08:49:03","appkeyName":"clcj10103520221121165945","sid":"\t001","totalPayPrice":"0.00","orderStatus":"订单完成","isRiskOrder":"否","tradeTypes":"CPS","businessLine":"到家_外卖&闪购&美团电商","activityName":"外卖社群加粉CPA","poiName":"社群关注奖励","quantity":0,"productId":"\t0","productName":"\t"},{"orderViewId":"\tFLW_1595215201312079926","orderCreateTime":"2022-11-23 08:38:36","appkeyName":"clcj10103520221121165945","sid":"\t001","totalPayPrice":"0.00","orderStatus":"订单完成","isRiskOrder":"否","tradeTypes":"CPS","businessLine":"到家_外卖&闪购&美团电商","activityName":"外卖社群加粉CPA","poiName":"社群关注奖励","quantity":0,"productId":"\t0","productName":"\t"},{"orderViewId":"\tFLW_1595142094354296894","orderCreateTime":"2022-11-23 03:48:06","appkeyName":"clcj10103520221121165945","sid":"\t001","totalPayPrice":"0.00","orderStatus":"订单完成","isRiskOrder":"否","tradeTypes":"CPS","businessLine":"到家_外卖&闪购&美团电商","activityName":"外卖社群加粉CPA","poiName":"社群关注奖励","quantity":0,"productId":"\t0","productName":"\t"},{"orderViewId":"\tFLW_1595108371336495113","orderCreateTime":"2022-11-23 01:34:06","appkeyName":"clcj10103520221121165945","sid":"\t001","totalPayPrice":"0.00","orderStatus":"订单完成","isRiskOrder":"否","tradeTypes":"CPS","businessLine":"到家_外卖&闪购&美团电商","activityName":"外卖社群加粉CPA","poiName":"社群关注奖励","quantity":0,"productId":"\t0","productName":"\t"},{"orderViewId":"\tFLW_1595106251350536248","orderCreateTime":"2022-11-23 01:25:40","appkeyName":"clcj10103520221121165945","sid":"\t001","totalPayPrice":"0.00","orderStatus":"订单完成","isRiskOrder":"否","tradeTypes":"CPS","businessLine":"到家_外卖&闪购&美团电商","activityName":"外卖社群加粉CPA","poiName":"社群关注奖励","quantity":0,"productId":"\t0","productName":"\t"},{"orderViewId":"\tFLW_1595105190586040403","orderCreateTime":"2022-11-23 01:21:27","appkeyName":"clcj10103520221121165945","sid":"\t001","totalPayPrice":"0.00","orderStatus":"订单完成","isRiskOrder":"否","tradeTypes":"CPS","businessLine":"到家_外卖&闪购&美团电商","activityName":"外卖社群加粉CPA","poiName":"社群关注奖励","quantity":0,"productId":"\t0","productName":"\t"},{"orderViewId":"\tFLW_1595104248033607715","orderCreateTime":"2022-11-23 01:17:42","appkeyName":"clcj10103520221121165945","sid":"\t001","totalPayPrice":"0.00","orderStatus":"订单完成","isRiskOrder":"否","tradeTypes":"CPS","businessLine":"到家_外卖&闪购&美团电商","activityName":"外卖社群加粉CPA","poiName":"社群关注奖励","quantity":0,"productId":"\t0","productName":"\t"},{"orderViewId":"\tFLW_1595100986454700095","orderCreateTime":"2022-11-23 01:04:45","appkeyName":"clcj10103520221121165945","sid":"\t001","totalPayPrice":"0.00","orderStatus":"订单完成","isRiskOrder":"否","tradeTypes":"CPS","businessLine":"到家_外卖&闪购&美团电商","activityName":"外卖社群加粉CPA","poiName":"社群关注奖励","quantity":0,"productId":"\t0","productName":"\t"},{"orderViewId":"\tFLW_1594866608956973114","orderCreateTime":"2022-11-22 09:33:25","appkeyName":"clcj10103520221121165945","sid":"\t001","totalPayPrice":"0.00","orderStatus":"订单完成","isRiskOrder":"否","tradeTypes":"CPS","businessLine":"到家_外卖&闪购&美团电商","activityName":"外卖社群加粉CPA","poiName":"社群关注奖励","quantity":0,"productId":"\t0","productName":"\t"}],"total":20,"header":null}}
|