| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384 |
- // 043001RC00
- class Log {
- static TAG = '[SMS]'
- static Debug = true
- static format(...msg) {
- let m = []
- for (let i = 0; i < msg.length; i++) {
- if (typeof msg[i] === 'object') {
- m.push(JSON.stringify(msg[i]))
- } else {
- m.push(msg[i])
- }
- }
- m = m.join(' ')
- return m
- }
- static i(...msg) {
- if (!this.Debug) return
- console.log(`\x1b[30m${this.TAG} ${this.format(...msg)}\x1b[0m`)
- }
- static w(...msg) {
- console.log(`\x1b[33m${this.TAG} ${this.format(...msg)}\x1b[0m`)
- }
- static e(...msg) {
- console.log(`\x1b[31m${this.TAG} ${this.format(...msg)}\x1b[0m`)
- }
- static s(...msg) {
- console.log(`\x1b[32m${this.TAG} ${this.format(...msg)}\x1b[0m`)
- }
- }
- function trace(tag) {
- Log.e((tag || '') + Java.use('android.util.Log').getStackTraceString(Java.use('java.lang.Throwable').$new()))
- }
- setImmediate(() => {
- Java.perform(function () {
- const PhoneNumberVerification = Java.use('com.google.android.gms.constellation.PhoneNumberVerification')
- PhoneNumberVerification.$init.overload(
- 'java.lang.String',
- 'long',
- 'int',
- 'int',
- 'java.lang.String',
- 'android.os.Bundle',
- 'int',
- 'long'
- ).implementation = function (a, b, c, d, e, f, g, h) {
- Log.i('PhoneNumberVerification.$init', a, b, c, d, e, f, g, h)
- return this.$init(a, b, c, d, e, f, g, h)
- }
- const VerifyPhoneNumberRequest = Java.use('com.google.android.gms.constellation.VerifyPhoneNumberRequest')
- VerifyPhoneNumberRequest.$init.overload(
- 'java.lang.String',
- 'long',
- 'com.google.android.gms.constellation.IdTokenRequest',
- 'android.os.Bundle',
- 'java.util.List',
- 'boolean',
- 'int',
- 'java.util.List'
- ).implementation = function (a, b, c, d, e, f, g, h) {
- Log.i('VerifyPhoneNumberRequest.$init', a, b, c, d, e, f, g, h)
- return this.$init(a, b, c, d, e, f, g, h)
- }
- const bhyo = Java.use('bhyo')
- bhyo.d.overload('java.lang.String').implementation = function (str) {
- Log.s(`bhyo.d(str=${str}) modify res.b to upi-carrier-id-with-mo-sms-relax`)
- const res = this.d(str)
- // res.b.value = 'upi-carrier-id-with-mo-sms-relax'
- Log.s(res)
- return res
- }
- bhyo.c.overload('java.lang.String').implementation = function (str) {
- Log.s(`bhyo.c(str=${str}) modify res.C to 1`)
- const res = this.c(str)
- res.C.value = 2
- return res
- }
- })
- }, 0)
|