flutter_chaoxing 0.1.2
flutter_chaoxing: ^0.1.2 copied to clipboard
Typed Chaoxing (学习通) protocol clients, request signing, and classroom sign-in for Dart.
Changelog #
0.1.2 #
Live-verified against the production server (2026-09-23) with a real account.
- Fix
parseCourses: the productionbackclazzdataenvelope is class-centric —channelList[].contentis the class (id=classId,name,chatid,bbsid,cpi) and the course sits atcontent.course.data[](id=courseId,name,teacherfactor,imageurl). The previous parser expected a course-centriccontent.clazz[]and returned zero courses. The legacy shape is kept as a fallback. - Add the classroom sign submit
pptSign/stuSignajax(buildClassroomSignUri/submitClassroomSign/ChaoxingClassroomSignResult). This is the endpoint the H5newsign/preSignpage calls — the official Android client never invokes it natively (it drives the WebView), but it is a plain cookie-authenticated GET, so plain signs now work headlessly. Captured live: a纯普通sign returnedsuccess; an anti-cheat防作弊(验证码)sign returnedvalidate(needs acaptcha.chaoxing.comtoken passed back via thevalidateparameter, plus the nativeCLIENT_DEVICE_FLAGdeviceCode). - Add
bbsidtoChaoxingCourse(the discussion-board id, present in the live payload and needed byChaoxingApiService.fetchTopicList). - Confirm device registration end-to-end: a real login returned a 172-char
clientIdthatresolveDeviceIdentitydecrypted into a validcxcid/scpair, and the server issued it even thoughcdtype/cdid/mediaDrmIdwere omitted — so those three fields are optional forclientIdissuance.
0.1.1 #
- Add
ChaoxingUserAgent, reproducing the official 7.0.2 User-Agent structure (p482ej/C30158f.java). Every constant is read from the decompiled source, not guessed: protocol tag3(C37365n.f144063a), screen code264(C32754f.f129562AviaC32316b.m127070g), channel@Kalimdor(C32764p.mo127076e/mo127077fboth false), packagecom.chaoxing.mobile. The nativecryptUserAgentwrapper is not reversed, so the plaintext suffix is emitted (server-tolerated; see the class doc). ChaoxingAuthService,ChaoxingSignService, andChaoxingApiServicenow take an optionaluserAgent, defaulting to the previous value.- Confirm the device-registration public key: static RE shows
getDeviceInfo(encrypt) anddecryptDeviceInfo(decrypt) both use the SPKI key atlibsecuritylib.so0x52e19, which is the one already embedded. Document thegetDeviceInfoJSON key order and thatplatform/os_nameare"android"andmediaDrmIdcomes fromSettings.Secure.getString.
0.1.0 #
- Initial public preview extracted from the Luotopia app.
- Byte-exact ports of the Chaoxing 7.0.2 request-signing primitives: the two
inf_encquery-signing variants, thecxsign/signTokenheader scheme, and thewebRequestSignRSA-SHA256 bridge used byCLIENT_FORM_SIGN. - Device registration helpers (
CxDevice.getDeviceInfo/decryptDeviceInfo) with chunked RSA and jsoncppFastWriteralignment. - Login and SSO cookie-harvest client (
ChaoxingAuthService). - Classroom sign-in client (
ChaoxingSignService), including the native Fanyausersign/addsignendpoint and theCLIENT_FORM_SIGNbridge implementation. - Student-facing API client (
ChaoxingApiService): notices, grades, homework feed, live classes, course content, timetable, messages, and discussions. - Typed domain models mirroring the official
StudentMission,Course, andClazzschemas, plus theactiveTypedispatch table.