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

推荐订阅源

P
Palo Alto Networks Blog
Recent Commits to openclaw:main
Recent Commits to openclaw:main
C
CERT Recently Published Vulnerability Notes
C
Cybersecurity and Infrastructure Security Agency CISA
S
Schneier on Security
S
Securelist
酷 壳 – CoolShell
酷 壳 – CoolShell
C
CXSECURITY Database RSS Feed - CXSecurity.com
Cyberwarzone
Cyberwarzone
Apple Machine Learning Research
Apple Machine Learning Research
S
SegmentFault 最新的问题
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
GbyAI
GbyAI
Security Latest
Security Latest
Last Week in AI
Last Week in AI
Microsoft Security Blog
Microsoft Security Blog
云风的 BLOG
云风的 BLOG
Recorded Future
Recorded Future
Webroot Blog
Webroot Blog
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
TaoSecurity Blog
TaoSecurity Blog
C
Cisco Blogs
博客园 - 【当耐特】
Blog — PlanetScale
Blog — PlanetScale
Hugging Face - Blog
Hugging Face - Blog
B
Blog
Hacker News - Newest:
Hacker News - Newest: "LLM"
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
Attack and Defense Labs
Attack and Defense Labs
The Last Watchdog
The Last Watchdog
U
Unit 42
阮一峰的网络日志
阮一峰的网络日志
Project Zero
Project Zero
WordPress大学
WordPress大学
L
LINUX DO - 最新话题
F
Fortinet All Blogs
L
LINUX DO - 热门话题
PCI Perspectives
PCI Perspectives
Simon Willison's Weblog
Simon Willison's Weblog
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
MongoDB | Blog
MongoDB | Blog
Latest news
Latest news
P
Proofpoint News Feed
T
Threat Research - Cisco Blogs
The Hacker News
The Hacker News
爱范儿
爱范儿
O
OpenAI News
J
Java Code Geeks
T
The Exploit Database - CXSecurity.com
H
Hackread – Cybersecurity News, Data Breaches, AI and More

龙辉's Blog - 工具

对学某通的登录逆向分析 - 龙辉's Blog 天方云签程序开源 - 龙辉's Blog 蓝桥杯省赛Web题解及知识点复习 - 龙辉's Blog CTFSHOW-菜狗杯(部分WP) - 龙辉's Blog 记录一次入侵某钓鱼盗号网站的过程 - 龙辉's Blog 贵州师范大学抢课脚本-正方教务系统V8.0.0 - 龙辉's Blog 弱类型与强类型语言“=”号的不同以及引发的安全问题 - 龙辉's Blog php获取客户端ip以及ip伪造 - 龙辉's Blog XSS经典漏洞复现-手撕某非法获取个人信息网站 - 龙辉's Blog php7.2中each()函数被弃用的替换办法 - 龙辉's Blog PC-安卓歪屁嗯(科学上网) - 龙辉's Blog
简单实现每日健康自动打卡 - 龙辉's Blog
博主: Tinker-站长 · 2022-10-10 · via 龙辉's Blog - 工具

简单实现每日健康自动打卡

  • 发布时间:
  • 31178 次浏览
  • 21 条评论
  • 1505字数
  • 分类: php
  1. 首页
  2. 正文  
  3. 分享到:

前言:当代大学生每天必须做的一件事我想会有健康打卡吧,有时候忘记打卡还会被@来@去,于我而言,每天都是在学校,位置并没有变,自动打卡可以完全交给程序去完成啦~以下程序是在贵州师范大学实现,如果是其他学校,方法也差不多噢,接定制~

注意:本脚本仅供学习交流,请勿用于非法操作,建议在下载24小时后删除,由此脚本发生的问题均与本站无关。

本站提供实现原理步骤以及配合腾讯云云函数实现自动签到.

抓包

打卡无非就是向服务器提交某些信息和数据,只要捕获到所需的参数,使用编程模拟向服务器发送数据就可以实现成功打卡。
所以第一步就是抓包。因为打卡是在微信里面打,为了方便,我这里使用的是手机抓包工具 点我下载抓包精灵,按照教程配置好后点击开始,右上角选择抓取微信的,接着打开微信到打卡界面如下打卡
点击打卡后回到抓包软件。搜索daka搜索,找到这一条daka可以看到是向http://daka.wecampus.gznu.edu.cn:80/server/api/baseRecord/add?jwtToken=这里是你的token 提交的post JSON数据,接下来只需要自己用编程语言提交以下数据就可以了。这里我使用比较擅长的PHP.

代码实现

 <?php
    //author 龙辉
   // qq:1790716272
    header("Content-type: text/html; charset=utf-8");
    date_default_timezone_set("PRC");
    $token = '这里替换你的token';//这里填写token=后面的值
    $postdata='{
        "healthStatus":"健康",
        "suspectedDate":null,
        "patientDate":null,
        "isHot":false,
        "temperature":37,
        "isInHospital":"否",
        "hospital":null,
        "isolated":false,
        "isolatedMode":null,
        "isolatedAddress":null,
        "isolatedReason":null,
        "isolatedStartDate":null,
        "isolatedEndDate":null,
        "locationLatitude":"26.38743",
        "locationLongitude":"106.63461",
        "isOut":false,
        "locationCountry":"国内",
        "locationProvince":"贵州省",
        "locationCity":"贵阳市",
        "locationArea":"花溪区",
        "locationDetail":"二号路",
        "hasTravel":false,
        "travelReason":null,
        "travelFromDate":null,
        "travelFromPlace":null,
        "travelArrivalDate":null,
        "travelArrivalPlace":null,
        "travelMode":null,
        "travelComment":null,
        "hasTouchPatient":false,
        "hasOutHistory":false,
        "hasChumHot":false,
        "hasGoHighRiskArea":false,
        "hasTouchPersonFromHighRiskArea":false,
        "notes":"",
        "locationDescription":"贵州省贵阳市花溪区二号路"
    }';
    $result = xCurl('http://daka.wecampus.gznu.edu.cn:80/server/api/baseRecord/add?jwtToken='.$token,'',$postdata);
    if(json_decode($result,true)['success']==true)
    {
        echo '今日健康打卡成功'."\n".'当前时间:'.date('Y-m-d H:i:s', time());
        
    }
    else {
      echo '今日打卡失败,请检查';
    }
    
    function xCurl($url,$cookie=null,$postdata=null,$header=array()){
            $ch = curl_init();
            curl_setopt($ch, CURLOPT_URL,$url);
            if (!is_null($postdata)) curl_setopt($ch, CURLOPT_POSTFIELDS,$postdata);
            if (!is_null($cookie)) curl_setopt($ch, CURLOPT_COOKIE,$cookie);
     curl_setopt($ch, CURLOPT_HTTPHEADER, array(
                'Content-Type: application/json; charset=utf-8',
                'Content-Length:'.strlen($postdata)
            )
     );
            curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
            curl_setopt($ch, CURLOPT_ENCODING, "gzip");
            curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
            curl_setopt($ch, CURLOPT_TIMEOUT, 2);
            $re = curl_exec($ch);
            curl_close($ch);
            return $re;
        }
    ?>

如果你有服务器或虚拟空间只需要将代码上传并添加计划任务即可.

腾讯云云函数

以下是使用腾讯云云函数实现。
打开腾讯云腾讯云

在搜索框搜索云函数)1THSGSE{82OB7V%O[MA1@M.png,点击新建,选择从头开始,事件函数,运行环境选择php5.6,将上面的代码复制进去,并且把你自己的token填进去D$W8LD)RDZ3RGXB$8O%@KS0.png![][7] 触发方式选择定时触发,触发周期选择自定义,填入0 0 9,14,16 表示在每天上午9点,下午2点,4点触发.然后完成就可以啦~

如果你也懂,就自己写推送吧~我懒 这是我的机器人推送,每天签到完毕会在群里提醒我机器人


版权属于:龙辉博客

本文链接:https://blog.eirds.cn/361.html

如果没有特别声明则为本博原创。转载时须注明出处及本声明!

赞赏作者

如果觉得我的文章对你有用,请随意赞赏

简单实现每日健康自动打卡