ChiChou / bagbak

Yet another frida based iOS dumpdecrypted. Also decrypts app extensions

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

frida.core.RPCException: unable to find method 'root'

Magic-Unique opened this issue · comments

Dump ipa failed.

  • Mac python3.7
  • Mac frida 12.2.30
  • iOS frida 12.2.30
[info] attaching to target
Traceback (most recent call last):
  File "dump.py", line 246, in <module>
    main()
  File "dump.py", line 242, in main
    task.run()
  File "dump.py", line 220, in run
    self.dump()
  File "dump.py", line 156, in dump
    self.root = self.script.exports.root()
  File "/usr/local/lib/python3.7/site-packages/frida/core.py", line 322, in method
    return script._rpc_request('call', js_name, args)
  File "/usr/local/lib/python3.7/site-packages/frida/core.py", line 250, in _rpc_request
    raise result[2]
frida.core.RPCException: unable to find method 'root'

forgot to push

Failed again.

The same env.

unknown message: {'type': 'error', 'description': "TypeError: cannot read property 'name' of undefined", 'stack': "TypeError: cannot read property 'name' of undefined\n    at [anon] (duk_hobject_props.c:2384)\n    at src/libarchive.js:25\n    at o (node_modules/browser-pack/_prelude.js:1)\n    at src/index.js:9\n    at o (/script1.js:1)\n    at r (/script1.js:1)\n    at /script1.js:11729", 'fileName': '/script1.js', 'lineNumber': 11574, 'columnNumber': 1}
Traceback (most recent call last):
  File "./dump.py", line 246, in <module>
    main()
  File "./dump.py", line 242, in main
    task.run()
  File "./dump.py", line 220, in run
    self.dump()
  File "./dump.py", line 159, in dump
    self.dump_with_plugins()
  File "./dump.py", line 199, in dump_with_plugins
    script.exports.archive(self.root, decrypted, self.opt)
  File "/usr/local/lib/python3.7/site-packages/frida/core.py", line 322, in method
    return script._rpc_request('call', js_name, args)
  File "/usr/local/lib/python3.7/site-packages/frida/core.py", line 250, in _rpc_request
    raise result[2]
frida.core.RPCException: unable to find method 'archive'

frida.exports. archive is deprecated.

Looks like it failed to locate libarchive.*.dylib. What's the iOS version?

iPhone 6s
iOS 10.3.3

When I change the code in line 199 from:

script.exports.archive(self.root, decrypted, self.opt)

to

self.script.exports.archive(self.root, decrypted, self.opt)

The problem solved.

Before archive to *.ipa, I got some error log out:

unknown message: {'type': 'error', 'description': "TypeError: cannot read property 'name' of undefined", 'stack': "TypeError: cannot read property 'name' of undefined\n    at [anon] (duk_hobject_props.c:2384)\n    at src/libarchive.js:25\n    at o (node_modules/browser-pack/_prelude.js:1)\n    at src/index.js:9\n    at o (/script1.js:1)\n    at r (/script1.js:1)\n    at /script1.js:11729", 'fileName': '/script1.js', 'lineNumber': 11574, 'columnNumber': 1}
[info] compressing archive: /private/var/mobile/Containers/Data/Application/8110A118-BCDD-497C-9EC5-78B682DDD057/tmp/hif3sxngcps.ipa

Mac & iOS frida has be updated to 12.4.0

Mac python3.8
Mac frida 15.1.17
安卓 frida 15.1.17
安卓10
frida -U -f com.ss.android.ugc.aweme -l pass_ssl.js
____
/ _ | Frida 15.1.17 - A world-class dynamic instrumentation toolkit
| (| |
> _ | Commands:
/
/ |_| help -> Displays the help system
. . . . object? -> Display information about 'object'
. . . . exit/quit -> Exit
. . . .
. . . . More info at https://frida.re/docs/home/
. . . .
. . . . Connected to ONEPLUS A5000 (id=852e2c6d)
Spawning com.ss.android.ugc.aweme...
Exception in thread Thread-1:
Traceback (most recent call last):
File "/usr/local/Cellar/python@3.8/3.8.3_1/Frameworks/Python.framework/Versions/3.8/lib/python3.8/threading.py", line 932, in _bootstrap_inner
self.run()
File "/usr/local/Cellar/python@3.8/3.8.3_1/Frameworks/Python.framework/Versions/3.8/lib/python3.8/threading.py", line 870, in run
self._target(*self._args, **self._kwargs)
File "/usr/local/lib/python3.8/site-packages/frida_tools/application.py", line 809, in _run
work()
File "/usr/local/lib/python3.8/site-packages/frida_tools/application.py", line 405, in _try_start
self._start()
File "/usr/local/lib/python3.8/site-packages/frida_tools/repl.py", line 149, in _start
self._set_autoperform(self._autoperform_option)
File "/usr/local/lib/python3.8/site-packages/frida_tools/repl.py", line 520, in _set_autoperform
if self._is_java_available():
File "/usr/local/lib/python3.8/site-packages/frida_tools/repl.py", line 529, in _is_java_available
return script.exports.java_available()
File "/usr/local/lib/python3.8/site-packages/frida/core.py", line 468, in method
return script._rpc_request('call', js_name, args, **kwargs)
File "/usr/local/lib/python3.8/site-packages/frida/core.py", line 26, in wrapper
return f(*args, **kwargs)
File "/usr/local/lib/python3.8/site-packages/frida/core.py", line 400, in _rpc_request
raise result[2]
frida.core.RPCException: Error: VM::AttachCurrentThread failed: -1
at o (frida/node_modules/frida-java-bridge/lib/result.js:4)
at (frida/node_modules/frida-java-bridge/lib/vm.js:27)
at (frida/node_modules/frida-java-bridge/lib/vm.js:15)
at Ye (frida/node_modules/frida-java-bridge/lib/android.js:500)
at Ae (frida/node_modules/frida-java-bridge/lib/android.js:196)
at ye (frida/node_modules/frida-java-bridge/lib/android.js:16)
at _tryInitialize (frida/node_modules/frida-java-bridge/index.js:17)
at y (frida/node_modules/frida-java-bridge/index.js:9)
at (frida/node_modules/frida-java-bridge/index.js:320)
at call (native)
at o (/_java.js)
at (/_java.js)
at (frida/runtime/java.js:1)
at call (native)
at o (/_java.js)
at r (/_java.js)
at (frida/runtime/java.js:3)
at _loadJava (native)
at get (frida/runtime/core.js:130)
at (/java_check.js:1)
at apply (native)
at (frida/runtime/message-dispatcher.js:13)
at c (frida/runtime/message-dispatcher.js:23)