/**

  • new Env('掌上天津极速版')
  • cron 5 15 * * * zstjjsb.js
  • Show:
  • 变量名:zstjjsb_data
  • 变量值:http://bbs.zaitianjin.net/zstj/v2.8/index.php 请求body(txt)中 => userId的值&salf的值
  • scriptVersionNow = '0.0.1'; */

const $ = new Env('掌上天津极速版'); const ckName = 'zstjjsb_data'; const Notify = 1; //0为关闭通知,1为打开通知,默认为1 let envSplitor = ['@', '\n']; //多账号分隔符 let strSplitor = '&'; //多变量分隔符 const CryptoJS = require('crypto-js') let scriptVersionNow = '0.0.1';

let msg = '';

async function start() { await getNotice();

let taskall = [];
for (let user of $.userList) {
    if (user.ckStatus) {
        taskall.push(await user.task());
        $.DoubleLog(`等待10s`)
        await $.wait(10000);
    }
}
await Promise.all(taskall);

}

class UserInfo { constructor(str) { this.index = ++$.userIdx; this.userId = str.split(strSplitor)[0]; //单账号多变量分隔符 this.salf = str.split(strSplitor)[1]; this.ckStatus = true; } async task() { $.DoubleLog(------ 第[${this.index}]个账号 ------) await this.sign_info() } encode(str) { //var b = new Buffer(str); var b = Buffer.from(str); var s = b.toString('base64'); var s = s.replace(///g, '_') return s } getmac() { var mac = ''; for (var i = 0; i < 6; i++) { var randomByte = Math.floor(Math.random() * 256); var hexString = randomByte.toString(16).toUpperCase(); mac += (hexString.length === 1 ? '0' + hexString : hexString) + ':'; } mac = mac.slice(0, -1); // 去掉最后一个冒号 return mac; } async sign_info() { let timestamp = Math.round(new Date().getTime() / 1000).toString(); let macs = this.getmac() let mac = encodeURIComponent(macs) let s = 'brand=OPPO&client=android&deviceInfo=OPPO_PCAM00_2021040100_10&interfaceVersion=v2.8&lat=30.1&lng=114.2&mac=' + macs + '&model=PCAM00&privacyStatus=1&region=天津市&salf=' + this.salf + '&timestamp=' + timestamp + '&uid=' + this.userId + '&userId=' + this.userId + '&version=2.8.4&versionCode=154' s = this.encode(s) let signs = CryptoJS.HmacSHA1(s, '1s_vsegymTasdgKxiKvRz5vDlyzmc92A_H6A8zg6I').toString().toUpperCase() try { let options = { method: 'POST', url: 'http://bbs.zaitianjin.net/zstj/v2.8/index.php', headers: { 'Content-Yype': 'application/x-www-form-urlencoded', 'Host': 'bbs.zaitianjin.net', 'Connection': 'Keep-Alive', 'Accept-Encoding': 'gzip', 'User-Agent': 'okhttp/4.9.3' }, body: 'c=User&lng=114.2&privacyStatus=1&sign=' + signs + '&interfaceVersion=v2.8&version=2.8.4&userId=' + this.userId + '&m=signInfo&mac=' + mac + '&versionCode=154&deviceInfo=OPPO_PCAM00_2021040100_10&uid=' + this.userId + '&client=android&model=PCAM00&region=%E5%A4%A9%E6%B4%A5%E5%B8%82&salf=' + this.salf + '&brand=OPPO&lat=30.1&timestamp=' + timestamp }, result = await httpRequest(options); //console.log(options); //console.log(result); if (result['code'] == 1) { $.DoubleLog(账号[${this.index}] 签到天数: ${result['data']['signDays']}🎉); $.DoubleLog(账号[${this.index}] 累计签到天数: ${result['data']['signAllDays']}) $.DoubleLog(账号[${this.index}] 今日是否签到: ${result['data']['signStatue']}) $.DoubleLog(账号[${this.index}] 连续签到7天奖励: ${result['data']['signData']}) if (result['data']['signStatue'] == false) { await this.sign() } } else { $.DoubleLog(账号[${this.index}] 失败 ❌); //console.log(options); //console.log(result); } } catch (e) { console.log(e); } }

async sign() {
    let timestamp = Math.round(new Date().getTime() / 1000).toString();
    let macs = this.getmac()
    let mac = encodeURIComponent(macs)
    let s = 'brand=OPPO&client=android&deviceInfo=OPPO_PCAM00_2021040100_10&interfaceVersion=v2.8&lat=30.1&lng=114.2&mac=' + macs + '&model=PCAM00&privacyStatus=1&region=天津市&salf=' + this.salf + '&timestamp=' + timestamp + '&uid=' + this.userId + '&userId=' + this.userId + '&version=2.8.4&versionCode=154'
    s = this.encode(s)
    let signs = CryptoJS.HmacSHA1(s, '1s_vsegymTasdgKxiKvRz5vDlyzmc92A_H6A8zg6I').toString().toUpperCase()
    try {
        let options = {
            method: 'POST',
            url: 'http://bbs.zaitianjin.net/zstj/v2.8/index.php',
            headers: {
                'Content-Type': 'application/x-www-form-urlencoded',
                'Host': 'bbs.zaitianjin.net',
                'Connection': 'Keep-Alive',
                'Accept-Encoding': 'gzip',
                'User-Agent': 'okhttp/4.9.3'
            },
            body: 'c=Credit&lng=114.2&privacyStatus=1&sign=' + signs + '&interfaceVersion=v2.8&version=2.8.4&userId=' + this.userId + '&m=sign&mac=' + mac + '&versionCode=154&deviceInfo=OPPO_PCAM00_2021040100_10&uid=' + this.userId + '&client=android&model=PCAM00&region=%E5%A4%A9%E6%B4%A5%E5%B8%82&salf=' + this.salf + '&brand=OPPO&lat=30.1&timestamp=' + timestamp

        }, result = await httpRequest(options);
        //console.log(options);
        //console.log(result);
        if
掌上天津极速版自动签到脚本

原文地址: https://www.cveoy.top/t/topic/pk6V 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录