English | 简体中文
⚠️ Use for educational/personal purposes only. Do not engage in illegal resale or commercial scalping.
This repository contains two main parts:
| Directory | Description |
|---|---|
src/ |
Node.js/TypeScript backend logic: CAS login, captcha recognition, booking workflow. |
frontend/ |
Vite + Vue web UI (WIP) for scheduling and monitoring. |
- ✅ CAS login with weak-password flow handling and shared cookie jar.
- ✅ Custom captcha recognizer built on
onnxruntime-node+ Jimp preprocessing. - ✅ Automatic retries when the server returns “验证码错误”.
- ✅ Payment URLs printed for quick manual payment (15-minute window).
- ✅
.envvalidation viazodto avoid missing credentials. - ✅ Front-end scaffold (Vite + Vue) ready for scheduling dashboards.
- Node.js ≥ 18
- npm ≥ 9
- Python ≥ 3.10 (only if you need to retrain the captcha model)
- Install dependencies
cd typescript npm install - Configure credentials
cp .env.example .env # fill BUAA_USERNAME / BUAA_PASSWORD - Prepare model files
- Pretrained
captcha.onnx,captcha.onnx.data, andcharset.txtalready ship with the repo (seesrc/model/). Just clone and go—no extra training required.
- Pretrained
- Run the script
The CLI executes the sample scenario in
npm run dev
src/index.tsand prints the payment URL when successful.
Currently WIP – ships a clean Vue scaffold to build dashboards (date picker, scheduling, logs, etc.).
cd typescript/frontend
npm install
npm run dev
# open http://localhost:5173/Build REST endpoints around ticket.buy() (or wrap it in a scheduler) and consume them from the UI.
| Question | Answer |
|---|---|
| GitHub doesn’t show my latest commits | Only commits merged into the default branch count toward contributions. |
Can I delete captcha.onnx.data? |
No. The ONNX model references that file for weights. |
TypeScript can’t import App.vue |
Add src/env.d.ts with the Vue module declaration and include **/*.d.ts in tsconfig.app.json. |
| “验证码错误” persists | The script retries automatically; if it still fails, retrain the model or increase maxCaptchaRetries. |
- Front-end UI: schedule planner, log viewer, manual trigger
- Cron/batch booking with multi-route support
- Payment link notifications (SMTP/Webhook/SMS)
- Inventory checks and refund workflows
- More OCR/model optimizations
Contributions and issue reports are welcome! 🎉