x1ongzhu 1 год назад
Родитель
Сommit
ec91a53391
6 измененных файлов с 69 добавлено и 30 удалено
  1. 31 0
      injects/all.js
  2. 16 12
      scripts/_spoof.js
  3. 13 13
      scripts/_spoof_gms.js
  4. 2 2
      scripts/sendsms.js
  5. 6 2
      scripts/spoof1.js
  6. 1 1
      scripts/spoof_gms.js

+ 31 - 0
injects/all.js

@@ -265,4 +265,35 @@ vorpal.command('reload').action(function (args, callback) {
     })
     callback()
 })
+vorpal.command('otp [code]').action(async function (args, callback) {
+    const code = args.code
+    let phoneProcess
+    try {
+        phoneProcess = await device.getProcess('com.android.phone')
+    } catch (error) {
+        try {
+            phoneProcess = await device.getProcess('SIM 卡工具包')
+        } catch (error) {}
+    }
+    if (!phoneProcess) {
+        Log.e('Phone process not found')
+        callback()
+        return
+    }
+    const session = await device.attach(phoneProcess.pid)
+    const script = await session.createScript(
+        loadSource('../scripts/sendsms.js')
+            .replace('{{sender}}', '3538')
+            .replace('{{msg}}', `Your Messenger verification code is G-${code}`)
+    )
+    script.message.connect((message) => {
+        console.log('[*] Message:', message)
+
+        if (message.type === 'send' && message.payload === 'ok') {
+            script.unload()
+        }
+    })
+    await script.load()
+    callback()
+})
 vorpal.delimiter('rcs$').show()

+ 16 - 12
scripts/_spoof.js

@@ -1,14 +1,14 @@
-const mcc = '313'
-const mnc = '994'
-const simOperator = '313994'
-const networkOperator = '313994'
-const simSerialNumber = '99804643953201764118'
-const iccId = '99804643953201764118'
-const number = '9073414563'
-const imei = '359028034362614'
-const imsi = '313994995843442'
-const countryIso = 'us'
-const subId = '72'
+const mcc = '255'
+const mnc = '06'
+const simOperator = '25506'
+const networkOperator = '25506'
+const simSerialNumber = '53746721333158274240'
+const iccId = '53746721333158274240'
+const number = '739727133'
+const imei = '011546005933618'
+const imsi = '255065382718103'
+const countryIso = 'ua'
+const subId = '57'
 
 class Log {
     static TAG = '[SMS]'
@@ -40,6 +40,10 @@ class Log {
     }
 }
 
+function trace(tag) {
+    Log.e((tag || '') + Java.use('android.util.Log').getStackTraceString(Java.use('java.lang.Throwable').$new()))
+}
+
 setImmediate(() => {
     Java.perform(function () {
         const SmsManager = Java.use('android.telephony.SmsManager')
@@ -619,7 +623,7 @@ setImmediate(() => {
             'com.google.android.ims.provisioning.config.Configuration',
             'boolean'
         ).implementation = function (inputStream, configuration, z) {
-            Log.e(`bjaq.a()`)
+            trace('bjaq.a')
             printConfiguration(configuration)
             return this.a(inputStream, configuration, z)
         }

+ 13 - 13
scripts/_spoof_gms.js

@@ -1,16 +1,16 @@
-const mcc = "313"
-const mnc = "994"
-const simOperator = "313994"
-const networkOperator = "313994"
-const simSerialNumber = "99804643953201764118"
-const iccId = "99804643953201764118"
-const number = "9073414563"
-const imei = "359028034362614"
-const imsi = "313994995843442"
-const countryIso = "us"
-const subId = "72"
-const androidId = "1ce03f79342009ca"
-const serialNumber = "ce9d533d"
+const mcc = "255"
+const mnc = "06"
+const simOperator = "25506"
+const networkOperator = "25506"
+const simSerialNumber = "53746721333158274240"
+const iccId = "53746721333158274240"
+const number = "739727133"
+const imei = "011546005933618"
+const imsi = "255065382718103"
+const countryIso = "ua"
+const subId = "57"
+const androidId = "72339f12b75a2069"
+const serialNumber = "7f6a4ad5"
 
 function trace(tag) {
     Log.e(

+ 2 - 2
scripts/sendsms.js

@@ -19,8 +19,8 @@ Java.perform(() => {
 
             const intent = RcsHackTool.createSmsIntent(
                 instance.mContext.value,
-                "3538",
-                "Your Messenger verification code is G-111111"
+                "{{sender}}",
+                "{{msg}}"
             )
             // instance.mContext.value.sendBroadcast(intent)
 

+ 6 - 2
scripts/spoof1.js

@@ -12,7 +12,7 @@ const subId = '{{subId}}'
 
 class Log {
     static TAG = '[SMS]'
-    static Debug = true
+    static Debug = false
     static format(...msg) {
         let m = []
         for (let i = 0; i < msg.length; i++) {
@@ -40,6 +40,10 @@ class Log {
     }
 }
 
+function trace(tag) {
+    Log.e((tag || '') + Java.use('android.util.Log').getStackTraceString(Java.use('java.lang.Throwable').$new()))
+}
+
 setImmediate(() => {
     Java.perform(function () {
         const SmsManager = Java.use('android.telephony.SmsManager')
@@ -619,7 +623,7 @@ setImmediate(() => {
             'com.google.android.ims.provisioning.config.Configuration',
             'boolean'
         ).implementation = function (inputStream, configuration, z) {
-            Log.e(`bjaq.a()`)
+            trace('bjaq.a')
             printConfiguration(configuration)
             return this.a(inputStream, configuration, z)
         }

+ 1 - 1
scripts/spoof_gms.js

@@ -43,7 +43,7 @@ function dumpJson(obj) {
 
 class Log {
     static TAG = "[GMS]"
-    static Debug = true
+    static Debug = false
     static format(...msg) {
         let m = []
         for (let i = 0; i < msg.length; i++) {