
wasg-register
The wasg-register script has been updated to Python 3 for modern compatibility. Additionally, API versioning has been refined to be specific per-ISP, which resolves unexpected warnings during the registration process.
This update ports the registration script to Python 3, modernizing the codebase and addressing deprecation warnings. It also introduces per-ISP versioning for API calls, ensuring better compatibility and reliability across different service providers. The script's handling of binary data and encoding was also updated to align with Python 3 standards.
The README has been comprehensively updated to reflect recent changes to the Wireless@SGx API. It removes the outdated NRIC requirement in favor of a mobile number and Date of Birth pair, updates the cryptography dependency from pycrypto to pycryptodome, and documents a new "retrieve mode" for fetching credentials for existing accounts. The notice about the script being broken has also been removed, as the new API and password decryption routines have been successfully reversed.
The registration script has been updated to work with the latest API changes, which includes new password encryption logic using AES CCM (thanks to @IkaEren for reversing the new crypto code). A new --retrieve-mode was also introduced, utilizing the credential retrieval API (retrieve_user_*) to fetch a new set of credentials for an existing user. This bypasses the errors you would now hit if you call the default create mode too many times.
The README was updated to state that a valid NRIC is required, which helps set expectations earlier and reduces confusion around invalid user input. This is a documentation-only change, but it clarifies a core prerequisite that likely affects onboarding or form validation behavior. The practical effect is fewer avoidable mistakes from users and less ambiguity for developers integrating or testing the flow.
The Python registration script now includes more robust parsing of server responses, actively inspecting the returned result code instead of failing mysteriously when expected success keys are missing. A new _check_for_error helper extracts error messages from the payload and raises structured exception classes. Furthermore, the main entry point now catches these exceptions to print clean error messages rather than unhandled tracebacks.
The repository's README was heavily fleshed out to include basic usage examples and a comprehensive breakdown of the supported command-line arguments for the testing utility. A link was also added pointing to an extensive article regarding making Wireless@SGx work on Linux. This addition provides much-needed onboarding context for new developers or users attempting to run the registration script locally.
This push adds a LICENSE file, which is an important repository housekeeping step for making the project's legal usage and distribution terms explicit. While not a code change, it improves clarity for contributors and downstream users and likely accompanies small README/documentation updates noted in the commit message. The practical effect is that the repo is now easier to adopt and contribute to with clearer project boundaries.
This commit introduces wasg-register.py, a script that replicates the official Wireless@SG app's SSA registration protocol. It automates the multi-step process of interacting with ISP endpoints to create a new user, process OTP validation, and decrypt the resulting credentials using AES. This provides developers with a convenient, programmatic way to handle account registration natively from the command line.
