Easy campus to achieve automatic clock in

Keywords: Python crawler

Easy campus to achieve automatic clock in

Recently, Xiao Du came to a certain university in Yunnan and clocked in and reported his personal information on Yi campus every day. This wave of operation really made my scalp numb, so I made a living and wanted to punch in automatically.

The principle is similar to the previous automatic punch in principle of mushroom Ding. Interested bosses can then repair my source code. →_ → Portal: Mushroom Ding officially repaired the V1 interface. Because little Du ape has graduated and can't punch in and capture key data, my fans, little Du ape tried his best, but gave the following punch in ideas: 1.token encryption twice; 2. Request data encryption; Interested bosses can send me a private letter and give me the mushroom Ding account. I'll re grab the package and repair the two encrypted information cracking of mushroom Ding V2 interface.

Preface - thanks:

  • Hello old fellow iron, haven't met in a long time, O. ∩)O. After half a year, my little Du ape came back hhhh; Recently, I have been seeing many fans on CSDN leave messages to Xiao Du, asking why Xiao Du doesn't update the blog content?

  • After disappearing for half a year, Xiao Du worked as a medical Java full stack Development Engineer in a technology company in Yunnan and the establishment of Dianfeng XX company. Every bit of growth and bitter experience in the past six months will be shared with you in future blogs (disclosed in advance ♪) ω・) ノ: where should Java programmers go in the era of big front-end, pit closing guide - front-end and back-end cross domain requests, and how should I start a business in the era of diversified e-commerce!!! " More dry goods knowledge, little Du is sorting...)

  • Little Du also started a new college life, which means that he will have more time to share dry goods. A new life means a new beginning. Choice is often more important than effort, but 90% of people make the wrong choice. I don't know what the new college life will do to me in the next two years, but I still live in the sun.

  • Finally, tactical advertising is implanted into O(∩_ ∩) O: the professional team of little Du ape studio will provide you with the best personalized Java project in 24 hours. Please contact little Du ape qq:130042386

1, Use Fiddler to capture easy campus personal information

  • 1. Log in to e-campus on your mobile phone, click health registration, punch in for the first time and capture key information.

  • 2. Fill in correct information to ensure data accuracy( From the analysis of packet capture, the next punch is based on the last JSON data)

  • 3. Go to the PC and open Fiddler to see the request https://h5.xiaofubao.com/marketing/health/getDetail

    • Click the request to obtain the Userid (user login id) carried in the request
    • Click the request to obtain the UUToken (identification code) carried in the request

2, Write punch in source code

Copy Userid and UUtoken in Fiddle

The source code of automatic clock in is:

import requests

# @author: Du Shun Chang
# @version: 1.0
# @date: 2021/9/4 20:56
# @Todo: easy campus automatic clock in
# @qq:1300442386

def DoDetail(json):
     # Enter clock in information
    data = json
    # Add punch in information
    data['address'] = ''
    # Fill in Tokan information
    data['uuToken'] = ''
    # Fill in Userid
    data['loginUserId'] = ''
    # Fill in the school id
    data['loginSchoolCode'] = ''
    # Fill in the name of the school
    data['loginSchoolName'] = ''
    # Fill in body temperature information
    data['temperature'] = '36.8'
    # Fill in the punch in address
    data['longitudeAndLatitude'] = ''
    # Fill in longitude and latitude information
    data['longitudeAndLatitude'] = ''
    #Request easy campus interface
    response = requests.post("https://h5.xiaofubao.com/marketing/health/doDetail",headers=headers,data=data,verify=False)

    #Get userid 
def GetDetail(userid):
    data1 = {'userId':userid}
    response = requests.post("https://h5.xiaofubao.com/marketing/health/getDetail",headers=headers,data=data1,verify=False)
    return response.json()
    #Forged request header
if __name__ == '__main__':
    headers = {'User-Agent':'Mozilla/5.0 (Linux; Android 10; LRA-AL00 Build/HONORLRA-AL00; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/83.0.4103.106 Mobile Safari/537.36 Html5Plus/1.0 (Immersed/26.0) ZJYXYwebviewbroswer ZJYXYAndroid tourCustomer /yunmaapp.NET/2.2.3/yunma6c73a2ed-6791-4c24-92f2-64c4530509fb',
      # Fill in Userid
    json = GetDetail('');

3, Create plan

  • Little Du ape has its own independent server, so put the code on the server and punch in at 8:00 on time tomorrow. After two days of rigorous testing, there is no Bug at present.

  • How can a small partner without a server solve the problem of automatic clock in? Little Du ape provides the following solutions:

    • 1. Create a plan on your PC and automatically execute the code every day (not recommended, it is required to punch in the time period, and the computer must be turned on)

    • 2. (highly recommended) little Du ape comes to a university in Yunnan, which needs a client to dial. Why don't programmers have a network? It affects me to type code O(∩)_ ∩) so I bought a router, brushed the firmware, opened the dark mode, and realized the 24-hour continuous network (this method will be shared in future blogs to facilitate cloud division students to swim the network). I accidentally saw that the router can support Python script execution.

    • 3. Use raspberry pie board, brush a Linux environment, install Python environment, and access the network to realize automatic clock in.

    4, Thanks

A new life begins. Little Du is also busy with the life of "three points and one line". Thank the fans who have supported little Du ape for a long time. I burst into tears when I saw your message. Maybe as I said to you, "I still have many unfinished dreams. Why should I stop?".

Your must be the driving force of my creation. Little Du is also committed to sharing the dry goods of java development, new college life and licking bricks of Java for your life;

Posted by sleepydad on Mon, 06 Sep 2021 21:05:59 -0700