惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

阮一峰的网络日志
阮一峰的网络日志
D
Darknet – Hacking Tools, Hacker News & Cyber Security
S
Schneier on Security
The Last Watchdog
The Last Watchdog
Cyberwarzone
Cyberwarzone
S
Securelist
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
C
Cyber Attacks, Cyber Crime and Cyber Security
L
Lohrmann on Cybersecurity
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
博客园 - 司徒正美
The Cloudflare Blog
V
V2EX
博客园_首页
博客园 - 聂微东
Vercel News
Vercel News
人人都是产品经理
人人都是产品经理
G
GRAHAM CLULEY
T
Tenable Blog
Last Week in AI
Last Week in AI
Y
Y Combinator Blog
L
LINUX DO - 最新话题
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
SecWiki News
SecWiki News
博客园 - 三生石上(FineUI控件)
S
Secure Thoughts
N
News | PayPal Newsroom
T
The Blog of Author Tim Ferriss
The GitHub Blog
The GitHub Blog
T
Troy Hunt's Blog
博客园 - 【当耐特】
Forbes - Security
Forbes - Security
H
Hacker News: Front Page
A
About on SuperTechFans
B
Blog RSS Feed
Engineering at Meta
Engineering at Meta
MongoDB | Blog
MongoDB | Blog
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
罗磊的独立博客
D
DataBreaches.Net
P
Privacy & Cybersecurity Law Blog
Schneier on Security
Schneier on Security
Application and Cybersecurity Blog
Application and Cybersecurity Blog
Google DeepMind News
Google DeepMind News
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
Jina AI
Jina AI
D
Docker
P
Proofpoint News Feed

WishMeLz - 猎奇

Namecrane/CraneMail 优化访问速度之 - Nginx stream 做 TCP 邮件代理 Scriptable 小组件 - 搬瓦工 - WishMeLz KeepAlive.cc 使用笔记,保备案尝鲜版 (方案很多,这只是一类,选择适合自己的即可) - WishMeLz namecrane CraneMail Lifetime 250G 使用记录 沉浸式翻译使用 DeepLX Api Key - WishMeLz ip信息查询 - WishMeLz Teamspeak 3 安装和汉化 - WishMeLz 地址生成器 - WishMeLz 自建Teamspeak3 - WishMeLz
PTT签到脚本 - WishMeLz
Wish · 2024-09-18 · via WishMeLz - 猎奇
PTT签到脚本

https://www.pttime.org/forums.php?action 在这里找到cookie
uid 在个人中心查看

const axios = require("axios");

// 在此处替换为自己的 cookie 和 uid
const cookie = ';
const uid = '';

const headers = {
    accept: "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7",
    "accept-language": "zh-CN,zh;q=0.9",
    "cache-control": "no-cache",
    cookie: cookie,
    dnt: "1",
    pragma: "no-cache",
    priority: "u=0, i",
    referer: "https://www.pttime.org/",
    "sec-ch-ua": '"Chromium";v="127", "Not)A;Brand";v="99"',
    "sec-ch-ua-arch": '"arm"',
    "sec-ch-ua-bitness": '"64"',
    "sec-ch-ua-full-version": '"127.0.6533.89"',
    "sec-ch-ua-full-version-list": '"Chromium";v="127.0.6533.89", "Not)A;Brand";v="99.0.0.0"',
    "sec-ch-ua-mobile": "?0",
    "sec-ch-ua-model": '""',
    "sec-ch-ua-platform": '"macOS"',
    "sec-ch-ua-platform-version": '"15.0.0"',
    "sec-fetch-dest": "document",
    "sec-fetch-mode": "navigate",
    "sec-fetch-site": "same-origin",
    "sec-fetch-user": "?1",
    "upgrade-insecure-requests": "1",
    "user-agent":
        "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.0.0 Safari/537.36",
};

const url = `https://www.pttime.org/attendance.php?type=sign&uid=${uid}`;

const checkIn = () => {
    axios
        .get(url, { headers })
        .then((response) => {
            const totalSignMatch = response.data.match(/总签到:(\d+) 天/);
            const magicMatch = response.data.match(/获得魔力值:<b>(\d+)<\/b>/);

            if (totalSignMatch && magicMatch) {
                const totalSign = totalSignMatch[1];
                const magic = magicMatch[1];
                console.log(`签到成功!总签到: ${totalSign} 天, 获得魔力值: ${magic}`);
            } else {
                console.log("未找到相关信息,请检查响应内容。");
            }
        })
        .catch((error) => {
            console.error("请求失败:", error);
        });
};

setInterval(() => {
    const now = new Date();
    const currentHour = now.getHours();
    if (currentHour === 6) {
        let newZDate = new Date();
        let strTime = `${newZDate.getFullYear()}-${(newZDate.getMonth() + 1) > 9 ? (newZDate.getMonth() + 1) : '0' + (newZDate.getMonth() + 1)}-${newZDate.getDate() > 9 ? newZDate.getDate() : '0' + newZDate.getDate()} ${newZDate.getHours() > 9 ? newZDate.getHours() : '0' + newZDate.getHours()}:${newZDate.getMinutes() > 9 ? newZDate.getMinutes() : '0' + newZDate.getMinutes()}:${newZDate.getSeconds() > 9 ? newZDate.getSeconds() : '0' + newZDate.getSeconds()}`;
        console.log(strTime);
        checkIn();
    } 
}, 20 * 60 * 1000);