H1ve平台搭建
H1ve最快捷的部署方式直接用docker搭建就好了,所以我们首先需要安装docker和docker-compose
常见问题解决 Issues · D0g3-Lab/H1ve · GitHub
1.docker安装
centos:
1 | sudo yum install -y git (安装git,一会要拉取源代码) |
ubuntu:
sudo apt-get update(更新一下)
sudo apt-get upgrade (更新一下)
sudo apt-get install docker.io -y (安装docker)
systemctl start docker (启动docker)
systemctl enable docker (设置开机自启)
2.docker-compose安装
ubuntu和centos一样:
(下载并且安装)
curl -L “https://github.com/docker/compose/releases/download/1.27.2/docker-compose-$(uname -s)-$(uname -m)” -o /usr/local/bin/docker-compose
(赋予权限)
chmod +x /usr/local/bin/docker-compose
(查看版本,应该是1.2x.x)
docker-compose -version
3.安装H1ve(ubuntu和centos一样)
git clone https://github.com/D0g3-Lab/H1ve.git (拉取源代码)
cd H1ve (进入目录)
运行前要修改数据库版本
docker-compose -f single.yml up (跑起)
Hfish蜜罐搭建(docker)
1 | docker images |
如何正确使用Docker出一道CTF题目 - Von的博客 | Von Blog (v0n.top)
hexo迁移
首先配置好git,node环境
设置github用户认证
1 | git config --global user.name "你的名字"(注意前边是“- -global”,有两个横线) |
npm换源
1 | npm config set registry https://registry.npm.taobao.org/ |
安装hexo
1 | npm install hexo-cli -g |
进入 Blog 目录(拷贝到新电脑的目录),输入下面指令安装相关模块
1 | npm installnpm install hexo-deployer-git --save // 文章部署到 git 的模块(下面为选择安装) |
hexo三连
HFfish
1. 放行端口或关闭防火墙
1 | 放通4433、4434端口命令 |
1 | CentOS 7 关闭防火墙命令 |
2. 安装
1 | bash <(curl -sS -L https://hfish.net/webinstall.sh) |
雷池waf安装
1. 在线安装
复制以下命令执行,即可完成安装
1 | bash -c "$(curl -fsSLk https://waf-ce.chaitin.cn/release/latest/setup.sh)" |
如果需要使用华为云加速,可使用
1 | CDN=1 bash -c "$(curl -fsSLk https://waf-ce.chaitin.cn/release/latest/setup.sh)" |
如果需要安装最新版本流式检测模式,可使用
1 | STREAM=1 bash -c "$(curl -fsSLk https://waf-ce.chaitin.cn/release/latest/setup.sh)" |
碎遮 SZhe Scan
1 | git clone https://github.com/Cl0udG0d/SZhe_Scan |
docker换源
1 | error; pulling image configuration: download failed after attempts=6: dial tcp 104.16.100.207:443: i/o timeout |
防火墙常用命令
1 | 1.systemctl start firewalld.service(开启防火墙) |
Windows下如何查看某个端口被谁占用
这里我们以8081端口为例讲解。
- 按下Win+R调出命令行窗口,输入netstat -aon|findstr “8081”,找到指定行最后一列的数字(PID),我们这里是9548.
- 输入tasklist|findstr “9548”,发现是javaw.exe占用了8081端口。
- 再次输入taskkill /f /t /im javaw.exe结束该进程。
hexo迁移
首先配置好git,node环境
设置github用户认证
1 | git config --global user.name "你的名字"(注意前边是“- -global”,有两个横线) |
npm换源
1 | npm config set registry https://registry.npm.taobao.org/ |
安装hexo
1 | npm install hexo-cli -g |
进入 Blog 目录(拷贝到新电脑的目录),输入下面指令安装相关模块
1 | npm installnpm install hexo-deployer-git --save // 文章部署到 git 的模块(下面为选择安装) |
hexo三连
hexo图片显示
- 新建博文可以不用
hexo new xxx
指令,我较为推荐直接新建文件和文件夹的方式,只要达到一个md文件,一个同名文件夹的效果即可; - 【将
_config.yml
文件中的post_asset_folder
选项设为true
】是必须的!理论上既然没用hexo new xxx
指令,文件夹也是我自己新建的,这一步设置的意义似乎并不存在,但是后文介绍的插件必须在post_asset_folder
选项设为true
的情况下才能生效
1 | 在使用 hexo-asset-image 管理图片的时候,发生了路径错误 |