1.安装依赖(基本开发环境):
sudo apt-get install python-dev libffi-dev build-essential virtualenvwrapper
2.virtualenvwrapper初始化:
首先设置一个环境变量WORKON_HOME
export WORKON_HOME=$HOME/Python-workhome
这里的$HOME/Python-workhome就是准备放置虚拟环境的地址
启动virtualenvwrapper.sh脚本
source /usr/share/virtualenvwrapper/virtualenvwrapper.sh
注意:可以使用whereis virtualenvwrapper.sh命令查看脚本的位置
3.在python3的环境下安装angr:
mkvirtualenv --python=$(which python3) angr && pip install angr
4.安装好后在其他的命令在一个新的终端窗口直接运行workon,并没有创建的angr虚拟环境,需要执行下面两条命令才可以:
export WORKON_HOME=$HOME/Python-workhome
source /usr/share/virtualenvwrapper/virtualenvwrapper.sh
可以写一个shell脚本包含两条命令,以后直接运行shell脚本即可。
virtualenvwrapper操作命令:
创建环境
mkvirtualenv env1
环境创建之后,会自动进入该目录,并激活该环境。
切换或进入环境
workon env1
列出已有环境
workon
退出环境
deactivate
删除环境
rmvirtualenv
CFG可视化:angr-utils能够实现CFG(以及其他流图)的可视化,安装过程:
workon angr
git clone https://github.com/axt/bingraphvis
pip install -e ./bingraphvis
git clone https://github.com/axt/angr-utils
pip install -e ./angr-utils