spoof_sms_043001RC00.js 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. // 043001RC00
  2. class Log {
  3. static TAG = '[SMS]'
  4. static Debug = true
  5. static format(...msg) {
  6. let m = []
  7. for (let i = 0; i < msg.length; i++) {
  8. if (typeof msg[i] === 'object') {
  9. m.push(JSON.stringify(msg[i]))
  10. } else {
  11. m.push(msg[i])
  12. }
  13. }
  14. m = m.join(' ')
  15. return m
  16. }
  17. static i(...msg) {
  18. if (!this.Debug) return
  19. console.log(`\x1b[30m${this.TAG} ${this.format(...msg)}\x1b[0m`)
  20. }
  21. static w(...msg) {
  22. console.log(`\x1b[33m${this.TAG} ${this.format(...msg)}\x1b[0m`)
  23. }
  24. static e(...msg) {
  25. console.log(`\x1b[31m${this.TAG} ${this.format(...msg)}\x1b[0m`)
  26. }
  27. static s(...msg) {
  28. console.log(`\x1b[32m${this.TAG} ${this.format(...msg)}\x1b[0m`)
  29. }
  30. }
  31. function trace(tag) {
  32. Log.e((tag || '') + Java.use('android.util.Log').getStackTraceString(Java.use('java.lang.Throwable').$new()))
  33. }
  34. setImmediate(() => {
  35. Java.perform(function () {
  36. const bhyo = Java.use('bhyo')
  37. bhyo.d.overload('java.lang.String').implementation = function (str) {
  38. Log.s(`bhyo.d(str=${str}) modify res.b to upi-carrier-id-with-mo-sms-relax`)
  39. const res = this.d(str)
  40. res.b.value = 'upi-carrier-id-with-mo-sms-relax'
  41. Log.s(res)
  42. return res
  43. }
  44. bhyo.c.overload('java.lang.String').implementation = function (str) {
  45. Log.s(`bhyo.c(str=${str}) modify res.C to 1`)
  46. const res = this.c(str)
  47. res.C.value = 1
  48. return res
  49. }
  50. })
  51. }, 0)