Compare commits

...

5 Commits

Author SHA1 Message Date
smallfawn
c42b125ac8 Update wx_ziwi.js 2025-03-17 09:06:13 +08:00
smallfawn
ba2b652935 Update wx_ziwi.js 2025-03-17 09:02:58 +08:00
smallfawn
13e2fa213b Update bnmdhg_wx.js 2025-03-17 08:50:03 +08:00
smallfawn
6a78c26b29 Update bnmdhg_wx.js 2025-03-17 08:48:46 +08:00
smallfawn
2ec19d0d1a test 2025-03-17 08:38:37 +08:00
8 changed files with 183 additions and 165 deletions

View File

@ -172,7 +172,7 @@ class Task extends Public {
async function getNotice() {
let options = {
url: `https://gitee.com/smallfawn/Note/raw/main/Notice.json`,
url: `https://ghproxy.net/https://raw.githubusercontent.com/smallfawn/Note/refs/heads/main/Notice.json`,
headers: {
"User-Agent": defaultUserAgent,
}

View File

@ -5,8 +5,8 @@
@Description: 测试
------------------------------------------
#Notice: 只适用于购买了luflytoken的 购买联系QQ860562056
变量luflytoken 填写luflytoken
变量wxbnmdwxid 填写wxbnmdwxid 多账号&分割或者换行
变量wxid_bnmd 填写wxid_bnmd 多账号&分割或者换行
wxcenter 填写wxcenter
免责声明
------------------------------------------
1此脚本仅用于学习研究不保证其合法性准确性有效性请根据情况自行判断本人对此不承担任何保证责任
@ -19,7 +19,7 @@
*/
const $ = new Env("巴奴毛肚小程序");
let ckName = `wxbnmdwxid`;
let ckName = `wxid_bnmd`;
const strSplitor = "#";
const envSplitor = ["&", "\n"];
const crypto = require("crypto-js");
@ -27,8 +27,7 @@ const notify = $.isNode() ? require("../sendNotify") : "";
const axios = require("axios");
const defaultUserAgent = "Mozilla/5.0 (iPhone; CPU iPhone OS 16_5 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 MicroMessenger/8.0.31(0x18001e31) NetType/WIFI Language/zh_CN miniProgram"
const key = "bfc5e947cd84c7ced1ee48d28fb3e90f";
let luflytoken = process.env.luflytoken || ""
let wxcenter = 'http://w.smallfawn.top:5789'
let wxcenter = process.env.wxcenter || ""
let appid = 'wx71373698c47f9a9f'
class Public {
async request(options) {
@ -120,17 +119,22 @@ class Task extends Public {
})));
}
async getcode() {
let options = {
url: `${wxcenter}/api/getcode`,
url: `${wxcenter}/api/Wxapp/JSLogin`,
headers: {
'Content-Type': 'application/json'
},
method: 'POST',
data: { "luflyKey": "" + luflytoken, "wxid": "" + this.wxid, "appid": "" + appid }
data: { "Wxid": "" + this.wxid, "Appid": "" + appid }
}
let { data: result } = await this.request(options);
if (result.status) {
let code = result.data
if (result.Success) {
let code = result.Data.code
$.log(`账号[${this.wxid}] 获取code成功[${code}]`);
let { member_id: memberId, openid: authorization } = await this.login(code)
const headerObj = {};
@ -159,15 +163,19 @@ class Task extends Public {
headers: this.getHeaders(headerObj, false, authorization)
});
const result = "\nMember_id:" + memberId + "\n用户名:" + info.data.data.name + "\n总积分:" + info.data.data.points;
$.log(result);
} catch (err) {
console.log("签到失败:" + err + " | 签到时间:" + Date.now());
$.log("签到失败:" + err + " | 签到时间:" + Date.now());
}
} else {
console.log(result);
}
}
async login(code) {
let url = 'https://cloud.banu.cn/api/wx/weapp/auth';
@ -188,6 +196,7 @@ class Task extends Public {
return res.data;
}
async run() {
if (!wxcenter) return $.log(`请填写wxcenter`)
await this.getcode()
@ -215,7 +224,7 @@ class Task extends Public {
async function getNotice() {
let options = {
url: `https://gitee.com/smallfawn/Note/raw/main/Notice.json`,
url: `https://ghproxy.net/https://raw.githubusercontent.com/smallfawn/Note/refs/heads/main/Notice.json`,
headers: {
"User-Agent": defaultUserAgent,
}

View File

@ -156,7 +156,7 @@ class Task extends Public {
async function getNotice() {
let options = {
url: `https://gitee.com/smallfawn/Note/raw/main/Notice.json`,
url: `https://ghproxy.net/https://raw.githubusercontent.com/smallfawn/Note/refs/heads/main/Notice.json`,
headers: {
"User-Agent": defaultUserAgent,
}

View File

@ -131,7 +131,7 @@ class Task extends Public {
async function getNotice() {
let options = {
url: `https://gitee.com/smallfawn/Note/raw/main/Notice.json`,
url: `https://ghproxy.net/https://raw.githubusercontent.com/smallfawn/Note/refs/heads/main/Notice.json`,
headers: {
"User-Agent": defaultUserAgent,
}

View File

@ -1,8 +1,8 @@
/**
* cron 25 10 * * * wx_ZIWI+.js
* 积分换 猫粮狗粮
* 变量名wxziwiwxid 值为lufly登录授权的微信id 用于获取微信CODE 来刷新CK
* 变量名luflytoken 谨慎使用加密本 防止偷取TOKEN
* 变量名wxid_ziwi 值为lufly登录授权的微信id 用于获取微信CODE 来刷新CK
* 变量名wxcenter 谨慎使用加密本 防止偷取TOKEN
*
*
*
@ -12,13 +12,13 @@
const $ = new Env("微信小程序ZIWI+");
const notify = $.isNode() ? require('../sendNotify') : '';
let ckName = "wxziwiwxid";
let ckName = "wxid_ziwi";
let envSplitor = ["&", "\n"]; //多账号分隔符
let strSplitor = "#"; //多变量分隔符
let userIdx = 0;
let userList = [];
let appid = 'wxb26a710e583b05dc'
let wxcenter = 'http://w.smallfawn.top:5789'
let wxcenter = process.env['wxcenter'] || ''
class Task {
constructor(str) {
this.index = ++userIdx;
@ -29,25 +29,34 @@ class Task {
this.ck = ''
}
async main() {
if (!wxcenter) return $.log(`请填写wxcenter`)
await this.getCode()
}
async getCode() {
let { body: result } = await $.httpRequest({
method: 'post', headers: {
let options = {
url: `${wxcenter}/api/Wxapp/JSLogin`,
headers: {
'Content-Type': 'application/json'
}, url: wxcenter + '/api/getcode', body: JSON.stringify({ "luflyKey": process.env['luflytoken'], "wxid": "" + this.wxid, "appid": appid })
})
if (result) {
console.log(result)
if (result.status) {
let code = result.data
},
method: 'POST',
body: JSON.stringify({ "Wxid": "" + this.wxid, "Appid": "" + appid })
}
let { body: result } = await $.httpRequest(options);
if (result.Success) {
let code = result.Data.code
await this.getJwtByCode(code)
}
} else {
$.log(`账号[${this.index}]【${this.name}】 获取code失败`);
}
}
async getJwtByCode(code) {

View File

@ -134,7 +134,7 @@ class Task extends Public {
async function getNotice() {
let options = {
url: `https://gitee.com/smallfawn/Note/raw/main/Notice.json`,
url: `https://ghproxy.net/https://raw.githubusercontent.com/smallfawn/Note/refs/heads/main/Notice.json`,
headers: {
"User-Agent": defaultUserAgent,
}

View File

@ -162,7 +162,7 @@ class Task extends Public {
async function getNotice() {
let options = {
url: `https://gitee.com/smallfawn/Note/raw/main/Notice.json`,
url: `https://ghproxy.net/https://raw.githubusercontent.com/smallfawn/Note/refs/heads/main/Notice.json`,
headers: {
"User-Agent": defaultUserAgent,
}

View File

@ -69,7 +69,7 @@ class Task extends Public {
async function getNotice() {
let options = {
url: `https://gitee.com/smallfawn/Note/raw/main/Notice.json`,
url: `https://ghproxy.net/https://raw.githubusercontent.com/smallfawn/Note/refs/heads/main/Notice.json`,
headers: {
"User-Agent": defaultUserAgent,
}