wasg-register.py is a Python implementation of the Wireless@SG SSA registration protocol.
Please see this article for more information.
Currently, this script can probably only be used by Singapore citizens, as it requires a valid NRIC number; the server appears to validate the NRIC and complains if it is wrong.
However, it should be possible to register a Wireless@SGx account using a passport number. This has not been tested extensively, and it might require the use of a different set of APIs. If you manage to successfully register using a passport number, please let us know.
It also appears possible to register for an account using just a mobile phone number and a date of birth. Future versions might support doing this.
Note: It is possible to generate a valid NRIC number and use that to register. Please DO NOT DO THIS, as it might result in the invalidation of the account of the person that NRIC actually belongs to.
pip install pycrypto
pip install requests
# Basic usage: ./wasg-register.py <mobile number> <nric>
$ ./wasg-register.py 659XXXXXXX SXXXXXXXX
OTP will be sent to mobile phone number 659XXXXXXX
Enter OTP to continue: XXXXXX
Credentials:
userid = 'XXX'
password = 'XXX'
(correct as of 2019-08-02)
usage: wasg-register.py [-h] [-I {test,starhub,myrepublic,singtel}]
[-s SALUTATION] [-n NAME] [-c COUNTRY] [-d DOB]
[-e EMAIL] [-t TRANSID] [-1] [-O OTP]
[-S SUCCESS_CODE] [-D DECRYPTION_DATE] [-v]
mobile nric
Wireless@SG registration utility.
positional arguments:
mobile Mobile phone number
nric NRIC or equivalent ID number
optional arguments:
-h, --help show this help message and exit
-I {test,starhub,myrepublic,singtel}, --isp {test,starhub,myrepublic,singtel}
ISP to register with
-s SALUTATION, --salutation SALUTATION
Salutation
-n NAME, --name NAME Full name
-c COUNTRY, --country COUNTRY
Nationality country code
-d DOB, --dob DOB Date of Birth
-e EMAIL, --email EMAIL
Email address
-t TRANSID, --transid TRANSID
Transaction ID
-1, --registration-phase-only
Terminate after registration phase, returns success
code.
-O OTP, --otp OTP OTP received on mobile. Note that if this is set, then
wasg-register will skip the registration phase and
move immediately to OTP validation. success-code must
also be provided.
-S SUCCESS_CODE, --success-code SUCCESS_CODE
Success code received during registration phase. Note
that if this is set, then wasg-register will skip the
registration phase and move immediately to OTP
validation. OTP must also be provided.
-D DECRYPTION_DATE, --decryption-date DECRYPTION_DATE
Date the OTP was generated, for use in decryption, in
YYMMDD format.
-v, --verbose Be verbose.
GNU General Public License v3.0
See LICENSE for full text.