@xinyultd/whistle.inspect 1.0.10 → 1.0.12

Sign up to get free protection for your applications and to get access to all the features.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xinyultd/whistle.inspect",
3
- "version": "1.0.10",
3
+ "version": "1.0.12",
4
4
  "description": "",
5
5
  "scripts": {
6
6
  "dev": "lack watch network-inspect",
@@ -19,7 +19,7 @@ function onRequest (req, res) {
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}]------`);
22
- // console.log(s.res.body);
22
+
23
23
  let response = JSON.parse(s.res.body);
24
24
  if (response.state === 1) {
25
25
  let rewardList = response.reward_list || [];
@@ -33,19 +33,20 @@ function onRequest (req, res) {
33
33
  });
34
34
  }
35
35
 
36
- // var cmd = require('node-cmd');
37
- // var curl = `curl --proxy "http://127.0.0.1:8899" -X POST "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: tzb_formhash_cookie=37afc8f3858f965b6da3fe8692681b38; tzb_session=ol3i616rfuluce9i547tapad6vnujm2f; Hm_lpvt_ec81d629e36e3f956a30ff78c78b07f8=1669257657; Hm_lvt_ec81d629e36e3f956a30ff78c78b07f8=1669228508,1669233781,1669237045,1669252288; tzb_user_cryptograph=2dfd1e5de754834b8622a1f355f8c70e42c82cd5fed7a96a44eb73432ea997bfa910352e7fb68b62aeba697c312d61364221b665e5133396f722627c4671eacbesOuDySQRCDV4qdxJaj3pvkZXkP1CyMobeW2oxtnIF%2BGze5KhNrEKpFBs40w3b3W" -d 'formhash=37afc8f3858f965b6da3fe8692681b38&page=1&cat_id=0&type=zuixin&rand=560320&limit=40&search=&search_type=top&level=0&refresh_page=1&tags_id=0&exclusive=0&inajax=1'`;
36
+ let cmd = require('node-cmd');
37
+ let proxy = `--proxy "http://127.0.0.1:8899"`;
38
+ 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: tzb_formhash_cookie=d40f54916e25a031f162ce39cf38aa77; tzb_session=4lid0ga90uud7i0d6npin2dqv34n8j28; Hm_lpvt_ec81d629e36e3f956a30ff78c78b07f8=1669629815; Hm_lvt_ec81d629e36e3f956a30ff78c78b07f8=1669528333,1669600406,1669613909,1669629803; tzb_user_cryptograph=33d3b6b9ac7967ae1cd0772cfc317a006460622962fd688c6cf8ac19d8d14b2421e669c835a59b7512a04a7a81c088b59a5abb0cdec246c5811fa69fc73b6fd8fc0oDhi6%2BOdFX9monqJMGrrbN7oixPY%2Fn3VYUyyQJtkJGTHFX1TM%2F177%2FCD%2BTS5v" -d 'formhash=d40f54916e25a031f162ce39cf38aa77&page=2&cat_id=0&type=zuixin&rand=198363&limit=40&search=&search_type=top&level=0&refresh_page=1&tags_id=0&exclusive=0&inajax=1'`;
38
39
 
39
- // function timer (curl) {
40
- // cmd.run(curl, function (err, data, stderr) {
41
- // console.log('CMD:',)
42
- // });
43
- // }
40
+ function timer (curl) {
41
+ cmd.run(curl, function (err, data, stderr) {
42
+ console.log('CMD')
43
+ });
44
+ }
44
45
 
45
46
  // timer(curl);
46
47
  // setInterval(function () {
47
48
  // timer(curl);
48
- // }, 15000);
49
+ // }, 10000);
49
50
 
50
51
  module.exports = {
51
52
  onRequest