step1:python环境安装
#pwd
/usr/local/soft
#wget https://www.python.org/ftp/python/3.5.5/Python-3.5.5.tar.xz
#unxz Python-3.5.5.tar.xz
#tar -xvf Python-3.5.5.tar
#cd Python-3.5.5
#./configure --prefix=/usr/local/python/python3
#make
#make install
step2:克隆项目到本地
#git clone https://github.com/0xbug/Hawkeye.git --depth 1
#cd Hawkeye
step3:python虚拟沙盒安装
#pip install virtualenv
# /usr/local/python/bin/virtualenv --python=/usr/local/python/python3/bin/python3 venv
#source venv/bin/activate
#pip install -r deploy/requirements.txt
#deactivate //退出沙盒
step4:配置文件(github账号|mongodb账号)
#cp config.ini.example config.ini
#vim config.ini
[Auth]
ENABLE = 1
TYPE = basic
USERNAME =
PASSWORD =
[GitHub]
USERNAME =******
PASSWORD =******
ERROR = We could not perform this search
[MongoDB]
HOST = 192.168.192.**2
PORT = 27017
ACCOUNT =gitlog
PASSWORD =gitlog
[Leakage]
NODES = //*[@id="code_search_results"]/div/div[*]
DATETIME = //*[@id="code_search_results"]/div/div[{}]/div[1]/div/div/span[2]/relative-time
LINK = //*[@id="code_search_results"]/div/div[{}]/div[1]/div/a[2]
PROJECT = //*[@id="code_search_results"]/div/div[{}]/div[1]/div/a[1]
USERNAME = //*[@id="code_search_results"]/div/div[{}]/div/a
RAW = //*[@id="code_search_results"]/div/div[{}]/div[1]/div/a[2]
FILENAME = //*[@id="code_search_results"]/div/div[{}]/div[1]/div/a[2]
[Notice]
ENABLE =1
MAIL_SERVER =mail.cdeledu.com
MAIL_PORT = 993
FROM =****@cdeledu.com
PASSWORD =******
step5:【MongoDB 安装&配置】
mongodb安装:
#创建mongodb.repo文件
#vim /etc/yum.repos.d/mongodb.repo
[mongodb]
name=MongoDB Repository
baseurl=http://downloads-distro.mongodb.org/repo/redhat/os/x86_64/
gpgcheck=0
enabled=1
#安装mongodb
#yum install -y mongodb-org
#启动mongodb
#/usr/bin/mongod -dbpath=/usr/local/mongodb/data -logpath=/usr/local/mongodb/hawkeye.log
#创建mongodb实例
#mongo
>db.createUser({user:'gitlog',pwd:'gitlog',roles:[{role:'dbOwner',db:'Hawkeye'}]})
【通过ip及端口方式连接mongo】
#mongo 192.168.192.142:27017
step6:启动hawkeye:
#python Hawkeye.py
#浏览器访问进行扫描规则及定时任务配置
http://ip:5000/
转载于:https://my.oschina.net/guiguketang/blog/1927234