spoof_sms.js 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  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 agay = Java.use('agay')
  37. agay.q.overload('boolean').implementation = function (z) {
  38. trace('agay.q(boolean)')
  39. this.q(z)
  40. }
  41. const bwlc = Java.use('bwlc')
  42. bwlc.r.overload('java.lang.Object', 'java.util.List').implementation = function (obj, list) {
  43. trace('bwlc.r(Object, List)')
  44. console.log('obj:', obj)
  45. console.log('list:', list)
  46. for (let i = 0; i < list.size(); i++) {
  47. console.log(list.get(i))
  48. }
  49. const bwsxVar = Java.cast(this.T.value.b(), Java.use('bwsx'))
  50. console.log(bwsxVar)
  51. bwsxVar.a(3)
  52. const bnfu = Java.use('bnfu')
  53. this.m(bnfu.b(2))
  54. return this.r(obj, list)
  55. }
  56. })
  57. }, 0)