修改请求域名,修改请求path

This commit is contained in:
晴天莫爱小鸟 committed 2026-07-11 10:37:10 +08:00
1 parent 8df02a3219
commit 8f64e8cb53
1 file changed
+114 -69
+114 -69
View File
@@ -137,12 +137,15 @@ let ok = ''
* 获取信息
*
*/
async function getuser (timeout = 2 * 1000) {
async function getuser(timeout = 2 * 1000) {
return new Promise((resolve) => {
let url = {
url: `https://zm.t7a.cn/api/getusercenter.php?safe=${zmnlxq}`,
url: `https://warhorsechina.cojoy.com.cn/app/api/custom/getusercenter?safe=${zmnlxq}`,
headers: {
'Host': 'zm.t7a.cn',
'Host': 'warhorsechina.cojoy.com.cn',
'CUSTOMAPPID': 'wx94dca6ef07a54c55',
'CUSTOMAPPID': 'wx94dca6ef07a54c55',
'cGvnZetrWSWfLcdYaN40mLdFx6ObkRltdZmhS5hQkgDbuZd9bLcQevwBVEjx-war-horse-zm-2025': 'CjkFMAxsbtJ1VFO0xTbjwthRyAXEbyYgFNQWdUwgVY21PBcefkNbehUCWYBp',
'user-agent': 'Mozilla/5.0 (Linux; Android 10; MI 8 Build/QKQ1.190828.002; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/86.0.4240.99 XWEB/3235 MMWEBSDK/20220204 Mobile Safari/537.36 MMWEBID/6242 MicroMessenger/8.0.20.2080(0x28001435) Process/appbrand0 WeChat/arm64 Weixin NetType/WIFI Language/zh_CN ABI/arm64 miniProgram/wx532ecb3bdaaf92f9'
},
// body: '',
@@ -150,6 +153,8 @@ async function getuser (timeout = 2 * 1000) {
}
$.get(url, async (error, response, data) => {
try {
console.log(error)
console.log(data)
result = JSON.parse(data)
if (result.status == 1) {
ok = 1;
@@ -186,12 +191,14 @@ async function getuser (timeout = 2 * 1000) {
* 获取手机号
*
*/
function getTel (timeout = 2 * 1000) {
function getTel(timeout = 2 * 1000) {
return new Promise((resolve) => {
let url = {
url: `https://zm.t7a.cn/api/getuserinfo.php?safe=${zmnlxq}`,
url: `https://warhorsechina.cojoy.com.cn/app/api/custom/getuserinfo?safe=${zmnlxq}`,
headers: {
'Host': 'zm.t7a.cn',
'Host': 'warhorsechina.cojoy.com.cn',
'CUSTOMAPPID': 'wx94dca6ef07a54c55',
'cGvnZetrWSWfLcdYaN40mLdFx6ObkRltdZmhS5hQkgDbuZd9bLcQevwBVEjx-war-horse-zm-2025': 'CjkFMAxsbtJ1VFO0xTbjwthRyAXEbyYgFNQWdUwgVY21PBcefkNbehUCWYBp',
'user-agent': 'Mozilla/5.0 (Linux; Android 10; MI 8 Build/QKQ1.190828.002; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/86.0.4240.99 XWEB/3235 MMWEBSDK/20220204 Mobile Safari/537.36 MMWEBID/6242 MicroMessenger/8.0.20.2080(0x28001435) Process/appbrand0 WeChat/arm64 Weixin NetType/WIFI Language/zh_CN ABI/arm64 miniProgram/wx532ecb3bdaaf92f9'
},
// body: '',
@@ -223,12 +230,14 @@ function getTel (timeout = 2 * 1000) {
* 签到
*
*/
function checkin (timeout = 2 * 1000) {
function checkin(timeout = 2 * 1000) {
return new Promise((resolve) => {
let url = {
url: `https://zm.t7a.cn/api/checkin.php?safe=${zmnlxq}`,
url: `https://warhorsechina.cojoy.com.cn/app/api/custom/checkin?safe=${zmnlxq}`,
headers: {
'Host': 'zm.t7a.cn',
'Host': 'warhorsechina.cojoy.com.cn',
'CUSTOMAPPID': 'wx94dca6ef07a54c55',
'cGvnZetrWSWfLcdYaN40mLdFx6ObkRltdZmhS5hQkgDbuZd9bLcQevwBVEjx-war-horse-zm-2025': 'CjkFMAxsbtJ1VFO0xTbjwthRyAXEbyYgFNQWdUwgVY21PBcefkNbehUCWYBp',
'user-agent': 'Mozilla/5.0 (Linux; Android 10; MI 8 Build/QKQ1.190828.002; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/86.0.4240.99 XWEB/3235 MMWEBSDK/20220204 Mobile Safari/537.36 MMWEBID/6242 MicroMessenger/8.0.20.2080(0x28001435) Process/appbrand0 WeChat/arm64 Weixin NetType/WIFI Language/zh_CN ABI/arm64 miniProgram/wx532ecb3bdaaf92f9'
},
// body: '',
@@ -260,12 +269,14 @@ function checkin (timeout = 2 * 1000) {
* 小程序添加好友任务
*
*/
function joinxcx (timeout = 2 * 1000) {
function joinxcx(timeout = 2 * 1000) {
return new Promise((resolve) => {
let url = {
url: `https://zm.t7a.cn/api/joinxcx.php?safe=${zmnlxq}`,
url: `https://warhorsechina.cojoy.com.cn/app/api/custom/joinxcx?safe=${zmnlxq}`,
headers: {
'Host': 'zm.t7a.cn',
'Host': 'warhorsechina.cojoy.com.cn',
'CUSTOMAPPID': 'wx94dca6ef07a54c55',
'cGvnZetrWSWfLcdYaN40mLdFx6ObkRltdZmhS5hQkgDbuZd9bLcQevwBVEjx-war-horse-zm-2025': 'CjkFMAxsbtJ1VFO0xTbjwthRyAXEbyYgFNQWdUwgVY21PBcefkNbehUCWYBp',
'user-agent': 'Mozilla/5.0 (Linux; Android 10; MI 8 Build/QKQ1.190828.002; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/86.0.4240.99 XWEB/3235 MMWEBSDK/20220204 Mobile Safari/537.36 MMWEBID/6242 MicroMessenger/8.0.20.2080(0x28001435) Process/appbrand0 WeChat/arm64 Weixin NetType/WIFI Language/zh_CN ABI/arm64 miniProgram/wx532ecb3bdaaf92f9'
},
// body: '',
@@ -294,12 +305,14 @@ function joinxcx (timeout = 2 * 1000) {
* 小程序获取好友列表
*
*/
function getranklist (addFriend = false, fromsafe = '', timeout = 2 * 1000) {
function getranklist(addFriend = false, fromsafe = '', timeout = 2 * 1000) {
return new Promise((resolve) => {
let url = {
url: `https://zm.t7a.cn/api/getranklist.php?safe=${zmnlxq}&type=1&fromsafe=${fromsafe}`,
url: `https://warhorsechina.cojoy.com.cn/app/api/custom/getranklist?safe=${zmnlxq}&type=1&fromsafe=${fromsafe}`,
headers: {
'Host': 'zm.t7a.cn',
'Host': 'warhorsechina.cojoy.com.cn',
'CUSTOMAPPID': 'wx94dca6ef07a54c55',
'cGvnZetrWSWfLcdYaN40mLdFx6ObkRltdZmhS5hQkgDbuZd9bLcQevwBVEjx-war-horse-zm-2025': 'CjkFMAxsbtJ1VFO0xTbjwthRyAXEbyYgFNQWdUwgVY21PBcefkNbehUCWYBp',
'user-agent': 'Mozilla/5.0 (Linux; Android 10; MI 8 Build/QKQ1.190828.002; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/86.0.4240.99 XWEB/3235 MMWEBSDK/20220204 Mobile Safari/537.36 MMWEBID/6242 MicroMessenger/8.0.20.2080(0x28001435) Process/appbrand0 WeChat/arm64 Weixin NetType/WIFI Language/zh_CN ABI/arm64 miniProgram/wx532ecb3bdaaf92f9'
},
// body: '',
@@ -344,12 +357,14 @@ function getranklist (addFriend = false, fromsafe = '', timeout = 2 * 1000) {
* 小程序加为好友
*
*/
function getotherhorseinfo (likeUserId, timeout = 2 * 1000) {
function getotherhorseinfo(likeUserId, timeout = 2 * 1000) {
return new Promise((resolve) => {
let url = {
url: `https://zm.t7a.cn/api/getotherhorseinfo.php?safe=${zmnlxq}&friendid=${likeUserId}`,
url: `https://warhorsechina.cojoy.com.cn/app/api/custom/getotherhorseinfo?safe=${zmnlxq}&friendid=${likeUserId}`,
headers: {
'Host': 'zm.t7a.cn',
'Host': 'warhorsechina.cojoy.com.cn',
'CUSTOMAPPID': 'wx94dca6ef07a54c55',
'cGvnZetrWSWfLcdYaN40mLdFx6ObkRltdZmhS5hQkgDbuZd9bLcQevwBVEjx-war-horse-zm-2025': 'CjkFMAxsbtJ1VFO0xTbjwthRyAXEbyYgFNQWdUwgVY21PBcefkNbehUCWYBp',
'user-agent': 'Mozilla/5.0 (Linux; Android 10; MI 8 Build/QKQ1.190828.002; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/86.0.4240.99 XWEB/3235 MMWEBSDK/20220204 Mobile Safari/537.36 MMWEBID/6242 MicroMessenger/8.0.20.2080(0x28001435) Process/appbrand0 WeChat/arm64 Weixin NetType/WIFI Language/zh_CN ABI/arm64 miniProgram/wx532ecb3bdaaf92f9'
},
// body: '',
@@ -378,13 +393,15 @@ function getotherhorseinfo (likeUserId, timeout = 2 * 1000) {
* 小程序点赞
*
*/
function like (likeUserId, timeout = 2 * 1000) {
function like(likeUserId, timeout = 2 * 1000) {
let isCompleted = false;
return new Promise((resolve) => {
let url = {
url: `https://zm.t7a.cn/api/subrank.php?safe=${zmnlxq}&id=${likeUserId}&type=1`,
url: `https://warhorsechina.cojoy.com.cn/app/api/custom/subrank?safe=${zmnlxq}&id=${likeUserId}&type=1`,
headers: {
'Host': 'zm.t7a.cn',
'Host': 'warhorsechina.cojoy.com.cn',
'CUSTOMAPPID': 'wx94dca6ef07a54c55',
'cGvnZetrWSWfLcdYaN40mLdFx6ObkRltdZmhS5hQkgDbuZd9bLcQevwBVEjx-war-horse-zm-2025': 'CjkFMAxsbtJ1VFO0xTbjwthRyAXEbyYgFNQWdUwgVY21PBcefkNbehUCWYBp',
'user-agent': 'Mozilla/5.0 (Linux; Android 10; MI 8 Build/QKQ1.190828.002; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/86.0.4240.99 XWEB/3235 MMWEBSDK/20220204 Mobile Safari/537.36 MMWEBID/6242 MicroMessenger/8.0.20.2080(0x28001435) Process/appbrand0 WeChat/arm64 Weixin NetType/WIFI Language/zh_CN ABI/arm64 miniProgram/wx532ecb3bdaaf92f9'
},
// body: '',
@@ -413,12 +430,14 @@ function like (likeUserId, timeout = 2 * 1000) {
* 小程序分享任务
*
*/
function getshare (timeout = 2 * 1000) {
function getshare(timeout = 2 * 1000) {
return new Promise((resolve) => {
let url = {
url: `https://zm.t7a.cn/api/share.php?safe=${zmnlxq}`,
url: `https://warhorsechina.cojoy.com.cn/app/api/custom/share?safe=${zmnlxq}`,
headers: {
'Host': 'zm.t7a.cn',
'Host': 'warhorsechina.cojoy.com.cn',
'CUSTOMAPPID': 'wx94dca6ef07a54c55',
'cGvnZetrWSWfLcdYaN40mLdFx6ObkRltdZmhS5hQkgDbuZd9bLcQevwBVEjx-war-horse-zm-2025': 'CjkFMAxsbtJ1VFO0xTbjwthRyAXEbyYgFNQWdUwgVY21PBcefkNbehUCWYBp',
'user-agent': 'Mozilla/5.0 (Linux; Android 10; MI 8 Build/QKQ1.190828.002; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/86.0.4240.99 XWEB/3235 MMWEBSDK/20220204 Mobile Safari/537.36 MMWEBID/6242 MicroMessenger/8.0.20.2080(0x28001435) Process/appbrand0 WeChat/arm64 Weixin NetType/WIFI Language/zh_CN ABI/arm64 miniProgram/wx532ecb3bdaaf92f9'
},
// body: '',
@@ -447,12 +466,14 @@ function getshare (timeout = 2 * 1000) {
* 小程序战马分享任务
*
*/
function checkslgift (timeout = 2 * 1000) {
function checkslgift(timeout = 2 * 1000) {
return new Promise((resolve) => {
let url = {
url: `https://zm.t7a.cn/api/checkslgift.php?safe=${zmnlxq}`,
url: `https://warhorsechina.cojoy.com.cn/app/api/custom/checkslgift?safe=${zmnlxq}`,
headers: {
'Host': 'zm.t7a.cn',
'Host': 'warhorsechina.cojoy.com.cn',
'CUSTOMAPPID': 'wx94dca6ef07a54c55',
'cGvnZetrWSWfLcdYaN40mLdFx6ObkRltdZmhS5hQkgDbuZd9bLcQevwBVEjx-war-horse-zm-2025': 'CjkFMAxsbtJ1VFO0xTbjwthRyAXEbyYgFNQWdUwgVY21PBcefkNbehUCWYBp',
'user-agent': 'Mozilla/5.0 (Linux; Android 10; MI 8 Build/QKQ1.190828.002; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/86.0.4240.99 XWEB/3235 MMWEBSDK/20220204 Mobile Safari/537.36 MMWEBID/6242 MicroMessenger/8.0.20.2080(0x28001435) Process/appbrand0 WeChat/arm64 Weixin NetType/WIFI Language/zh_CN ABI/arm64 miniProgram/wx532ecb3bdaaf92f9'
},
// body: '',
@@ -481,12 +502,14 @@ function checkslgift (timeout = 2 * 1000) {
* 小程序完善信息
*
*/
function saveuserinfo (avatar, nickname, sex, birthday, tel, timeout = 2 * 1000) {
function saveuserinfo(avatar, nickname, sex, birthday, tel, timeout = 2 * 1000) {
return new Promise((resolve) => {
let url = {
url: `https://zm.t7a.cn/api/saveuserinfo.php?safe=${zmnlxq}&avatar=${encodeURIComponent(avatar)}&nickname=${encodeURIComponent(nickname)}&uname=${encodeURIComponent(nickname)}&sex=${sex}&birthday=${birthday}&tel=${tel}`,
url: `https://warhorsechina.cojoy.com.cn/app/api/custom/saveuserinfo?safe=${zmnlxq}&avatar=${encodeURIComponent(avatar)}&nickname=${encodeURIComponent(nickname)}&uname=${encodeURIComponent(nickname)}&sex=${sex}&birthday=${birthday}&tel=${tel}`,
headers: {
'Host': 'zm.t7a.cn',
'Host': 'warhorsechina.cojoy.com.cn',
'CUSTOMAPPID': 'wx94dca6ef07a54c55',
'cGvnZetrWSWfLcdYaN40mLdFx6ObkRltdZmhS5hQkgDbuZd9bLcQevwBVEjx-war-horse-zm-2025': 'CjkFMAxsbtJ1VFO0xTbjwthRyAXEbyYgFNQWdUwgVY21PBcefkNbehUCWYBp',
'user-agent': 'Mozilla/5.0 (Linux; Android 10; MI 8 Build/QKQ1.190828.002; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/86.0.4240.99 XWEB/3235 MMWEBSDK/20220204 Mobile Safari/537.36 MMWEBID/6242 MicroMessenger/8.0.20.2080(0x28001435) Process/appbrand0 WeChat/arm64 Weixin NetType/WIFI Language/zh_CN ABI/arm64 miniProgram/wx532ecb3bdaaf92f9'
},
// body: '',
@@ -515,12 +538,14 @@ function saveuserinfo (avatar, nickname, sex, birthday, tel, timeout = 2 * 1000)
* 公众号口令只可完成一次
*
*/
function gzhkl (timeout = 2 * 1000) {
function gzhkl(timeout = 2 * 1000) {
return new Promise((resolve) => {
let url = {
url: `https://zm.t7a.cn/api/gzhkl.php?safe=${zmnlxq}&kl=${encodeURIComponent('有能量 当燃战马!')}`,
url: `https://warhorsechina.cojoy.com.cn/app/api/custom/gzhkl?safe=${zmnlxq}&kl=${encodeURIComponent('有能量 当燃战马!')}`,
headers: {
'Host': 'zm.t7a.cn',
'Host': 'warhorsechina.cojoy.com.cn',
'CUSTOMAPPID': 'wx94dca6ef07a54c55',
'cGvnZetrWSWfLcdYaN40mLdFx6ObkRltdZmhS5hQkgDbuZd9bLcQevwBVEjx-war-horse-zm-2025': 'CjkFMAxsbtJ1VFO0xTbjwthRyAXEbyYgFNQWdUwgVY21PBcefkNbehUCWYBp',
'user-agent': 'Mozilla/5.0 (Linux; Android 10; MI 8 Build/QKQ1.190828.002; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/86.0.4240.99 XWEB/3235 MMWEBSDK/20220204 Mobile Safari/537.36 MMWEBID/6242 MicroMessenger/8.0.20.2080(0x28001435) Process/appbrand0 WeChat/arm64 Weixin NetType/WIFI Language/zh_CN ABI/arm64 miniProgram/wx532ecb3bdaaf92f9'
},
// body: '',
@@ -552,12 +577,14 @@ function gzhkl (timeout = 2 * 1000) {
* 查询题库
*
*/
async function gettiku (timeout = 2 * 1000) {
async function gettiku(timeout = 2 * 1000) {
return new Promise((resolve) => {
let url = {
url: `https://zm.t7a.cn/api/getquesbackstatus.php?safe=${zmnlxq}`,
url: `https://warhorsechina.cojoy.com.cn/app/api/custom/getquesbackstatus?safe=${zmnlxq}`,
headers: {
'Host': 'zm.t7a.cn',
'Host': 'warhorsechina.cojoy.com.cn',
'CUSTOMAPPID': 'wx94dca6ef07a54c55',
'cGvnZetrWSWfLcdYaN40mLdFx6ObkRltdZmhS5hQkgDbuZd9bLcQevwBVEjx-war-horse-zm-2025': 'CjkFMAxsbtJ1VFO0xTbjwthRyAXEbyYgFNQWdUwgVY21PBcefkNbehUCWYBp',
'user-agent': 'Mozilla/5.0 (Linux; Android 10; MI 8 Build/QKQ1.190828.002; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/86.0.4240.99 XWEB/3235 MMWEBSDK/20220204 Mobile Safari/537.36 MMWEBID/6242 MicroMessenger/8.0.20.2080(0x28001435) Process/appbrand0 WeChat/arm64 Weixin NetType/WIFI Language/zh_CN ABI/arm64 miniProgram/wx532ecb3bdaaf92f9'
},
// body: '',
@@ -605,12 +632,14 @@ async function gettiku (timeout = 2 * 1000) {
* 刷新题目
*
*/
function getques (timeout = 2 * 1000) {
function getques(timeout = 2 * 1000) {
return new Promise((resolve) => {
let url = {
url: `https://zm.t7a.cn/api/getques.php?safe=${zmnlxq}`,
url: `https://warhorsechina.cojoy.com.cn/app/api/custom/getques?safe=${zmnlxq}`,
headers: {
'Host': 'zm.t7a.cn',
'Host': 'warhorsechina.cojoy.com.cn',
'CUSTOMAPPID': 'wx94dca6ef07a54c55',
'cGvnZetrWSWfLcdYaN40mLdFx6ObkRltdZmhS5hQkgDbuZd9bLcQevwBVEjx-war-horse-zm-2025': 'CjkFMAxsbtJ1VFO0xTbjwthRyAXEbyYgFNQWdUwgVY21PBcefkNbehUCWYBp',
'user-agent': 'Mozilla/5.0 (Linux; Android 10; MI 8 Build/QKQ1.190828.002; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/86.0.4240.99 XWEB/3235 MMWEBSDK/20220204 Mobile Safari/537.36 MMWEBID/6242 MicroMessenger/8.0.20.2080(0x28001435) Process/appbrand0 WeChat/arm64 Weixin NetType/WIFI Language/zh_CN ABI/arm64 miniProgram/wx532ecb3bdaaf92f9'
},
// body: '',
@@ -636,12 +665,14 @@ function getques (timeout = 2 * 1000) {
* 答题1
*
*/
function ques1 (timeout = 2 * 1000) {
function ques1(timeout = 2 * 1000) {
return new Promise((resolve) => {
let url = {
url: `https://zm.t7a.cn/api/subques.php?safe=${zmnlxq}&qid=126&val=C`,
url: `https://warhorsechina.cojoy.com.cn/app/api/custom/subques?safe=${zmnlxq}&qid=126&val=C`,
headers: {
'Host': 'zm.t7a.cn',
'Host': 'warhorsechina.cojoy.com.cn',
'CUSTOMAPPID': 'wx94dca6ef07a54c55',
'cGvnZetrWSWfLcdYaN40mLdFx6ObkRltdZmhS5hQkgDbuZd9bLcQevwBVEjx-war-horse-zm-2025': 'CjkFMAxsbtJ1VFO0xTbjwthRyAXEbyYgFNQWdUwgVY21PBcefkNbehUCWYBp',
'user-agent': 'Mozilla/5.0 (Linux; Android 10; MI 8 Build/QKQ1.190828.002; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/86.0.4240.99 XWEB/3235 MMWEBSDK/20220204 Mobile Safari/537.36 MMWEBID/6242 MicroMessenger/8.0.20.2080(0x28001435) Process/appbrand0 WeChat/arm64 Weixin NetType/WIFI Language/zh_CN ABI/arm64 miniProgram/wx532ecb3bdaaf92f9'
},
// body: '',
@@ -669,12 +700,14 @@ function ques1 (timeout = 2 * 1000) {
* 答题2
*
*/
function ques2 (timeout = 2 * 1000) {
function ques2(timeout = 2 * 1000) {
return new Promise((resolve) => {
let url = {
url: `https://zm.t7a.cn/api/subques.php?safe=${zmnlxq}&qid=138&val=C`,
url: `https://warhorsechina.cojoy.com.cn/app/api/custom/subques?safe=${zmnlxq}&qid=138&val=C`,
headers: {
'Host': 'zm.t7a.cn',
'Host': 'warhorsechina.cojoy.com.cn',
'CUSTOMAPPID': 'wx94dca6ef07a54c55',
'cGvnZetrWSWfLcdYaN40mLdFx6ObkRltdZmhS5hQkgDbuZd9bLcQevwBVEjx-war-horse-zm-2025': 'CjkFMAxsbtJ1VFO0xTbjwthRyAXEbyYgFNQWdUwgVY21PBcefkNbehUCWYBp',
'user-agent': 'Mozilla/5.0 (Linux; Android 10; MI 8 Build/QKQ1.190828.002; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/86.0.4240.99 XWEB/3235 MMWEBSDK/20220204 Mobile Safari/537.36 MMWEBID/6242 MicroMessenger/8.0.20.2080(0x28001435) Process/appbrand0 WeChat/arm64 Weixin NetType/WIFI Language/zh_CN ABI/arm64 miniProgram/wx532ecb3bdaaf92f9'
},
// body: '',
@@ -704,12 +737,14 @@ function ques2 (timeout = 2 * 1000) {
* 答题3
*
*/
function ques3 (timeout = 2 * 1000) {
function ques3(timeout = 2 * 1000) {
return new Promise((resolve) => {
let url = {
url: `https://zm.t7a.cn/api/subques.php?safe=${zmnlxq}&qid=119&val=A`,
url: `https://warhorsechina.cojoy.com.cn/app/api/custom/subques?safe=${zmnlxq}&qid=119&val=A`,
headers: {
'Host': 'zm.t7a.cn',
'Host': 'warhorsechina.cojoy.com.cn',
'CUSTOMAPPID': 'wx94dca6ef07a54c55',
'cGvnZetrWSWfLcdYaN40mLdFx6ObkRltdZmhS5hQkgDbuZd9bLcQevwBVEjx-war-horse-zm-2025': 'CjkFMAxsbtJ1VFO0xTbjwthRyAXEbyYgFNQWdUwgVY21PBcefkNbehUCWYBp',
'user-agent': 'Mozilla/5.0 (Linux; Android 10; MI 8 Build/QKQ1.190828.002; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/86.0.4240.99 XWEB/3235 MMWEBSDK/20220204 Mobile Safari/537.36 MMWEBID/6242 MicroMessenger/8.0.20.2080(0x28001435) Process/appbrand0 WeChat/arm64 Weixin NetType/WIFI Language/zh_CN ABI/arm64 miniProgram/wx532ecb3bdaaf92f9'
},
// body: '',
@@ -739,12 +774,14 @@ function ques3 (timeout = 2 * 1000) {
* 领养马儿
*
*/
function getmaer (timeout = 2 * 1000) {
function getmaer(timeout = 2 * 1000) {
return new Promise((resolve) => {
let url = {
url: `https://zm.t7a.cn/api/starthorse.php?safe=${zmnlxq}`,
url: `https://warhorsechina.cojoy.com.cn/app/api/custom/starthorse?safe=${zmnlxq}`,
headers: {
'Host': 'zm.t7a.cn',
'Host': 'warhorsechina.cojoy.com.cn',
'CUSTOMAPPID': 'wx94dca6ef07a54c55',
'cGvnZetrWSWfLcdYaN40mLdFx6ObkRltdZmhS5hQkgDbuZd9bLcQevwBVEjx-war-horse-zm-2025': 'CjkFMAxsbtJ1VFO0xTbjwthRyAXEbyYgFNQWdUwgVY21PBcefkNbehUCWYBp',
'user-agent': 'Mozilla/5.0 (Linux; Android 10; MI 8 Build/QKQ1.190828.002; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/86.0.4240.99 XWEB/3235 MMWEBSDK/20220204 Mobile Safari/537.36 MMWEBID/6242 MicroMessenger/8.0.20.2080(0x28001435) Process/appbrand0 WeChat/arm64 Weixin NetType/WIFI Language/zh_CN ABI/arm64 miniProgram/wx532ecb3bdaaf92f9'
},
// body: '',
@@ -770,12 +807,14 @@ function getmaer (timeout = 2 * 1000) {
* 摸一摸
*
*/
function getmoyimo (timeout = 2 * 1000) {
function getmoyimo(timeout = 2 * 1000) {
return new Promise((resolve) => {
let url = {
url: `https://zm.t7a.cn/api/strokehorse.php?safe=${zmnlxq}`,
url: `https://warhorsechina.cojoy.com.cn/app/api/custom/strokehorse?safe=${zmnlxq}`,
headers: {
'Host': 'zm.t7a.cn',
'Host': 'warhorsechina.cojoy.com.cn',
'CUSTOMAPPID': 'wx94dca6ef07a54c55',
'cGvnZetrWSWfLcdYaN40mLdFx6ObkRltdZmhS5hQkgDbuZd9bLcQevwBVEjx-war-horse-zm-2025': 'CjkFMAxsbtJ1VFO0xTbjwthRyAXEbyYgFNQWdUwgVY21PBcefkNbehUCWYBp',
'user-agent': 'Mozilla/5.0 (Linux; Android 10; MI 8 Build/QKQ1.190828.002; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/86.0.4240.99 XWEB/3235 MMWEBSDK/20220204 Mobile Safari/537.36 MMWEBID/6242 MicroMessenger/8.0.20.2080(0x28001435) Process/appbrand0 WeChat/arm64 Weixin NetType/WIFI Language/zh_CN ABI/arm64 miniProgram/wx532ecb3bdaaf92f9'
},
// body: '',
@@ -801,12 +840,14 @@ function getmoyimo (timeout = 2 * 1000) {
* 喂马
*
*/
async function getweima (timeout = 2 * 1000) {
async function getweima(timeout = 2 * 1000) {
return new Promise((resolve) => {
let url = {
url: `https://zm.t7a.cn/api/horseeat.php?safe=${zmnlxq}`,
url: `https://warhorsechina.cojoy.com.cn/app/api/custom/horseeat?safe=${zmnlxq}`,
headers: {
'Host': 'zm.t7a.cn',
'Host': 'warhorsechina.cojoy.com.cn',
'CUSTOMAPPID': 'wx94dca6ef07a54c55',
'cGvnZetrWSWfLcdYaN40mLdFx6ObkRltdZmhS5hQkgDbuZd9bLcQevwBVEjx-war-horse-zm-2025': 'CjkFMAxsbtJ1VFO0xTbjwthRyAXEbyYgFNQWdUwgVY21PBcefkNbehUCWYBp',
'user-agent': 'Mozilla/5.0 (Linux; Android 10; MI 8 Build/QKQ1.190828.002; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/86.0.4240.99 XWEB/3235 MMWEBSDK/20220204 Mobile Safari/537.36 MMWEBID/6242 MicroMessenger/8.0.20.2080(0x28001435) Process/appbrand0 WeChat/arm64 Weixin NetType/WIFI Language/zh_CN ABI/arm64 miniProgram/wx532ecb3bdaaf92f9'
},
// body: '',
@@ -837,13 +878,15 @@ async function getweima (timeout = 2 * 1000) {
* 偷饲料
*
*/
function tousiliao (num2) {
function tousiliao(num2) {
let isCompleted = false;
return new Promise((resolve) => {
let url = {
url: `https://zm.t7a.cn/api/subhorseplayer.php?safe=${zmnlxq}&friendid=${totalAccountsfrinds[num2]?.id}&type=1`,
url: `https://warhorsechina.cojoy.com.cn/app/api/custom/subhorseplayer?safe=${zmnlxq}&friendid=${totalAccountsfrinds[num2]?.id}&type=1`,
headers: {
'Host': 'zm.t7a.cn',
'Host': 'warhorsechina.cojoy.com.cn',
'CUSTOMAPPID': 'wx94dca6ef07a54c55',
'cGvnZetrWSWfLcdYaN40mLdFx6ObkRltdZmhS5hQkgDbuZd9bLcQevwBVEjx-war-horse-zm-2025': 'CjkFMAxsbtJ1VFO0xTbjwthRyAXEbyYgFNQWdUwgVY21PBcefkNbehUCWYBp',
'user-agent': 'Mozilla/5.0 (Linux; Android 10; MI 8 Build/QKQ1.190828.002; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/86.0.4240.99 XWEB/3235 MMWEBSDK/20220204 Mobile Safari/537.36 MMWEBID/6242 MicroMessenger/8.0.20.2080(0x28001435) Process/appbrand0 WeChat/arm64 Weixin NetType/WIFI Language/zh_CN ABI/arm64 miniProgram/wx532ecb3bdaaf92f9'
},
}
@@ -857,7 +900,7 @@ function tousiliao (num2) {
} finally {
resolve(isCompleted);
}
},)
})
})
}
@@ -865,13 +908,15 @@ function tousiliao (num2) {
* 送饲料
*
*/
function songsiliao (num2) {
function songsiliao(num2) {
let isCompleted = false;
return new Promise((resolve) => {
let url = {
url: `https://zm.t7a.cn/api/subhorseplayer.php?safe=${zmnlxq}&friendid=${totalAccountsfrinds[num2]?.id}&type=2`,
url: `https://warhorsechina.cojoy.com.cn/app/api/custom/subhorseplayer?safe=${zmnlxq}&friendid=${totalAccountsfrinds[num2]?.id}&type=2`,
headers: {
'Host': 'zm.t7a.cn',
'Host': 'warhorsechina.cojoy.com.cn',
'CUSTOMAPPID': 'wx94dca6ef07a54c55',
'cGvnZetrWSWfLcdYaN40mLdFx6ObkRltdZmhS5hQkgDbuZd9bLcQevwBVEjx-war-horse-zm-2025': 'CjkFMAxsbtJ1VFO0xTbjwthRyAXEbyYgFNQWdUwgVY21PBcefkNbehUCWYBp',
'user-agent': 'Mozilla/5.0 (Linux; Android 10; MI 8 Build/QKQ1.190828.002; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/86.0.4240.99 XWEB/3235 MMWEBSDK/20220204 Mobile Safari/537.36 MMWEBID/6242 MicroMessenger/8.0.20.2080(0x28001435) Process/appbrand0 WeChat/arm64 Weixin NetType/WIFI Language/zh_CN ABI/arm64 miniProgram/wx532ecb3bdaaf92f9'
},
// body: '',
@@ -887,14 +932,14 @@ function songsiliao (num2) {
} finally {
resolve(isCompleted);
}
},)
})
})
}
/**
* 获取远程版本,鸟VPS不改post请求获取不了内容
*/
function getVersion (timeout = 3 * 1000) {
function getVersion(timeout = 3 * 1000) {
return new Promise((resolve) => {
let url = {
url: `http://www.holyxie.com/script/zmnlxq/zmnlxq.js`,
@@ -915,7 +960,7 @@ function getVersion (timeout = 3 * 1000) {
//#region 固定代码 可以不管他
// ============================================变量检查============================================ \\
async function Envs () {
async function Envs() {
if (zmnlxq) {
if (zmnlxq.indexOf("@") != -1) {
zmnlxq.split("@").forEach((item) => {
@@ -937,7 +982,7 @@ async function Envs () {
}
// ============================================发送消息============================================ \\
async function SendMsg (message) {
async function SendMsg(message) {
if (!message)
return;
@@ -954,4 +999,4 @@ async function SendMsg (message) {
}
// prettier-ignore 固定代码 不用管他
function Env (t, e) { "undefined" != typeof process && JSON.stringify(process.env).indexOf("xxxxxx") > -1 && process.exit(0); class s { constructor(t) { this.env = t } send (t, e = "GET") { t = "string" == typeof t ? { url: t } : t; let s = this.get; return "POST" === e && (s = this.post), new Promise((e, i) => { s.call(this, t, (t, s, r) => { t ? i(t) : e(s) }) }) } get (t) { return this.send.call(this.env, t) } post (t) { return this.send.call(this.env, t, "POST") } } return new class { constructor(t, e) { this.name = t, this.http = new s(this), this.data = null, this.dataFile = "box.dat", this.logs = [], this.isMute = !1, this.isNeedRewrite = !1, this.logSeparator = "\n", this.startTime = (new Date).getTime(), Object.assign(this, e), this.log("", `🔔${this.name}, 开始!`) } isNode () { return "undefined" != typeof module && !!module.exports } isQuanX () { return "undefined" != typeof $task } isSurge () { return "undefined" != typeof $httpClient && "undefined" == typeof $loon } isLoon () { return "undefined" != typeof $loon } toObj (t, e = null) { try { return JSON.parse(t) } catch { return e } } toStr (t, e = null) { try { return JSON.stringify(t) } catch { return e } } getjson (t, e) { let s = e; const i = this.getdata(t); if (i) try { s = JSON.parse(this.getdata(t)) } catch { } return s } setjson (t, e) { try { return this.setdata(JSON.stringify(t), e) } catch { return !1 } } getScript (t) { return new Promise(e => { this.get({ url: t }, (t, s, i) => e(i)) }) } runScript (t, e) { return new Promise(s => { let i = this.getdata("@chavy_boxjs_userCfgs.httpapi"); i = i ? i.replace(/\n/g, "").trim() : i; let r = this.getdata("@chavy_boxjs_userCfgs.httpapi_timeout"); r = r ? 1 * r : 20, r = e && e.timeout ? e.timeout : r; const [o, h] = i.split("@"), n = { url: `http://${h}/v1/scripting/evaluate`, body: { script_text: t, mock_type: "cron", timeout: r }, headers: { "X-Key": o, Accept: "*/*" } }; this.post(n, (t, e, i) => s(i)) }).catch(t => this.logErr(t)) } loaddata () { if (!this.isNode()) return {}; { this.fs = this.fs ? this.fs : require("fs"), this.path = this.path ? this.path : require("path"); const t = this.path.resolve(this.dataFile), e = this.path.resolve(process.cwd(), this.dataFile), s = this.fs.existsSync(t), i = !s && this.fs.existsSync(e); if (!s && !i) return {}; { const i = s ? t : e; try { return JSON.parse(this.fs.readFileSync(i)) } catch (t) { return {} } } } } writedata () { if (this.isNode()) { this.fs = this.fs ? this.fs : require("fs"), this.path = this.path ? this.path : require("path"); const t = this.path.resolve(this.dataFile), e = this.path.resolve(process.cwd(), this.dataFile), s = this.fs.existsSync(t), i = !s && this.fs.existsSync(e), r = JSON.stringify(this.data); s ? this.fs.writeFileSync(t, r) : i ? this.fs.writeFileSync(e, r) : this.fs.writeFileSync(t, r) } } lodash_get (t, e, s) { const i = e.replace(/\[(\d+)\]/g, ".$1").split("."); let r = t; for (const t of i) if (r = Object(r)[t], void 0 === r) return s; return r } lodash_set (t, e, s) { return Object(t) !== t ? t : (Array.isArray(e) || (e = e.toString().match(/[^.[\]]+/g) || []), e.slice(0, -1).reduce((t, s, i) => Object(t[s]) === t[s] ? t[s] : t[s] = Math.abs(e[i + 1]) >> 0 == +e[i + 1] ? [] : {}, t)[e[e.length - 1]] = s, t) } getdata (t) { let e = this.getval(t); if (/^@/.test(t)) { const [, s, i] = /^@(.*?)\.(.*?)$/.exec(t), r = s ? this.getval(s) : ""; if (r) try { const t = JSON.parse(r); e = t ? this.lodash_get(t, i, "") : e } catch (t) { e = "" } } return e } setdata (t, e) { let s = !1; if (/^@/.test(e)) { const [, i, r] = /^@(.*?)\.(.*?)$/.exec(e), o = this.getval(i), h = i ? "null" === o ? null : o || "{}" : "{}"; try { const e = JSON.parse(h); this.lodash_set(e, r, t), s = this.setval(JSON.stringify(e), i) } catch (e) { const o = {}; this.lodash_set(o, r, t), s = this.setval(JSON.stringify(o), i) } } else s = this.setval(t, e); return s } getval (t) { return this.isSurge() || this.isLoon() ? $persistentStore.read(t) : this.isQuanX() ? $prefs.valueForKey(t) : this.isNode() ? (this.data = this.loaddata(), this.data[t]) : this.data && this.data[t] || null } setval (t, e) { return this.isSurge() || this.isLoon() ? $persistentStore.write(t, e) : this.isQuanX() ? $prefs.setValueForKey(t, e) : this.isNode() ? (this.data = this.loaddata(), this.data[e] = t, this.writedata(), !0) : this.data && this.data[e] || null } initGotEnv (t) { this.got = this.got ? this.got : require("got"), this.cktough = this.cktough ? this.cktough : require("tough-cookie"), this.ckjar = this.ckjar ? this.ckjar : new this.cktough.CookieJar, t && (t.headers = t.headers ? t.headers : {}, void 0 === t.headers.Cookie && void 0 === t.cookieJar && (t.cookieJar = this.ckjar)) } get (t, e = (() => { })) { t.headers && (delete t.headers["Content-Type"], delete t.headers["Content-Length"]), this.isSurge() || this.isLoon() ? (this.isSurge() && this.isNeedRewrite && (t.headers = t.headers || {}, Object.assign(t.headers, { "X-Surge-Skip-Scripting": !Line truncated
function Env(t, e) { "undefined" != typeof process && JSON.stringify(process.env).indexOf("xxxxxx") > -1 && process.exit(0); class s { constructor(t) { this.env = t } send(t, e = "GET") { t = "string" == typeof t ? { url: t } : t; let s = this.get; return "POST" === e && (s = this.post), new Promise((e, i) => { s.call(this, t, (t, s, r) => { t ? i(t) : e(s) }) }) } get(t) { return this.send.call(this.env, t) } post(t) { return this.send.call(this.env, t, "POST") } } return new class { constructor(t, e) { this.name = t, this.http = new s(this), this.data = null, this.dataFile = "box.dat", this.logs = [], this.isMute = !1, this.isNeedRewrite = !1, this.logSeparator = "\n", this.startTime = (new Date).getTime(), Object.assign(this, e), this.log("", `🔔${this.name}, 开始!`) } isNode() { return "undefined" != typeof module && !!module.exports } isQuanX() { return "undefined" != typeof $task } isSurge() { return "undefined" != typeof $httpClient && "undefined" == typeof $loon } isLoon() { return "undefined" != typeof $loon } toObj(t, e = null) { try { return JSON.parse(t) } catch { return e } } toStr(t, e = null) { try { return JSON.stringify(t) } catch { return e } } getjson(t, e) { let s = e; const i = this.getdata(t); if (i) try { s = JSON.parse(this.getdata(t)) } catch { } return s } setjson(t, e) { try { return this.setdata(JSON.stringify(t), e) } catch { return !1 } } getScript(t) { return new Promise(e => { this.get({ url: t }, (t, s, i) => e(i)) }) } runScript(t, e) { return new Promise(s => { let i = this.getdata("@chavy_boxjs_userCfgs.httpapi"); i = i ? i.replace(/\n/g, "").trim() : i; let r = this.getdata("@chavy_boxjs_userCfgs.httpapi_timeout"); r = r ? 1 * r : 20, r = e && e.timeout ? e.timeout : r; const [o, h] = i.split("@"), n = { url: `http://${h}/v1/scripting/evaluate`, body: { script_text: t, mock_type: "cron", timeout: r }, headers: { "X-Key": o, Accept: "*/*" } }; this.post(n, (t, e, i) => s(i)) }).catch(t => this.logErr(t)) } loaddata() { if (!this.isNode()) return {}; { this.fs = this.fs ? this.fs : require("fs"), this.path = this.path ? this.path : require("path"); const t = this.path.resolve(this.dataFile), e = this.path.resolve(process.cwd(), this.dataFile), s = this.fs.existsSync(t), i = !s && this.fs.existsSync(e); if (!s && !i) return {}; { const i = s ? t : e; try { return JSON.parse(this.fs.readFileSync(i)) } catch (t) { return {} } } } } writedata() { if (this.isNode()) { this.fs = this.fs ? this.fs : require("fs"), this.path = this.path ? this.path : require("path"); const t = this.path.resolve(this.dataFile), e = this.path.resolve(process.cwd(), this.dataFile), s = this.fs.existsSync(t), i = !s && this.fs.existsSync(e), r = JSON.stringify(this.data); s ? this.fs.writeFileSync(t, r) : i ? this.fs.writeFileSync(e, r) : this.fs.writeFileSync(t, r) } } lodash_get(t, e, s) { const i = e.replace(/\[(\d+)\]/g, ".$1").split("."); let r = t; for (const t of i) if (r = Object(r)[t], void 0 === r) return s; return r } lodash_set(t, e, s) { return Object(t) !== t ? t : (Array.isArray(e) || (e = e.toString().match(/[^.[\]]+/g) || []), e.slice(0, -1).reduce((t, s, i) => Object(t[s]) === t[s] ? t[s] : t[s] = Math.abs(e[i + 1]) >> 0 == +e[i + 1] ? [] : {}, t)[e[e.length - 1]] = s, t) } getdata(t) { let e = this.getval(t); if (/^@/.test(t)) { const [, s, i] = /^@(.*?)\.(.*?)$/.exec(t), r = s ? this.getval(s) : ""; if (r) try { const t = JSON.parse(r); e = t ? this.lodash_get(t, i, "") : e } catch (t) { e = "" } } return e } setdata(t, e) { let s = !1; if (/^@/.test(e)) { const [, i, r] = /^@(.*?)\.(.*?)$/.exec(e), o = this.getval(i), h = i ? "null" === o ? null : o || "{}" : "{}"; try { const e = JSON.parse(h); this.lodash_set(e, r, t), s = this.setval(JSON.stringify(e), i) } catch (e) { const o = {}; this.lodash_set(o, r, t), s = this.setval(JSON.stringify(o), i) } } else s = this.setval(t, e); return s } getval(t) { return this.isSurge() || this.isLoon() ? $persistentStore.read(t) : this.isQuanX() ? $prefs.valueForKey(t) : this.isNode() ? (this.data = this.loaddata(), this.data[t]) : this.data && this.data[t] || null } setval(t, e) { return this.isSurge() || this.isLoon() ? $persistentStore.write(t, e) : this.isQuanX() ? $prefs.setValueForKey(t, e) : this.isNode() ? (this.data = this.loaddata(), this.data[e] = t, this.writedata(), !0) : this.data && this.data[e] || null } initGotEnv(t) { this.got = this.got ? this.got : require("got"), this.cktough = this.cktough ? this.cktough : require("tough-cookie"), this.ckjar = this.ckjar ? this.ckjar : new this.cktough.CookieJar, t && (t.headers = t.headers ? t.headers : {}, void 0 === t.headers.Cookie && void 0 === t.cookieJar && (t.cookieJar = this.ckjar)) } get(t, e = (() => { })) { t.headers && (delete t.headers["Content-Type"], delete t.headers["Content-Length"]), this.isSurge() || this.isLoon() ? (this.isSurge() && this.isNeedRewrite && (t.headers = t.headers || {}, Object.assign(t.headers, { "X-Surge-Skip-Scripting": !1 })), $httpClient.get(tLine truncated