Radare2¶
-
class
revenge.plugins.radare2.
Radare2
(process, module=None)[source]¶ Bases:
revenge.plugins.Plugin
Use radare2 to enrich reversing information.
Examples
# # Normal enrichment works without connection # Radare2 plugin can enrich a remote instance of r2 with more # information as well. # In different window, open r2 # r2 -A /bin/ls # Start up web server # =h& 12345 # Connect up to it with revenge process.radare2.connect("http://127.0.0.1:12345") # Highlight paths that have executed timeless = process.techniques.NativeTimelessTracer() timeless.apply() # Do whatever t = list(timeless)[0] process.radare2.highlight(t)
-
analyze
()[source]¶ Ask radare2 to run some auto analysis on this file.
Note
This is NOT run by default due to the fact that it may take a while to run. If you connect to a remote session that has already run analysis, you do NOT need to run this.
-
property
base_address
¶
-
connect
(web_server)[source]¶ Connect to a separate session to work in tandem.
- Parameters
web_server (str) – Web server to connect to.
Examples
# On existing r2 instance, start web listener on port 12345 # =h& 12345 # Now tell this r2 plugin to connect to it process.radare2.connect("http://127.0.0.1:12345")
-
property
decompiler
¶ Either returns an instance of a decompiler (if one is valid) or None.
-
property
file
¶
-
highlight
(what)[source]¶ Highlights an instruction or list of instructions.
- Parameters
what (int, list, tuple) – Address to highlight.
Note
The addresses should be instantiated from this revenge process. Highlight will determine the correct offset to use for highlighting automatically.
This is likely only useful when you have connected to a remote r2 session as you won’t see the color locally.
-