x1ongzhu hace 1 año
padre
commit
0fe33f111c
Se han modificado 2 ficheros con 68 adiciones y 0 borrados
  1. 34 0
      scripts/_spoof.js
  2. 34 0
      scripts/spoof.js

+ 34 - 0
scripts/_spoof.js

@@ -11,6 +11,33 @@ const countryIso = "ua"
 const subId = ""
 const subId = ""
 
 
 Java.perform(function () {
 Java.perform(function () {
+    const SmsManager = Java.use("android.telephony.SmsManager")
+    SmsManager.getSmsManagerForSubscriptionId.overload("int").implementation =
+        function (i) {
+            const _smsManager = this.getSmsManagerForSubscriptionId(i)
+            console.log(`SmsManager.getSmsManagerForSubscriptionId: ${i}`)
+            return _smsManager
+        }
+
+    SmsManager.getDefault.overload().implementation = function () {
+        const _smsManager = this.getDefault(i)
+        console.log(`SmsManager.getDefault`)
+        return _smsManager
+    }
+
+    SmsManager.getDefaultSmsSubscriptionId.overload().implementation =
+        function () {
+            const _subId = this.getDefaultSmsSubscriptionId()
+            console.log(`SmsManager.getDefaultSmsSubscriptionId: ${_subId}`)
+            return _subId
+        }
+
+    SmsManager.getSubscriptionId.overload().implementation = function () {
+        const _subId = this.getSubscriptionId()
+        console.log(`SmsManager.getSubscriptionId: ${_subId}`)
+        return _subId
+    }
+
     const SubscriptionInfo = Java.use("android.telephony.SubscriptionInfo")
     const SubscriptionInfo = Java.use("android.telephony.SubscriptionInfo")
     SubscriptionInfo.getMcc.overload().implementation = function () {
     SubscriptionInfo.getMcc.overload().implementation = function () {
         const _mcc = this.getMcc()
         const _mcc = this.getMcc()
@@ -248,6 +275,11 @@ Java.perform(function () {
         str7,
         str7,
         str8
         str8
     ) {
     ) {
+        console.log(
+            Java.use("android.util.Log").getStackTraceString(
+                Java.use("java.lang.Throwable").$new()
+            )
+        )
         console.log("SetAsterismConsentRequest.$init")
         console.log("SetAsterismConsentRequest.$init")
 
 
         console.log(
         console.log(
@@ -298,4 +330,6 @@ Java.perform(function () {
         console.log(`i: ${i}, str: ${str}, str2: ${str2}`)
         console.log(`i: ${i}, str: ${str}, str2: ${str2}`)
         return this.$init(i, str, str2)
         return this.$init(i, str, str2)
     }
     }
+
+   
 })
 })

+ 34 - 0
scripts/spoof.js

@@ -11,6 +11,33 @@ const countryIso = "{{countryIso}}"
 const subId = "{{subId}}"
 const subId = "{{subId}}"
 
 
 Java.perform(function () {
 Java.perform(function () {
+    const SmsManager = Java.use("android.telephony.SmsManager")
+    SmsManager.getSmsManagerForSubscriptionId.overload("int").implementation =
+        function (i) {
+            const _smsManager = this.getSmsManagerForSubscriptionId(i)
+            console.log(`SmsManager.getSmsManagerForSubscriptionId: ${i}`)
+            return _smsManager
+        }
+
+    SmsManager.getDefault.overload().implementation = function () {
+        const _smsManager = this.getDefault(i)
+        console.log(`SmsManager.getDefault`)
+        return _smsManager
+    }
+
+    SmsManager.getDefaultSmsSubscriptionId.overload().implementation =
+        function () {
+            const _subId = this.getDefaultSmsSubscriptionId()
+            console.log(`SmsManager.getDefaultSmsSubscriptionId: ${_subId}`)
+            return _subId
+        }
+
+    SmsManager.getSubscriptionId.overload().implementation = function () {
+        const _subId = this.getSubscriptionId()
+        console.log(`SmsManager.getSubscriptionId: ${_subId}`)
+        return _subId
+    }
+
     const SubscriptionInfo = Java.use("android.telephony.SubscriptionInfo")
     const SubscriptionInfo = Java.use("android.telephony.SubscriptionInfo")
     SubscriptionInfo.getMcc.overload().implementation = function () {
     SubscriptionInfo.getMcc.overload().implementation = function () {
         const _mcc = this.getMcc()
         const _mcc = this.getMcc()
@@ -248,6 +275,11 @@ Java.perform(function () {
         str7,
         str7,
         str8
         str8
     ) {
     ) {
+        console.log(
+            Java.use("android.util.Log").getStackTraceString(
+                Java.use("java.lang.Throwable").$new()
+            )
+        )
         console.log("SetAsterismConsentRequest.$init")
         console.log("SetAsterismConsentRequest.$init")
 
 
         console.log(
         console.log(
@@ -298,4 +330,6 @@ Java.perform(function () {
         console.log(`i: ${i}, str: ${str}, str2: ${str2}`)
         console.log(`i: ${i}, str: ${str}, str2: ${str2}`)
         return this.$init(i, str, str2)
         return this.$init(i, str, str2)
     }
     }
+
+   
 })
 })