Suen

The Proxyman Playbook for Seiue Script Resilience

A strategic guide to capturing, understanding, and rebuilding the Seiue attendance script by analyzing the underlying API contract. This comprehensive version includes an advanced guide for long-term maintenance and proactive adaptation.

0) Foundational Concepts: The “Why” Behind the Method

The web browser is just one client of Seiue’s API. Our script is another. The core principle is to make our script behave exactly like the browser, sending identical requests to the server’s API.


A) Prereqs & Setup


B) Script ↔ Capture Mapping & Analysis

This section maps core script functions and parameters to the API calls you must capture.

1) Authentication: The Digital Keycard
2) Schedule & Verification: The Source of Truth
3) Student Roster: The Payload’s Building Blocks
4) Submit Attendance: The Critical Action

C) Understanding Server-Side Error Codes (The Server’s Clues)


D) The Disaster Recovery Flow (One-Click Rebuild)

Execute these steps in order when the script suddenly stops working.

  1. Prepare Sandbox: Enable Proxyman, use Incognito, disable QUIC, set domain filters. Clear the Proxyman list.
  2. Capture Auth: Log in from scratch. Capture POST /login and POST /authorize.
  3. Capture Schedule: Open today’s calendar. Capture GET /events.
  4. Capture Verification: Open the attendance overview page. Capture GET /attendances-info.
  5. Capture Roster: Open a class roster. Capture GET /group-members.
  6. Capture Submission: Submit attendance for one student. Capture the PUT/POST request. This is your ground truth.
  7. Patch the Code: Make minimal, targeted edits to your script based on the captured ground truth.
  8. Test Incrementally: Test the patched script on a single, non-critical future lesson first.

E) Appendix: Advanced Maintenance & Drift Guide

This section contains proactive strategies for maintaining the script’s long-term health.

1. Advanced Token Lifecycle (Refresh vs. Re-login)
2. Headers, Cookies, and Casing
3. Verification and Ground Truth
4. Payload Drift and Data Integrity
5. Network and Workflow Hygiene
6. Proactive Recovery: Baseline Snapshots
7. Security and Logging Best Practices