Super curriculum API

Time:2020-2-22

I feel that many functions of the current super curriculum are too redundant. I want to write an API for my own use. I graduated

Version: 4.9.0

Platform: Android

Overview

url Remarks
http://120.55.151.61/ BaseUrl
V2/StudentSkip/loginCheckV4.action Land
V2/Course/getCourseTableFromServer.action Get Curriculum
V2/Course/getCourseTableBySuperId.action Access to curriculum through sharing, such as QR code
V2/SMS/getResetPasswordCaptcha.action Send SMS to modify password
V2/SMS/checkResetPasswordCaptcha.action Verify SMS verification code
V2/StudentSkip/resetPasswordByMobileV4.action Change Password
url Remarks
http://112.124.54.19/ BaseUrl
Score/score/getVerCode.action Obtain the educational administration system verification code
Score/score/importScoreFromSchool.action Query results

Land

POST V2/StudentSkip/loginCheckV4.action

Body

parameter Test value explain
platform 1 platform
phoneVersion 19 Android is SDK version
deviceCode 355757010701395 Equipment code (IMEI)
account * ==Account number after encryption==
versionNumber 9.4.0 Super curriculum version number
password * ==Password after encryption==
updateInfo false
channel ppMarket channel
phoneBrand samsung Mobile phone manufacturer
phoneModel SM-G955F Mobile phone model

Remarks

Account and password encryption algorithm: AES ([context], MD5 (“Friday Fu Syllabus”))

Attach Java implementation code

import javax.crypto.Cipher;
import javax.crypto.spec.SecretKeySpec;
import java.io.UnsupportedEncodingException;
import java.net.URLEncoder;
import java.security.Key;
import java.security.MessageDigest;

public class SuperClassUtil {

    public static String encrypt(String string) {
        String result = null;
        try {
            result = aes(URLEncoder.encode(string, "utf-8"), md5("friday_syllabus"));
        } catch (UnsupportedEncodingException e) {
            e.printStackTrace();
        }
        return result;
    }

    private static String aes(String context, String key) {
        String result = "";
        Key secretKeySpec;
        try {
            MessageDigest messageDigest = MessageDigest.getInstance("MD5");
            secretKeySpec = new SecretKeySpec(messageDigest.digest(key.getBytes("utf-8")), "AES");
            Cipher instance = Cipher.getInstance("AES");
            instance.init(Cipher.ENCRYPT_MODE, secretKeySpec);
            result = byteToStr(instance.doFinal(context.getBytes("utf-8")));
        } catch (Exception e) {
            e.printStackTrace();
        }
        return result;
    }

    private static String byteToStr(byte[] bArr) {
        StringBuilder stringBuilder = new StringBuilder();
        for (byte b : bArr) {
            String toHexString = Integer.toHexString(b & 255);
            if (toHexString.length() == 1) {
                toHexString = '0' + toHexString;
            }
            stringBuilder.append(toHexString.toUpperCase());
        }
        return stringBuilder.toString();
    }

    private static String md5(String str) {
        int i = 0;
        String str2 = null;
        char[] cArr = new char[]{'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f'};
        try {
            MessageDigest instance = MessageDigest.getInstance("MD5");
            instance.update(str.getBytes());
            byte[] digest = instance.digest();
            char[] cArr2 = new char[32];
            int i2 = 0;
            while (i < 16) {
                byte b = digest[i];
                int i3 = i2 + 1;
                cArr2[i2] = cArr[(b >>> 4) & 15];
                i2 = i3 + 1;
                cArr2[i3] = cArr[b & 15];
                i++;
            }
            str2 = new String(cArr2).toUpperCase();
        } catch (Exception e) {
            e.printStackTrace();
        }
        return str2;
    }
}

Get Curriculum

POST V2/Course/getCourseTableFromServer.action

Header

key value
JSESSIONID Access after landing
SERVERID Access after landing

Body

parameter Test value explain
platform 1
phoneVersion 19
term 2 Semester [1, 2]
beginYear 2017 Particular year
versionNumber 9.4.0
channel ppMarket
phoneBrand samsung
phoneModel SM-G955F

Access to curriculum through sharing, such as QR code

POST V2/Course/getCourseTableBySuperId.action

The QR code shared by others containstermbeginYearsuperId

Header

key value
JSESSIONID Access after landing
SERVERID Access after landing

Body

parameter Test value explain
platform 1
phoneVersion 19
versionNumber 9.4.0
channel ppMarket
phoneBrand samsung
phoneModel SM-G955F
term 2 Semester
beginYear 2017 Particular year
superId 23110790 Grade schedule user ID

Send SMS to modify password

POST V2/SMS/getResetPasswordCaptcha.action

Body

parameter Test value explain
retry 0
platform 1
phoneVersion 19
versionNumber 9.4.0
areaCode null
channel ppMarket
phoneBrand samsung
phoneModel SM-G955F
m * Phone number
mm * AES (mobile number)

Verify SMS verification code

POST V2/SMS/checkResetPasswordCaptcha.action

Body

parameter Test value explain
platform 1
m * Phone number
phoneVersion 19
captcha 253059 Verification Code
versionNumber 9.4.0
areaCode null
channel ppMarket
phoneBrand samsung
phoneModel SM-G955F

Change Password

POST V2/StudentSkip/resetPasswordByMobileV4.action

Body

parameter Test value explain
platform 1
mobileNumber * Phone number
phoneVersion 19
captcha 253059 Verification Code
newPassword * Encrypted password, refer to login
versionNumber 9.4.0
areaCode null
channel ppMarket
phoneBrand samsung
phoneModel SM-G955F

Obtain the educational administration system verification code

GET Score/score/getVerCode.action

query

parameter Test value explain
identity 6ADF482EEF5A9B5D0CC47C7E864AC3BC Get from return value after login
schoolIdentity 307CD6AA7D26520033EF2429279E6079 School ID, obtained from the return value after login
ts 1527672631 UNIX timestamp

Get results

POST Score/score/importScoreFromSchool.action

Header

key value
JSESSIONID Get the verification code of educational administration system in response

Body

parameter Test value explain
v_c 6ukr Verification Code
t_m 2
schoolIdentity 307CD6AA7D26520033EF2429279E6079 School ID, obtained after landing
s_n * School educational administration system account
s_Id 0
p_d * School educational administration system password
identity 6ADF482EEF5A9B5D0CC47C7E864AC3BC ID, get after login
b_y 2017 Particular year

Other

Blog

Recommended Today

Hot! Front and rear learning routes of GitHub target 144K

Hello, Sifu’s little friend. I’m silent Wang Er. Last week, while appreciating teacher Ruan Yifeng’s science and technology weekly, I found a powerful learning route, which has been marked with 144K on GitHub. It’s very popular. It covers not only the front-end and back-end learning routes, but also the operation and maintenance learning routes. As […]