Skip to content

ISP support for SIMBA #26

@hangim

Description

@hangim

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions