Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ISP support for SIMBA #26

Open
hangim opened this issue Sep 15, 2023 · 2 comments
Open

ISP support for SIMBA #26

hangim opened this issue Sep 15, 2023 · 2 comments

Comments

@hangim
Copy link

hangim commented Sep 15, 2023

Hi, SIMBA and M1 also become Wireless@SG operators, while this project only supports Singtel and StarHub.

I got a SIMBA SIM card recently, and I tried to add corresponding support. But I am not well at IDA, my code can't work correctly, and maybe I missed something.

I want to share my code snippet here so that other people can have more investigation if possible.

import requests


def RegisterUser(dob, mobile, transid):
    # WSG.Common.Ams.SIMBAAms::RegisterUser(class WSG.Common.Model.UserRegistrationModel model)
    r = requests.post('https://wsg.simba.sg/account/register/',
                      json={
                          'birth_date': dob,
                          'mobile_number': mobile,
                          'transaction_id': transid
                      })
    print(r.status_code)
    print(r.text)


def ValidateExistAccount(dob, mobile, transid):
    # WSG.Common.Ams.SIMBAAms::ValidateExistAccount(string nric_or_dob, string mobile)
    r = requests.post('https://wsg.simba.sg/account/password/retrieve/',
                      json={
                          'birth_date': dob,
                          'mobile_number': mobile,
                          'transaction_id': transid
                      })
    print(r.status_code)
    print(r.text)


def ValidateOTP(dob, mobile, transid, otp):
    # WSG.Common.Ams.SIMBAAms::ValidateOTP(class WSG.Common.Model.UserRegistrationModel registration, string otp)
    r = requests.post('https://wsg.simba.sg/account/register/authenticate/',
                      json={
                          'birth_date': dob,
                          'mobile_number': mobile,
                          'transaction_id': transid,
                          'success_code': '200',
                          'otp': otp
                      })
    print(r.status_code)
    print(r.text)


if __name__ == '__main__':
    DEFAULT_TRANSID = "053786654500000000000000"

    dob = '01012001'  # ddMMyyyy, change to your birthday
    mobile = '6512345678'  # change to your mobile
    transid = DEFAULT_TRANSID
    otp = '123456'

    # RegisterUser(dob, mobile, transid)
    ValidateExistAccount(dob, mobile, transid)
    # ValidateOTP(dob, mobile, transid, otp)

When running this code, the response is:

409
{"detail":{"status_code":1107,"status_message":"Invalid Fields"}}

I guess like transaction_id has some problem, but I have no idea how to fix it.

@yinyinnnnn
Copy link
Contributor

For SIMBA users in a hurry, you should be able to get credentials by passing "starhub" to the ISP parameter (-I),

./wasg-register.py -I starhub <mobile-no> <dob>

I was able to get credentials, using a SIMBA number with the command above.

@hangim
Copy link
Author

hangim commented Apr 6, 2024

For SIMBA users in a hurry, you should be able to get credentials by passing "starhub" to the ISP parameter (-I),

./wasg-register.py -I starhub <mobile-no> <dob>

I was able to get credentials, using a SIMBA number with the command above.

Wow, It's worked, interesting...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants