Comments (5)
Update the following lines in the annotator.py
line 384 : dr.sort ->> dr.memory_data.sort line 385 : dr.insn_addr ->> dr.memory_data.insn_addr line 385 : dr.content ->> str(dr.memory_data.content)
Thank you very much, It works, But I found that the second line should be changed to this
> line 385 : dr.insn_addr ->> dr.ins_addr
because if I change it like you, It will have the following problems
WARNING | 2022-03-03 22:14:43,965 | angr.analyses.cfg.cfg_fast | _tidy_data_references() sees an address 0x804a040 that does not belong to any section or segment.
Traceback (most recent call last):
File "/Users/chenyanzhi/Documents/angr/test.py", line 21, in <module>
cfgfastpng("./00_angr_find")
File "/Users/chenyanzhi/Documents/angr/test.py", line 16, in cfgfastpng
plot_cfg(cfg, "cfg", format='png', asminst=True, remove_imports=True)
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/angrutils/visualize.py", line 34, in plot_cfg
vis.process(cfg.graph)
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/bingraphvis/base.py", line 309, in process
graph = self.pipeline.process(filter=filter)
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/bingraphvis/base.py", line 286, in process
c.render(n)
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/bingraphvis/base.py", line 126, in render
an.annotate_content(n, n.content[self.name])
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/bingraphvis/angr/annotator.py", line 385, in annotate_content
comments_by_addr[dr.memory_data.insn_addr] = str(dr.memory_data.content)
AttributeError: 'MemoryData' object has no attribute 'insn_addr'
from angr-utils.
Update the following lines in the
annotator.py
line 384 : dr.sort ->> dr.memory_data.sort
line 385 : dr.insn_addr ->> dr.memory_data.insn_addr
line 385 : dr.content ->> str(dr.memory_data.content)
from angr-utils.
In addition,when I run the sample code, I had the same problem as #32
def main(filename):
proj = angr.Project(filename, load_options={'auto_load_libs': False})
main = proj.loader.main_object.get_symbol("main")
start_state = proj.factory.blank_state(addr=main.rebased_addr)
cfg = proj.analyses.CFGEmulated(fail_fast=True, starts=[main.rebased_addr], initial_state=start_state)
plot_cfg(cfg, "ais3_cfg", format='png', asminst=True, remove_imports=True)
but I run my code, it will output normally
def cfgfastpng(filename):
proj = angr.Project(filename, auto_load_libs=False)
cfg = proj.analyses.CFGFast()
plot_cfg(cfg, "cfg", format='png', asminst=True, remove_imports=True)
from angr-utils.
Sorry for my late reply. Thanks for the report and the solution, I will apply the fixes on the weekend.
@mz21g :
When #32 was reported, I've tried to check it, but it worked for me.
Could you maybe figure out what is causing the problem? I wrote some thoughts about how to debug it in the original ticket.
I will also try to retest that on the weekend.
from angr-utils.
I've applied the fix and created a new PyPI version. Thanks for the report!
@mz21g Tried your code to test #32, but it creates the assembly listing for me.
from angr-utils.
Related Issues (20)
- plot_cfg not working HOT 3
- how to speed up cfg_path HOT 1
- Getting error while running examples HOT 5
- WARNING | 2018-07-16 17:19:33,677 | angr.analyses.disassembly_utils | Your version of capstone does not support MIPS instruction groups. HOT 2
- No module named "expr" HOT 3
- Multiple duplicated CFG in a graph HOT 2
- RuntimeError when running angrutils.plot_ddg_data(ddg.simplified_data_graph, xxx) HOT 2
- Getting VEX-IR of a function HOT 1
- Save CFG to a file instead of rendering in new window HOT 2
- plot_cfg(): Plotted CFG is not readable HOT 2
- DDG example HOT 1
- Are there limitations to plot_cfg()? HOT 2
- can't generate graph HOT 1
- Is there a way to walk a dissasembly graph? HOT 2
- graph is not getting generated HOT 1
- No module named 'angrutils' HOT 1
- plot_ CFG cannot draw disassembly code HOT 8
- I got an error when I was import angr HOT 3
- Regarding CFG construction HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from angr-utils.