1、angr环境

yum install -y python-dev libffi-dev build-essential virtualenvwrapper
mkvirtualenv angr

问题:mkvirtualenv command not found

解决:

sudo pip install virtualenv
sudo pip install virtualenvwrapper

问题:You are using pip version 8.1.2, however version 10.0.1 is available.You should consider upgrading via the 'pip install --upgrade pip' command.

解决:

pip install --upgrade pip

再重新上面两步操作,然后

vi ~/.bashrc

在最后面加下面两句话

export WORKON_HOME=~/.environments
source /usr/local/bin/virtualenvwrapper.sh

报错:-bash: /usr/local/bin/virtualenvwrapper.sh: 没有那个文件或目录

通过:

find / -name virtualenvwrapper.sh

找到后,修改~/.bashrc为找到的那个路径

重新加载.bashrc文件:

source ~/.bashrc

以上完成后即可再次:mkvirtualenv angr进入angr环境

2、cfg需要的包

以下就安装angr和输出cfg需要的包(用plot_cfg需要from angrutils import *,这个会出现很多依赖包没安装问题)

首先用workon angr命令进入angr环境,进入angr环境然后进入Python环境,然后输入import angr会出现问题:ImportError: No module named angr

输入from angrutils import *会依次出现以下4个问题:

1、ImportError: No module named angrutils 

2、ImportError: No module named bingraphvis

3、ImportError: No module named pydot

4、ImportError: No module named simuvex

退出python环境(还在angr环境),运行以下依次解决上述5个问题:

git clone https://github.com/angr/angr-dev
cd angr-dev
#mkvirtualenv angr
./setup.sh
git clone https://github.com/axt/angr-utils
cd angr-utils
python setup.py build
python setup.py install
git clone https://github.com/axt/bingraphvis
cd bingraphvis
python setup.py build
python setup.py install
pip install graphviz
pip install pydot
git clone https://github.com/angr/simuvex
cd simuvex
python setup.sh build
python setup.sh install

然后进入python环境,可以成功运行下面:

Python 2.7.12 (default, Dec  4 2017, 14:50:18)
[GCC 5.4.0 20160609] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import angr
>>> from angrutils import *
>>>

但是在运行plot_cfg(cfg,"pid_cfg",asminst=True,remove_imports=True,remove_path_terminator=True)会出现以下问题:

OSError: [Errno 2] "dot" not found in path.

因为:后安装graphviz会出现类似:"dot" not found in path的问题。安装graphviz不要用pip install安装,否则还是会找不到可执行程序

所以先graphviz然后pydot:

yum  insall graphviz
pip install pydot

3、angr容器

angr有一个docker容器可以使用:

# install docker
curl -sSL https://get.docker.com/ | sudo sh # pull the docker image
sudo docker pull angr/angr # run it
sudo docker run -it angr

但是在里面运行from angrutils import *还是会出现上述问题,就按照上述解决即可

感觉描述有点不严谨呀....但是以上运行下来,我的机器上是可以正确使用angr和plot_cfg等

centos安装angr的更多相关文章

  1. CentOS安装gitlab,gerrit,jenkins并配置ci流程

    CentOS安装gitlab,gerrit,jenkins并配置ci流程 By Wenbin juandx@163.com 2016/4/9 这是我参考了网上很多的文档,配置了这三个软件在一个机器上, ...

  2. 【推荐】CentOS安装Subversion-1.8.11+HTTP协议支持配置

    注:以下所有操作均在CentOS 6.5 x86_64位系统下完成. 我们需要搭建一个自己的SVN服务器. 此外,搭建好的SVN服务器除了需要支持svn协议外,最好还需要支持HTTP协议和HTTPS协 ...

  3. 【推荐】CentOS安装PHP-5.6.4+扩展安装+安全配置+性能配置

    注:以下所有操作均在CentOS 6.5 x86_64位系统下完成. #准备工作# 前段时间PHP官方发布了一个重要的安全升级公告,修复了两个unserialize函数的严重漏洞,目前受影响的版本有: ...

  4. CentOS安装Apache-2.4.10+安全配置

    注:以下所有操作均在CentOS 6.5 x86_64位系统下完成. #准备工作# 在安装Nginx之前,请确保已经使用yum安装了各基础组件,并且配置了www用户和用户组,具体见<CentOS ...

  5. CentOS安装Nginx-1.6.2+安全配置

    注:以下所有操作均在CentOS 6.5 x86_64位系统下完成. #准备工作# 在安装Nginx之前,请确保已经使用yum安装了pcre等基础组件,具体见<CentOS安装LNMP环境的基础 ...

  6. CentOS安装MySQL-5.6.10+安全配置

    注:以下所有操作均在CentOS 6.5 x86_64位系统下完成. #准备工作# 在安装MySQL之前,请确保已经使用yum安装了各类基础组件,具体见<CentOS安装LNMP环境的基础组件& ...

  7. 转: CentOS 安装 SVN1.8 客户端

     from: http://blog.csdn.net/clementad/article/details/46898091 CentOS 安装SVN客户端 标签: subversionrpmcent ...

  8. CentOS安装gitLab服务器

    首先利用gitlab-install-el6.sh安装,比较简单: (出处:http://www.linuxidc.com/Linux/2013-06/85754.htm) 1:如果有条件,提供一台全 ...

  9. 【推荐】CentOS安装Tomcat-7.0.57+启动配置+安全配置+性能配置

    注:以下所有操作均在CentOS 6.5 x86_64位系统下完成. #准备工作# 在安装Tomcat之前,请确保已经安装了JDK-1.7环境,具体见<CentOS安装JDK-1.7>. ...

随机推荐

  1. 004-linux命令-搜索命令find、locate、whereis、which、type

    一.概述 使用linux系统难免会忘记文件所在的位置,可以使用以下命令对系统中的文件进行搜索. 1.1.find 语法:find <指定目录> <指定条件> <指定动作& ...

  2. redis.conf密码设置的问题

    requirepass是终端客户端登录需要的密码,配置在服务端 masterauth是从服务器端登录master端需要的密码,配置在从服务端

  3. O(N)的时间寻找最大的K个数

    (转:http://www.cnblogs.com/luxiaoxun/archive/2012/08/06/2624799.html) 寻找N个数中最大的K个数,本质上就是寻找最大的K个数中最小的那 ...

  4. linux上pem格式私钥转pfx格式证书的命令

    1.root.csr 可改成其它名字,后缀名不改 openssl req -new -key 私钥名称.pem -out root.csr 2.root.crt 可改成其它名字,后缀名不改 opens ...

  5. php __FILE__ symlink

    定义 __FILE__ 是一个魔法变量(预定义常量),当前运行文件的完整路径(真是文件路径,非软链路径)和文件名.如果用在被包含文件中,则返回被包含的文件名. 官方解释:  __FILE__  文件的 ...

  6. bowtie2 Linux安装

    目前最新版本为2.3.2,网址为:https://sourceforge.net/projects/bowtie-bio/files/bowtie2/2.3.2 安装分为简单的下载可执行文件和源编译安 ...

  7. 使用Github进行代码管理

    准备: Github地址:https://github.com 注册Github帐号 一.新建仓库 进入如下界面: 到这里仓库就创建完成了. 二.安装Github-window-desktop 安装g ...

  8. 工具方法 获取远程IP

    java-code: public String getRemoteIP(HttpServletRequest request) { String clientIp = request.getHead ...

  9. 读书笔记_Effective_C++_条款二:尽量以const, enum, inline替换#define

    其实这个条款分成两部分介绍会比较好,第一部分是用const和enum替换不带参的宏,第二部分是用inline替换带参的宏. 第一部分:用const和enum替换不带参宏 宏定义#define发生在预编 ...

  10. 百度编辑器 Ueditor

    针对与编辑器里面的图片的存储问题:\ueditor\1.4.3\php\conf.json 文件里面 /* 前后端通信相关的配置,注释只允许使用多行方式 */{/* 上传图片配置项 */“imageA ...