Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[bug] import broken in repl #704

Open
rithvikvibhu opened this issue Oct 6, 2024 · 2 comments · May be fixed by #705
Open

[bug] import broken in repl #704

rithvikvibhu opened this issue Oct 6, 2024 · 2 comments · May be fixed by #705
Labels
🐛bug freshissue Default label for new, untriaged issues.

Comments

@rithvikvibhu
Copy link

Describe the bug
import <path/to/script.js> is broken:

> import ~/Desktop/frida_script.js

An unexpected internal exception has occurred. If this looks like a code related error, please file a bug report!
'Agent' object has no attribute 'background'

Python stack trace: Traceback (most recent call last):
  File "/objection/objection/console/repl.py", line 361, in run
    self.run_command(document)
  File "/objection/objection/console/repl.py", line 169, in run_command
    exec_method(arguments)
  File "//objection/objection/commands/frida_commands.py", line 85, in load_background
    agent.background(hook)
AttributeError: 'Agent' object has no attribute 'background'

To Reproduce

  1. Run command 'import anyscript.js'

Similar issues
None I could find when searching for "background".

Expected behavior
The script should load, like before.

Evidence / Logs / Screenshots
Stacktrace above.

Environment (please complete the following information):

  • Device: Android device
  • OS: Android 13
  • Frida Version: 16.5.2
  • Objection Version: from git, latest master as of now (5f22e0a)

Application
Not application dependent.

Additional context
Looks like the background method used here:

agent.background(hook)

was removed from Agent in this commit: 865fb7d

@rithvikvibhu rithvikvibhu added the freshissue Default label for new, untriaged issues. label Oct 6, 2024
@IPMegladon
Copy link
Collaborator

Thanks, this is a known issue . I have already created a fix and changed some of the job handling to accommodate this. Though still need to clean it up a bit before I create a PR.

In the mean time you should be able to use evaluate ~/Desktop/frida_script.js to load the script (you just cannot unload it).

@IPMegladon
Copy link
Collaborator

I have created #705 in which import should function as expected. Let me know if you encounter any bugs with it.

@IPMegladon IPMegladon linked a pull request Oct 31, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛bug freshissue Default label for new, untriaged issues.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants