感受如今的超級課程表不少功能過於冗餘,想寫經過它的API來作一個本身用,結果畢業了html
版本:4.9.0
平臺:安卓java
總覽
url |
備註 |
http://120.55.151.61/ |
BaseUrl |
V2/StudentSkip/loginCheckV4.action |
登錄 |
V2/Course/getCourseTableFromServer.action |
獲取課程表 |
V2/Course/getCourseTableBySuperId.action |
經過他人分享獲取課程表,如二維碼 |
V2/SMS/getResetPasswordCaptcha.action |
發送修改密碼短信 |
V2/SMS/checkResetPasswordCaptcha.action |
驗證短信驗證碼 |
V2/StudentSkip/resetPasswordByMobileV4.action |
修改密碼 |
url |
備註 |
http://112.124.54.19/ |
BaseUrl |
Score/score/getVerCode.action |
獲取教務系統驗證碼 |
Score/score/importScoreFromSchool.action |
查詢成績 |
登錄
POST V2/StudentSkip/loginCheckV4.action
Body
參數 |
測試值 |
解釋 |
platform |
1 |
平臺 |
phoneVersion |
19 |
手機版本 安卓爲SDK版本 |
deviceCode |
355757010701395 |
設備代碼(IMEI) |
account |
* |
==加密後帳號== |
versionNumber |
9.4.0 |
超級課程表版本號 |
password |
* |
==加密後密碼== |
updateInfo |
false |
|
channel |
ppMarket |
渠道 |
phoneBrand |
samsung |
手機制造商 |
phoneModel |
SM-G955F |
手機型號 |
備註
帳號和密碼加密算法:aes([context], md5("friday_syllabus"))
附上JAVA實現代碼算法
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;
}
}
獲取課程表
POST V2/Course/getCourseTableFromServer.action
Header
key |
value |
JSESSIONID |
登錄後獲取 |
SERVERID |
登錄後獲取 |
Body
參數 |
測試值 |
解釋 |
platform |
1 |
|
phoneVersion |
19 |
|
term |
2 |
第幾學期[一、2] |
beginYear |
2017 |
年份 |
versionNumber |
9.4.0 |
|
channel |
ppMarket |
|
phoneBrand |
samsung |
|
phoneModel |
SM-G955F |
|
經過他人分享獲取課程表,如二維碼
POST V2/Course/getCourseTableBySuperId.action
他人分享的二維碼中包含了term、beginYear、superIdapp
Header
key |
value |
JSESSIONID |
登錄後獲取 |
SERVERID |
登錄後獲取 |
Body
參數 |
測試值 |
解釋 |
platform |
1 |
|
phoneVersion |
19 |
|
versionNumber |
9.4.0 |
|
channel |
ppMarket |
|
phoneBrand |
samsung |
|
phoneModel |
SM-G955F |
|
term |
2 |
學期 |
beginYear |
2017 |
年份 |
superId |
23110790 |
成績課程表用戶id |
發送修改密碼短信
POST V2/SMS/getResetPasswordCaptcha.action
Body
參數 |
測試值 |
解釋 |
retry |
0 |
|
platform |
1 |
|
phoneVersion |
19 |
|
versionNumber |
9.4.0 |
|
areaCode |
null |
|
channel |
ppMarket |
|
phoneBrand |
samsung |
|
phoneModel |
SM-G955F |
|
m |
* |
手機號碼 |
mm |
* |
aes(手機號碼) |
驗證短信驗證碼
POST V2/SMS/checkResetPasswordCaptcha.action
Body
參數 |
測試值 |
解釋 |
platform |
1 |
|
m |
* |
手機號碼 |
phoneVersion |
19 |
|
captcha |
253059 |
驗證碼 |
versionNumber |
9.4.0 |
|
areaCode |
null |
|
channel |
ppMarket |
|
phoneBrand |
samsung |
|
phoneModel |
SM-G955F |
|
修改密碼
POST V2/StudentSkip/resetPasswordByMobileV4.action
Body
參數 |
測試值 |
解釋 |
platform |
1 |
|
mobileNumber |
* |
手機號碼 |
phoneVersion |
19 |
|
captcha |
253059 |
驗證碼 |
newPassword |
* |
加密後的密碼,參考登錄 |
versionNumber |
9.4.0 |
|
areaCode |
null |
|
channel |
ppMarket |
|
phoneBrand |
samsung |
|
phoneModel |
SM-G955F |
|
獲取教務系統驗證碼
GET Score/score/getVerCode.action
query
參數 |
測試值 |
解釋 |
identity |
6ADF482EEF5A9B5D0CC47C7E864AC3BC |
登錄後返回值中獲取 |
schoolIdentity |
307CD6AA7D26520033EF2429279E6079 |
學校ID、登錄後返回值中獲取 |
ts |
1527672631 |
Unix時間戳 |
獲取成績
POST Score/score/importScoreFromSchool.action
Header
key |
value |
JSESSIONID |
獲取教務系統驗證碼Response中獲取 |
Body
參數 |
測試值 |
解釋 |
v_c |
6ukr |
驗證碼 |
t_m |
2 |
|
schoolIdentity |
307CD6AA7D26520033EF2429279E6079 |
學校ID,登錄後獲取 |
s_n |
* |
學校教務系統帳號 |
s_Id |
0 |
|
p_d |
* |
學校教務系統密碼 |
identity |
6ADF482EEF5A9B5D0CC47C7E864AC3BC |
Id,登錄後獲取 |
b_y |
2017 |
年份 |
其餘
博客ide