Comments (5)
Hi!
The dot
utility is needed to convert the graphs from the raw dot format, to anything else, like pdf, svg, png, etc. The format can be specified as a parameter to plot_cfg
, the default setting is png.
You can do two things:
- The
dot
utility is provided bygraphviz
, if you install graphviz the problem should disappear. - Specify a
format="raw"
parameter toplot_cfg
: in this case the output will be the graph in the raw dot format. Still if you want to view that, you will needgraphviz
to render it, so I recommend to installgraphviz
.
from angr-utils.
format="raw" parameter works fine. I am able to see raw files. I installed graphviz
but still error persists, in case of format="png". May be i will use other ways to convert raw file to visible image file.
from angr-utils.
With the dot
utility you can use the following command, to convert the raw files into a png
:
dot -Tpng -o out.png in.raw
you should check, if this is working for you. If it does, then the error lays somewhere in the pydot
package, I use that to interact with dot
. My guess is that somehow the dot utility is not found by the package, or it is not executable, or something like that.
I usually generate raw files (because its much faster), and view them with xdot
, which also uses the dot
command for rendering. (https://github.com/jrfonseca/xdot.py)
Environment issues are hard to debug, I would do an
strace -f python script_to_generate_the_graph.py |& grep 'dot'
to see what happens under the hood.
from angr-utils.
Thanks for you quick responses, it helped me in resolving the issue. I got the point, actually pydot
is invoking a command that uses dot utility (it is running internally dot -Tpng -o out.png in.raw
) . Since I don't have xdot installed in my system it is was throwing error. Now, I installed xdot tool in my linux system, issue is resolved. I can generate png files directly. May be, you can document it some where, in requirements to install xdot. Thanks again.
from angr-utils.
I think I figured out what happened.
The xdot
package is not needed for the library to function correctly, but the xdot package has
graphviz as a dependency, so when you installed xdot you also installed graphviz.
My guess is, that when you tried to install graphviz before, instead of the system package graphviz
which is the graph rendering tool, you installed the python package called graphviz
, which is just a python wrapper around the utility.
$ apt-file find -F '/usr/bin/dot'
graphviz: /usr/bin/dot
$ apt-file show xdot
xdot: /usr/bin/xdot
xdot: /usr/lib/python3/dist-packages/xdot-0.7.egg-info/PKG-INFO
xdot: /usr/lib/python3/dist-packages/xdot-0.7.egg-info/dependency_links.txt
xdot: /usr/lib/python3/dist-packages/xdot-0.7.egg-info/entry_points.txt
xdot: /usr/lib/python3/dist-packages/xdot-0.7.egg-info/top_level.txt
xdot: /usr/lib/python3/dist-packages/xdot.py
xdot: /usr/share/applications/xdot.desktop
xdot: /usr/share/doc/xdot/changelog.Debian.gz
xdot: /usr/share/doc/xdot/copyright
xdot: /usr/share/man/man1/xdot.1.gz
from angr-utils.
Related Issues (20)
- plot_cfg not working HOT 3
- how to speed up cfg_path HOT 1
- 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
- AttributeError: 'XRef' object has no attribute 'sort' HOT 5
- 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.