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

Loading r2ai as r2 plugin fails #57

Closed
cryptax opened this issue Sep 23, 2024 · 3 comments
Closed

Loading r2ai as r2 plugin fails #57

cryptax opened this issue Sep 23, 2024 · 3 comments

Comments

@cryptax
Copy link
Contributor

cryptax commented Sep 23, 2024

The documentation says:

There are 4 different ways to run r2ai:

[...]
As an r2 plugin: r2 -i main.py /bin/ls
[...]

Can't get that to work.

Solution 1. Try for a miracle. Fails: Script 'main.py' not found

r2 -i main.py subs_crack
ERROR: Script 'main.py' not found

Solution 2. Specify path of main.py. Fails "ModuleNotFoundError: No module named 'r2ai'"

$ r2 -i ~/.local/share/radare2/r2pm/git/r2ai/main.py ./subs_crack
Traceback (most recent call last):
  File "/home/axelle/.local/share/radare2/r2pm/git/r2ai/main.py", line 9, in <module>
    from r2ai.main import main as r2ai_main
ModuleNotFoundError: No module named 'r2ai'

Solution 3. Be in ~/.local/share/radare2/r2pm/git/r2ai/. Fails ModuleNotFoundError: No module named 'rich'

$ r2 -i ./main.py ~/git/research/ai/subs_crack
Traceback (most recent call last):
  File "./main.py", line 9, in <module>
    from r2ai.main import main as r2ai_main
  File "/home/axelle/.local/share/radare2/r2pm/git/r2ai/./r2ai/__init__.py", line 3, in <module>
    from rich.logging import RichHandler
ModuleNotFoundError: No module named 'rich'

So, what's the correct command supposed to be? + fix the doc accordingly.

@trufae
Copy link
Contributor

trufae commented Sep 23, 2024

fixed in #58

@trufae trufae closed this as completed in 4b15e0e Sep 23, 2024
@cryptax
Copy link
Contributor Author

cryptax commented Sep 23, 2024

How should I use it? Just did r2pm -ci r2ai, and then r2 -i ~/.local/share/radare2/r2pm/git/r2ai/main.py ./mybin. Wasn't successful...

@radare
Copy link
Contributor

radare commented Sep 23, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants