_spoof.js 6.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203
  1. const mcc = "255"
  2. const mnc = "06"
  3. const simOperator = "25506"
  4. const networkOperator = "25506"
  5. const simSerialNumber = "89380062300689131876"
  6. const iccId = "89380062300689131876"
  7. const number = "731848010"
  8. const imei = "864929043714851"
  9. const imsi = "255065007246456"
  10. const countryIso = "ua"
  11. const subId = ""
  12. Java.perform(function () {
  13. const SubscriptionInfo = Java.use("android.telephony.SubscriptionInfo")
  14. SubscriptionInfo.getMcc.overload().implementation = function () {
  15. const _mcc = this.getMcc()
  16. console.log(`spoof SubscriptionInfo.getMcc: ${_mcc} -> ${mcc}`)
  17. return parseInt(mcc)
  18. }
  19. SubscriptionInfo.getMnc.overload().implementation = function () {
  20. const _mnc = this.getMnc()
  21. console.log(`spoof SubscriptionInfo.getMnc: ${_mnc} -> ${mnc}`)
  22. return parseInt(mnc)
  23. }
  24. SubscriptionInfo.getMccString.overload().implementation = function () {
  25. const _mccString = this.getMccString()
  26. console.log(
  27. `spoof SubscriptionInfo.getMccString: ${_mccString} -> ${mcc}`
  28. )
  29. return mcc
  30. }
  31. SubscriptionInfo.getMncString.overload().implementation = function () {
  32. const _mncString = this.getMncString()
  33. console.log(
  34. `spoof SubscriptionInfo.getMncString: ${_mncString} -> ${mnc}`
  35. )
  36. return mnc
  37. }
  38. SubscriptionInfo.getNumber.overload().implementation = function () {
  39. const _number = this.getNumber()
  40. console.log(`spoof SubscriptionInfo.getNumber: ${_number} -> ${number}`)
  41. return number
  42. }
  43. SubscriptionInfo.getIccId.overload().implementation = function () {
  44. const _iccId = this.getIccId()
  45. console.log(`spoof SubscriptionInfo.getIccId: ${_iccId} -> ${iccId}`)
  46. return iccId
  47. }
  48. SubscriptionInfo.getCountryIso.overload().implementation = function () {
  49. const _countryIso = this.getCountryIso()
  50. console.log(
  51. `spoof SubscriptionInfo.getCountryIso: ${_countryIso} -> ${countryIso}`
  52. )
  53. return countryIso
  54. }
  55. SubscriptionInfo.getSubscriptionId.overload().implementation = function () {
  56. const _subId = this.getSubscriptionId()
  57. if (!subId) {
  58. console.log(_subId)
  59. return _subId
  60. }
  61. console.log(
  62. `spoof SubscriptionInfo.getSubscriptionId: ${_subId} -> ${subId}`
  63. )
  64. return parseInt(subId)
  65. }
  66. const TelephonyManager = Java.use("android.telephony.TelephonyManager")
  67. TelephonyManager.getLine1Number.overload().implementation = function () {
  68. const _number = this.getLine1Number()
  69. console.log(
  70. `spoof TelephonyManager.getLine1Number: ${_number} -> ${number}`
  71. )
  72. return number
  73. }
  74. TelephonyManager.getSimOperator.overload().implementation = function () {
  75. const _simOperator = this.getSimOperator()
  76. console.log(
  77. `spoof TelephonyManager.getSimOperator: ${_simOperator} -> ${simOperator}`
  78. )
  79. return simOperator
  80. }
  81. TelephonyManager.getNetworkOperator.overload().implementation =
  82. function () {
  83. const _networkOperator = this.getNetworkOperator()
  84. console.log(
  85. `spoof TelephonyManager.getNetworkOperator: ${_networkOperator} -> ${networkOperator}`
  86. )
  87. return networkOperator
  88. }
  89. TelephonyManager.getSimSerialNumber.overload().implementation =
  90. function () {
  91. const _simSerialNumber = this.getSimSerialNumber()
  92. console.log(
  93. `spoof TelephonyManager.getSimSerialNumber: ${_simSerialNumber} -> ${simSerialNumber}`
  94. )
  95. return simSerialNumber
  96. }
  97. TelephonyManager.getSubscriberId.overload().implementation = function () {
  98. const _imsi = this.getSubscriberId()
  99. console.log(
  100. `spoof TelephonyManager.getSubscriberId: ${_imsi} -> ${imsi}`
  101. )
  102. return imsi
  103. }
  104. TelephonyManager.getImei.overload().implementation = function () {
  105. const _imei = this.getImei()
  106. console.log(`spoof TelephonyManager.getImei: ${_imei} -> ${imei}`)
  107. return imei
  108. }
  109. TelephonyManager.getNetworkCountryIso.overload().implementation =
  110. function () {
  111. const _countryIso = this.getNetworkCountryIso()
  112. console.log(
  113. `spoof TelephonyManager.getNetworkCountryIso: ${_countryIso} -> ${countryIso}`
  114. )
  115. return countryIso
  116. }
  117. TelephonyManager.getSimCountryIso.overload().implementation = function () {
  118. const _countryIso = this.getSimCountryIso()
  119. console.log(
  120. `spoof TelephonyManager.getSimCountryIso: ${_countryIso} -> ${countryIso}`
  121. )
  122. return countryIso
  123. }
  124. TelephonyManager.getSubscriptionId.overload().implementation = function () {
  125. const _subId = this.getSubscriptionId()
  126. if (!subId) {
  127. console.log(_subId)
  128. return _subId
  129. }
  130. console.log(
  131. `spoof TelephonyManager.getSubscriptionId: ${_subId} -> ${subId}`
  132. )
  133. return parseInt(subId)
  134. }
  135. // const asos = Java.use("asos")
  136. // asos.b.overload().implementation = function () {
  137. // console.log("asos.b")
  138. // return true
  139. // }
  140. const asmy = Java.use("asmy")
  141. const bqni = Java.use("bqni")
  142. const askd = Java.use("askd")
  143. // asmy.b.overload().implementation = function () {
  144. // this.$super.b()
  145. // this._a.value.Q(bqni.b(19))
  146. // this._a.value.av(27)
  147. // const a = this._a.value._P.value.a()
  148. // var c = askd.c(a, "")
  149. // console.log(this._a.value.r)
  150. // var ar = Java.cast(this._a.value, Java.use("arqs"))
  151. // ar.r(36, Java.cast(c, Java.use("java.lang.Object")))
  152. // }
  153. const PhoneNumberVerification = Java.use(
  154. "com.google.android.gms.constellation.PhoneNumberVerification"
  155. )
  156. PhoneNumberVerification.$init.overload(
  157. "java.lang.String",
  158. "long",
  159. "int",
  160. "int",
  161. "java.lang.String",
  162. "android.os.Bundle"
  163. ).implementation = function (str, j, i, i2, str2, bundle) {
  164. console.log("PhoneNumberVerification.$init")
  165. console.log(`str: ${str}, j: ${j}, i: ${i}, i2: ${i2}, str2: ${str2}`)
  166. // print bundle
  167. const entrySet = bundle.entrySet().toArray()
  168. for (let i = 0; i < entrySet.length; i++) {
  169. const entry = entrySet[i]
  170. console.log(`key: ${entry.getKey()}, value: ${entry.getValue()}`)
  171. }
  172. return this.$init(str, j, i, i2, str2, bundle)
  173. }
  174. const aays = Java.use("aays")
  175. aays.d.overload("int", "boolean").implementation = function (i, z) {
  176. console.log("aays.d", i, z, Object.keys(this.f.value))
  177. return number
  178. }
  179. })