diff --git a/docs/1-1-honeypot.md b/docs/1-1-honeypot.md new file mode 100644 index 0000000..ee97a27 --- /dev/null +++ b/docs/1-1-honeypot.md @@ -0,0 +1,6 @@ +**蜜罐** 技术本质上是一种对攻击方进行 **欺骗的技术**,通过布置一些作为 **诱饵的主机**、**网络服务** 或者 **信息**,诱使攻击方对它们实施攻击,从而可以对攻击行为进行 **捕获** 和 **分析**,了解攻击方所使用的工具与方法,推测攻击意图和动机,能够让防御方清晰地了解他们所面对的安全威胁,并通过技术和管理手段来增强实际系统的安全防护能力。 + +**蜜罐** 好比是 **情报收集系统**。蜜罐好像是故意让人攻击的目标,**引诱黑客前来攻击**。所以攻击者入侵后,你就可以知道他是如何得逞的,随时了解针对服务器发动的最新的攻击和漏洞。还可以通过窃听黑客之间的联系,收集黑客所用的种种工具,并且掌握他们的社交网络。 + + + diff --git a/docs/1-2-spec.md b/docs/1-2-spec.md new file mode 100644 index 0000000..ebaf7b0 --- /dev/null +++ b/docs/1-2-spec.md @@ -0,0 +1,9 @@ +- 安全可靠:主打低中交互蜜罐,简单有效; + +- 蜜罐丰富:支持SSH、FTP、TFTP、MySQL、Redis、Telnet、VNC、Memcache、Elasticsearch、Wordpress、OA系统等10多种蜜罐服务,支持用户制作自定义Web蜜罐; +- 开放透明:支持对接微步在线X社区API、五路syslog输出、支持邮件、钉钉、企业微信、飞书、自定义WebHook告警输出; +- 快捷管理:支持单个安装包批量部署,支持批量修改端口和服务; +- 跨平台:支持Linux x32/x64/ARM、Windows x32/x64平台 + + + diff --git a/docs/1-3-workflow.md b/docs/1-3-workflow.md new file mode 100644 index 0000000..08ffe48 --- /dev/null +++ b/docs/1-3-workflow.md @@ -0,0 +1,10 @@ +HFish由控制端和节点端组成,控制端用来生成和管理节点端,并接收、分析和展示节点端回传的数据,节点端接受控制端的控制并负责构建蜜罐服务。 + +![image-20210611130621311](http://img.threatbook.cn/hfish/20210616174908.png) + +> 融合在企业网络中 + +![image-20210611130733084](http://img.threatbook.cn/hfish/20210616174930.png) + + + diff --git a/docs/2-1-docker.md b/docs/2-1-docker.md new file mode 100644 index 0000000..c61ffde --- /dev/null +++ b/docs/2-1-docker.md @@ -0,0 +1,4 @@ +### 待更新 + +…… + diff --git a/docs/2-1-env.md b/docs/2-1-env.md new file mode 100644 index 0000000..31c562e --- /dev/null +++ b/docs/2-1-env.md @@ -0,0 +1,83 @@ +- ### HFish的网络环境 + + > Server端应部署在安全区,只向少部分有网络管理权限和安全分析能力工作的人员和设备开放web和ssh端口 + + 服务端用于配置管理的web页面开启了https,默认访问端口为4433,默认页面在web目录下。(端口和目录,可以在config.ini中自行配置)。 + + ```url + # 举个例子如果您Server端的ip为192.168.11.11,那么您应该在浏览器中输入如下的URL进行访问。 + + https://192.168.11.11:4433/web/ + ``` + + 此外服务端还会开放另外两个端口,节点数据回传端口默认为4434,SSH服务默认访问端口为22。 + + **4433端口和22端口,“只能”被安全区的管理设备访问。4434端口,“必须能”被蜜罐节点访问。** + + + + > OneFish服务端会主动访问如下网络域名 + + OneFish支持IPv4和IPv6地址环境,可以在完全隔离互联网的内部网络工作,但为了最大限度感知真实威胁和对接云端接口消费威胁情报,以及接受自动化升级服务,微步在线强烈建议客户允许HFish服务端访问互联网,为兼顾安全性和服务可用性,推荐用户仅允许OneFish服务端主动访问如下网络域名、地址和端口: + + + + | 目的IP | 协议/端口 | 对应域名 | 访问目的 | + | ------------------------------------------------------------ | --------- | ------------------- | ------------------------------------------------ | + | 103.210.21.74 | TCP/443 | hfish.io | 用于官网升级功能,建议开启 | + | 106.75.36.224 123.59.72.253 123.59.51.113 106.75.36.226 117.50.17.104 | TCP/443 | api.threatbook.cn | 用于威胁情报查询,如果未启用该功能,无需开放 | + | 该域名使用CDN解析,建议用户在实际网络中解析后开放权限 | TCP/443 | open.feishu.cn | 用于飞书告警功能,如果未使用该功能,无需开放 | + | 该域名使用CDN解析,建议用户在实际网络中解析后开放权限 | TCP/443 | oapi.dingtalk.com | 用于钉钉告警功能,如果未使用该功能,无需开放 | + | 该域名使用CDN解析,建议用户在实际网络中解析后开放权限 | TCP/443 | qyapi.weixin.qq.com | 用于企业微信告警功能,如果未使用该功能,无需开放 | + + + + 注意:OneFish服务端仅需要通过NAT模式访问互联网,基于安全考虑,微步在线不建议用户将OneFish服务端管理接口暴露在互联网。 + + 1. 如果使用邮件通知,请开启相应邮件服务器的访问权限。 + + 2. 与此同时我们还支持 5 路syslog日志的发送,便于您的安全设备联动。请根据自己的情况开放权限。 + + + + + ### Server端的资源要求 + + + + > 蜜罐对资源的要求根据攻击数量的区别差异很大,通常来说部署在内网的蜜罐,对性能的要求很低。 + > + > 但接入公网的蜜罐对性能就会有更大的需求。 + + 针对我们过往的测试的情况,我们给出两个配置,一个最低配置,一个是我们的推进配置。如果您的蜜罐打算接到公网,并有比较大的攻击流量,请跟进资源占用情况,提升主机的配置。 + + ```wiki + 最低配置:Server端 1c2g100G、节点1c1g50G + + 建议配置:Server端 2c4g200G、节点1c2g50G + + 日志磁盘占用,受攻击数量影响较大,我们建议Server端配置200G硬盘空间以上。 + ``` + + + + ### Server端的权限审核 + + + + > 对root权限的需求 + + ```wiki + 直接部署安装方式服务端的过程中,对于Mysql数据的安装和配置需要root权限。Server端的部署和使用不需要root权限。 + ``` + + + + ### 节点的安全配置 + + > 节点因为是直接面对攻击者的,安全配置是节点安全的重要保障 + + 1. 外网节点和内网节点不能共用 + 2. 如果有节点需要能被外网访问,那么建议把节点和服务端部署在DMZ区。 + 3. 外网节点除了能访问Server端的4434(默认)端口外,不能有权限访问内网中的任何资产。 + 4. 内网节点除了开放蜜罐服务相应端口外,其它任何端口都不应该在网络中能被用户访问到。考虑安全区设备有维护节点主机的需求,可以向有限的设备开放ssh端口。 diff --git a/docs/2-2-linux.md b/docs/2-2-linux.md new file mode 100644 index 0000000..7e08e4d --- /dev/null +++ b/docs/2-2-linux.md @@ -0,0 +1,45 @@ +- ### 手动安装 + + 如果上述的安装脚本您无法使用,您可以尝试用手动安装完成部署。 + + 到官网 [https://hfish.io](https://hfish.io/) 下载HFish最新版本安装包,按如下步骤进行安装 (以linux64位系统为例): + + > 第一步: 在当前目录创建一个路径解压安装包 + + ``` + mkdir hfish + ``` + + > 第二步:将安装文件包解压到hfish目录下 + + ``` + tar zxvf hfish-*-linux-amd64.tar.gz -C hfish + ``` + + > 第三步:请防火墙开启4433或者4434,确认返回success(如果有其他服务需要打开端口,使用相同命令打开。 + + ``` + firewall-cmd --add-port=4433/tcp --permanent + firewall-cmd --add-port=4434/tcp --permanent + firewall-cmd --reload + ``` + + > 第四步:进入安装目录直接运行server,或者后台运行 nohup ./server & + + ``` + cd hfish + nohup ./server & + ``` + + > 第五步:登陆web界面 + + ``` + 登陆链接:https:// [ip]:4433/web + 账号:admin + 密码:HFish2021 + ``` + + 例:如果控制端的ip是192.168.1.1,登陆链接为:https://192.168.1.1:4433/web + + 控制端部署完成后,请继续参考下面的【控制端配置】完成配置 + diff --git a/docs/2-3-windows.md b/docs/2-3-windows.md new file mode 100644 index 0000000..dc9f931 --- /dev/null +++ b/docs/2-3-windows.md @@ -0,0 +1,20 @@ +> 第一步:下载HFish + + 访问我们官网的[下载页面](https://hfish.io/#/download),下载最新版的服务端并解压。 + +> 第二步:运行文件目录下的server.exe + + server.exe为后台运行,启动后直接后台运行。 + +> 第三步:登陆web界面 + +``` +登陆链接:https:// [ip]:4433/web +账号:admin +密码:HFish2021 +``` + +例:如果控制端的ip是192.168.1.1,登陆链接为:https://192.168.1.1:4433/web + +控制端部署完成后,请继续参考下面的【控制端配置】完成配置 + diff --git a/docs/2-4-mariadb.md b/docs/2-4-mariadb.md new file mode 100644 index 0000000..3d30075 --- /dev/null +++ b/docs/2-4-mariadb.md @@ -0,0 +1,44 @@ +- ### 数据库相关 + +HFish系统默认使用的sqlite数据库,具体见 db/hfish.db(自带的已经初始化好的db),相关的初始化脚本见 db/sql/sqlite/V<% version %>__sqlite.sql + +如果您想要重置 hfish.db, 可以通过下面命令生成新的 db 文件(请确保安装了sqlite3数据库)。 替换 db/hfish.db 即可。 + +``` +sqlite3 hfish.db < db/sql/sqlite/V<% version %>__sqlite.sql +``` + + + +**sqlite数据库无需安装,使用方便,但在遭到大规模攻击,及当前版本升级时候会存在数据丢失的问题。** + +因此,HFish同时**支持mysql**数据库,相关的初始化脚本见 db/sql/mysql/V<% version %>__mysql.sql。 + +如果您想要切换到mysql数据库,可以进行以下操作(请确认已经安装了mysql数据库,推荐5.7及以上版本) + +> 1. 初始化数据库 + +linux环境可以在命令行执行下述命令,然后输入密码(root用户密码)。 + +``` +mysql -u root -p < db/sql/mysql/V<% version %>__mysql.sql +``` + +windows环境可以使用远程连接工具(比如sqlyog等)导入db/sql/mysql/V<% version %>__mysql.sql 脚本。 + + + +> 2. 修改config.ini配置文件,数据库的连接方式,主要需要修改type和url,如下: + +``` +[database] +type = sqlite3 +max_open = 50 +max_idle = 50 +url = ./db/hfish.db?cache=shared&mode=rwc +# type = mysql +# url = root:HFish312@tcp(:3306)/hfish?charset=utf8&parseTime=true&loc=Local +``` + + + diff --git a/docs/3-1-node.md b/docs/3-1-node.md new file mode 100644 index 0000000..016fd93 --- /dev/null +++ b/docs/3-1-node.md @@ -0,0 +1,54 @@ +!> 点击增加节点,选择相应版本的【节点安装包】,确定 + +image-20210616171459269 + +```wiki +- 如果您在上面的操作中,选择的是linux安装包,在【确定】后,会出现如下页面,您可以用两种方式让您的节点主机完成部署。 +1. 一句话脚本,直接在节点主机上运行 +2. 下载可执行文件,并把这个文件上传到节点主机上运行 + +- 如果您在上面的操作中,选择的windows安装包,在【确定】后,只有一种方式供您选择。 +1. 下载可执行文件,并把这个文件上传到节点主机上运行 +``` + +image-20210616172027825 + + + +### 为节点选择服务模板 + +> 展开蜜罐节点,选择上面创建的蜜罐模板 + +image-20210616173015062 + + + +> 刚变更模板后的蜜罐服务状态为【启用】 + +image-20210616173053947 + + + +> 节点正常完成模板加载后,服务状态应该为【在线】。如果是【离线】,说明蜜罐服务没有正常启动,请参考我们后面的【排错说明】,找到问题。 + +image-20210616173128526 + + + +### 主机失陷检测 + +失陷蜜饵是部署在业务主机上的失陷检测蜜饵。在主机失陷情况下,通过部署虚假的账号、本地证书等失陷蜜饵,诱导攻击者转移攻击目标,并触发失陷告警。 + +其中,主机蜜饵是一种基于部署虚假的账号密码配置文件,诱导转移攻击者攻击目标的防御手段。 + +命令在主机运行后,会在本地生成一份虚假的“账号密码备份文件”。 当该主机被攻陷时,攻击者将被诱导,使用文件中的账号信息进行登录。借此,安全人员发现主机失陷情况。 + +image-20210506162347469 + + + +![image-20210506162447618](https://hfish.cn-bj.ufileos.com/images/image-20210506162447618.png) + + + +### diff --git a/docs/3-2-services.md b/docs/3-2-services.md new file mode 100644 index 0000000..3a3e6e3 --- /dev/null +++ b/docs/3-2-services.md @@ -0,0 +1,136 @@ +### 配置工作总览 + +!> 在完成控制端的部署后,我们还需要几个配置工作让整个系统运行起来。 + +```wiki +1. 添加【蜜罐服务】,让系统获得相应蜜罐的能力。 +2. 创建【服务模板】,模板是数个蜜罐服务的集合,在大规模部署的环境中,模板可以帮我们更高效管理我们的集群。 +3. 【增加节点】,单机版自带一个节点,集群版不带节点。系统至少需要一个节点才能正常运行。 +4. 为蜜罐节点选择【服务模板】,选择了什么服务模板,蜜罐节点就具有了模板中的蜜罐能力。 +``` + + + +### 添加蜜罐服务 + +!> 控制端运行起来后,我们需要做的第一件事情就是下载蜜罐服务。您有2种方法可以添加蜜罐服务,任选一种即可。 + +> 【服务管理】中下载蜜罐服务 + +```wiki +1. 登陆控制端后,打开【服务管理】页面,首次登陆页面上蜜罐服务都是灰色。 +2. 选择自己需要的蜜罐服务进行下载。 +``` + +image-20210616164012531 + + + +> 手动上传蜜罐服务包 + +**当您处于离线环境不方便在线安装情况下,您可以使用手动上传安装的方式。** + +```wiki +1. 下载最新官方服务包 http://img.threatbook.cn/hfish/svc/services-<% version %>.tar.gz +2. 在新增服务页面上选择该服务包上传。 +``` + +image-20210616165214921 + + + +> *上传自定义web蜜罐 + +​ 如果您有自定义web蜜罐的需求,我们为您准备了开发样例,您可以参考我们的[文档](https://hfish.io/#/function?id=web%e8%9c%9c%e7%bd%90%e8%87%aa%e5%ae%9a%e4%b9%89%e5%bc%80%e5%8f%91)完成蜜罐的开发工作后,进行上传。 +​ 当然您也可以在社区中寻找其它用户开发好的蜜罐上传后使用。 + + + +### 自定义web蜜罐页面 + +#### 通过样例了解功能实现方式 + +> web蜜罐样例 + +```wiki +# 下载自定义web蜜罐样例 +http://img.threatbook.cn/hfish/svc/web-demo.zip +``` + + + +> 解压后获得两个文件 + +```wiki +# index.html +# portrait.js +``` + + + +> index.html文件中的代码功能 + +```wiki +
中的代码明确了页面上账密表单的提交方式。 +具体利用方式参考下文[制作全新的登陆页面] + + + + \ No newline at end of file diff --git a/docs/blog/about/index.html b/docs/blog/about/index.html new file mode 100644 index 0000000..b74d276 --- /dev/null +++ b/docs/blog/about/index.html @@ -0,0 +1,131 @@ + + + + + + +关于 - HFish + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+
+
+
+ +
+
+
+
+ + + + + + + + + +
+
+ + diff --git a/docs/blog/api-content/index.html b/docs/blog/api-content/index.html new file mode 100644 index 0000000..03803cf --- /dev/null +++ b/docs/blog/api-content/index.html @@ -0,0 +1 @@ +{"posts":[{"title":"我们开始写博客了","content":"这个博客主要是HFish产品团队跟大家分享自己的使用心得、实践体会和学习笔记。 目前负责维护博客的人包括3个: Ren老湿:HFish业务leader,传说中的技术大佬。 多年管理岗位后,对北京的水疗店里,哪家的小姐姐最美、哪家的性价比最高,了如指掌!在某次团建中他遭到了麻老师地供应链攻击(葡萄酒中兑了葡萄味的江小白),神志迷离状态中,说出了自己之前团队的APT编号……但联想到他笨拙的日站身手,引得大家哄堂大笑。 麻老师:HFish的新人产品经理,公司里的女明星,每天都有后援会投喂的那种。 麻老师硕士毕业论文的方向是【汽车自动控制】,读书期间原力觉醒,对提升中国物联网安全实力,迸发了超强的责任感!一毕业就加入了HFish团队。 每周的周会上,Ren老湿总是憧憬未来,如果我们的我们用户数量的柱形图有麻老师腿那么长,我们何愁大事不成! 而大家问到免费的HFish未来走向何方时?魏脑丝也总会放下自己刚点的炉火外卖给大家布道!对于我们这个团队来说,靠一款安全产品赢利,那是我们的失败!娱乐圈的钱明显要比安全圈好赚呀,放眼全球,麻老师这种“超模工程师”+“黑客狙击手”的女艺人人设,都是独一无二的!到那一天盈利对我们来说,只是我们发展的副产品而已! **魏脑丝:**HFish的产品运营,混迹娱乐圈多年,因为《限娱令》丢了工作,兜兜转转混入了技术圈。 魏脑丝技术虽然小白,但是能忽悠,不管懂不懂,他都能跟你瞎扯!据说当年面试时,HR问他:“为啥你觉得自己能胜任安全产品社区的运营工作?”他高傲地回复到:“我之前在竞争最激烈的娱乐行业,做宅男向粉丝的运营。你看安全产品社区里面的用户,还是这帮宅男,但是这个细分市场却完全没有竞争可言,我不觉得我加入这里需要谈【胜任】这个问题,我进入这个行业,是降!维!打!击!” ","link":"http://localhost:4000/post/first-blog/"}]} \ No newline at end of file diff --git a/docs/blog/api-info/index.html b/docs/blog/api-info/index.html new file mode 100644 index 0000000..9523c68 --- /dev/null +++ b/docs/blog/api-info/index.html @@ -0,0 +1 @@ +{"posts":[{"fileName":"first-blog","abstract":"","description":"这个博客主要是HFish产品团队跟大家分享自己的使用心得、实践体会和学习笔记。 目前负责维护博客的人包括3个: Ren老湿:HFish业务leader,传说中的技术大佬。 多年管理岗位后,对北京的水疗店里,哪家的小姐姐最美、哪家的性价比...","title":"我们开始写博客了","tags":[{"name":"blog","slug":"vuXWknrCE","used":true,"link":"http://localhost:4000/tag/vuXWknrCE/"}],"feature":"http://localhost:4000/post-images/first-blog.jpeg","link":"http://localhost:4000/post/first-blog/","stats":{"text":"3 min read","time":126000,"words":624,"minutes":3},"isTop":true,"toc":"","date":"2021-07-05 09:21:15","dateFormat":"2021-07-05"}],"tags":[{"name":"blog","slug":"vuXWknrCE","used":true,"link":"http://localhost:4000/tag/vuXWknrCE/","count":1}],"menus":[{"link":"http://localhost:4000/","name":"首页","openType":"Internal"},{"link":"http://localhost:4000/archives","name":"归档","openType":"Internal"},{"link":"http://localhost:4000/tags","name":"标签","openType":"Internal"},{"link":"http://localhost:4000/post/about","name":"关于","openType":"Internal"}],"themeConfig":{"themeName":"pure","postPageSize":20,"archivesPageSize":50,"siteName":"HFish","siteDescription":"做一款大家喜欢的产品,是一件很开心的事情。","footerInfo":"Powered by HFish.io","showFeatureImage":true,"domain":"http://localhost:4000","postUrlFormat":"SLUG","tagUrlFormat":"SHORT_ID","dateFormat":"YYYY-MM-DD","feedFullText":false,"feedCount":10,"archivesPath":"archives","postPath":"post","tagPath":"tag"},"customConfig":{"APP_ID":"","APP_KEY":"","about":"","avatar":"","caf":"#84fab0","ccf":"#5f6169","ccs":"#999fa7","ctf":"#ffffff","cts":"#dddddd","customCss":"","descfriend":"","dribbble":"","facebook":"","friends":[],"ga":"","github":"","isEnabledCustomColor":false,"pageSize":"5","placeholder":"Just Go Go","recordIp":false,"skin":"gray","twitter":"","vMaxWidth":"1000","vPadding":"2.5%","vPercentWidth":"100","valine":false,"visitor":false,"weibo":"","zhihu":""},"utils":{"now":1625471904515}} diff --git a/docs/blog/archives/index.html b/docs/blog/archives/index.html new file mode 100644 index 0000000..c2ed521 --- /dev/null +++ b/docs/blog/archives/index.html @@ -0,0 +1,149 @@ + + + + + + +HFish + + + + + + + + + + + + + + + + + + + + + + +
+
+ + +
+
+ +
+
+ + + + +
+
+ + diff --git a/docs/blog/atom.xml b/docs/blog/atom.xml new file mode 100644 index 0000000..c2783d2 --- /dev/null +++ b/docs/blog/atom.xml @@ -0,0 +1,20 @@ + + + http://localhost:4000 + HFish + 2021-07-05T09:49:37.010Z + https://github.com/jpmonette/feed + + + 做一款大家喜欢的产品,是一件很开心的事情。 + http://localhost:4000/images/avatar.png + http://localhost:4000/favicon.ico + All rights reserved 2021, HFish + + <![CDATA[我们开始写博客了]]> + http://localhost:4000/post/first-blog/ + + + 2021-07-05T01:21:15.000Z + + \ No newline at end of file diff --git a/docs/blog/favicon.ico b/docs/blog/favicon.ico new file mode 100644 index 0000000..c3c1460 Binary files /dev/null and b/docs/blog/favicon.ico differ diff --git a/docs/blog/friends/index.html b/docs/blog/friends/index.html new file mode 100644 index 0000000..c68adcd --- /dev/null +++ b/docs/blog/friends/index.html @@ -0,0 +1,141 @@ + + + + + + + +友情链接 - HFish + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + +
+
+
+ +
+
+ +
+ + + + +
+ +
+
+ +
+ + + + + + + +
+
+ + + diff --git a/docs/blog/images/avatar.png b/docs/blog/images/avatar.png new file mode 100644 index 0000000..c3c1460 Binary files /dev/null and b/docs/blog/images/avatar.png differ diff --git a/docs/blog/index.html b/docs/blog/index.html new file mode 100644 index 0000000..3c218ef --- /dev/null +++ b/docs/blog/index.html @@ -0,0 +1,161 @@ + + + + + + +HFish + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + +
+
+ +
+
+ +
+ +
+ +
+ + + + +
+ +
+
+ +
+ + +
+ + + + + + +
+
+ + diff --git a/docs/blog/media/README.md b/docs/blog/media/README.md new file mode 100644 index 0000000..2063dc4 --- /dev/null +++ b/docs/blog/media/README.md @@ -0,0 +1 @@ +media: 静态资源存放文件夹,可在此文件夹放 images、fonts、scripts... 等资源 diff --git a/docs/blog/media/gridea-search/gridea-search.js b/docs/blog/media/gridea-search/gridea-search.js new file mode 100644 index 0000000..4cf343f --- /dev/null +++ b/docs/blog/media/gridea-search/gridea-search.js @@ -0,0 +1,230 @@ +/** + * 由 宝硕(https://github.com/renbaoshuo) 修改自 https://github.com/tangkaichuan/gridea-search + */ + +(function () { + //获取url参数 + function getParam(url, param) { + if (url.indexOf('?') > -1) { + var urlSearch = url.split('?'); + var paramList = urlSearch[1].split('&'); + for (var i = paramList.length - 1; i >= 0; i--) { + var temp = paramList[i].split('='); + if (temp[0] === param) { + return temp[1]; + } + } + } else { + return ""; + } + } + + //获取解码后的搜索词 + function getQueryPhrase() { + if(window.location.href.indexOf('?') == -1) return ""; + var phrase = getParam(window.location.href, 'q'); + var queryPhrase = decodeURIComponent(phrase.replace(/\+/g, ' ')); + return queryPhrase; + } + + //填充搜索输入框 + function fillSearchInput() { + var searchForm = document.getElementById('gridea-search-form'); + var searchInput = searchForm.getElementsByTagName('input')[0]; + searchInput.value = getQueryPhrase(); + } + + //Ajax异步GET请求 + function ajax(obj) { + var xhr = new XMLHttpRequest(); + xhr.open('get', obj.url, true); + xhr.send(null); + xhr.onreadystatechange = function () { + //异步请求:响应状态为4,数据加载完毕 + if (xhr.readyState === 4) { + if (xhr.status === 200) { + obj.success(xhr.responseText); + } else { + obj.error(xhr.status); + } + } + } + } + + //模糊搜索 https://github.com/krisk/fuse + function fuzzySearch(data, phrase) { + var options = { + includeMatches: true, + ignoreLocation: true, + keys: [ + 'title', + 'content' + ] + }; + var fuse = new Fuse(data, options); + var fuzzyResult = fuse.search(phrase); + return fuzzyResult; + } + + //检查缓存是否最新 + function checkCache() { + var caches = {}; + caches.infos = JSON.parse(localStorage.getItem('InfosCache')); + caches.contents = JSON.parse(localStorage.getItem('ContentsCache')); + if (caches.infos && caches.contents) { + var cachedTime = caches.infos.utils.now.toString(); + var updateTime = document.getElementById('gridea-search-result').getAttribute('data-update'); + if (cachedTime === updateTime) { + return caches; + } + } + localStorage.removeItem('InfosCache'); + localStorage.removeItem('ContentsCache'); + return false; + } + + //获取博客全文api + function getContents(callback) { + var caches = checkCache(); + if (caches) { + callback(caches.contents); + } + else { + ajax({ + url: '../api-content/index.html' + "?_=" + Date.now(), + success: function (data) { + callback(JSON.parse(data)); + localStorage.setItem('ContentsCache', data); + } + }); + } + } + + //获取博客信息api + function getInfos(callback) { + var caches = checkCache(); + if (caches) { + callback(caches.infos); + } + else { + ajax({ + url: '../api-info/index.html' + "?_=" + Date.now(), + success: function (data) { + callback(JSON.parse(data)); + localStorage.setItem('InfosCache', data); + } + }); + } + } + + //根据一段文本调用模糊搜索 + function searchBy(phrase, callback) { + var result = ''; + var getFuzzyResult = function (data) { + result = fuzzySearch(data.posts, phrase); + callback(result); + } + //根据全文内容获取搜索结果 + getContents(getFuzzyResult); + } + + //显示无搜索结果 + function showNoResult() { + var resultDIV = document.getElementById('gridea-search-result'); + var noResult = resultDIV.getElementsByClassName('no-result')[0]; + noResult.style.display = 'block'; + resultDIV.innerHTML = noResult.outerHTML; + } + + //根据解码后的搜索词执行搜索 + function searchByPhrase(resultHandler) { + var queryPhrase = getQueryPhrase(); + if (queryPhrase === '' || typeof (queryPhrase) === 'undefined') { + showNoResult(); + } else { + searchBy(queryPhrase, resultHandler); + } + } + + //获取搜索结果列表模板的URL + function getTemplateURL() { + var scripts = document.getElementsByTagName('script'); + var templateURL = ''; + for (var i = 0; i < scripts.length; i++) { + if (scripts[i].type === 'text/ejs') { + templateURL = scripts[i].src; + return templateURL; + } + } + } + + //渲染搜索结果列表ejs https://github.com/mde/ejs + function renderResult(searchedInfos) { + if (searchedInfos.posts.length > 0) { + ajax({ + url: getTemplateURL(), + success: function (data) { + var resultDIV = document.getElementById('gridea-search-result'); + resultDIV.innerHTML = ejs.compile(data)(searchedInfos); + } + }); + } else { + showNoResult(); + } + } + + //搜索结果关键字高亮 + function keywordHighlight(searchedContent) { + var searchedPostContent = searchedContent.item.content;//搜索结果内容预览 + var preview = '... '; + for (var i = 0; i < searchedContent.matches.length; i++) { + if (searchedContent.matches[i].key === 'content') {//如果匹配到文章内容,截取关键字 + var indices = searchedContent.matches[i].indices[0]; + var beforeKeyword = searchedPostContent.substring(indices[0] - 20, indices[0]);//关键字前10字 + var keyword = searchedPostContent.substring(indices[0], indices[1] + 1);//关键字 + var afterKeyword = searchedPostContent.substring(indices[1] + 1, indices[1] + 120);//关键字后70字 + preview = beforeKeyword + '' + + keyword + '' + afterKeyword; + } else {//没有匹配到文章内容,则是标题,直接截取前80字 + preview = searchedPostContent.substring(0, 80); + } + } + return preview + ' ...'; + } + + //循环匹配搜索到的内容与展示信息 + function getResult(infos, searchedContents) { + var searchedInfos = JSON.parse(JSON.stringify(infos));//对象深拷贝 + searchedInfos.posts = []; + for (var i = 0; i < searchedContents.length; i++) { + for (var j = 0; j < infos.posts.length; j++) { + if (searchedContents[i].item.link === infos.posts[j].link) { + infos.posts[j].searchedPreview = keywordHighlight(searchedContents[i]);// 预览关键字高亮 + infos.posts[j].content = searchedContents[i].item.content;// content注入 + searchedInfos.posts.push(infos.posts[j]);// push到所需结果中 + } + } + } + return searchedInfos; + } + + //主方法 + function grideaSearch() { + //搜索结果回调 + var resultHandler = function (searchedContents) { + getInfos(function (infos) { + // console.log(infos); + // console.log(searchedContents); + var searchedInfos = getResult(infos, searchedContents); + renderResult(searchedInfos); + }); + } + searchByPhrase(resultHandler); + } + + //页面加载完执行 + window.onload = function () { + fillSearchInput(); + grideaSearch(); + } +})(); diff --git a/docs/blog/media/gridea-search/result-template.ejs b/docs/blog/media/gridea-search/result-template.ejs new file mode 100644 index 0000000..f411ea7 --- /dev/null +++ b/docs/blog/media/gridea-search/result-template.ejs @@ -0,0 +1,33 @@ +
+
+ <% posts.forEach(function(post) { %> +
+
+ +
+ + <%= post.title %> + +
+
+

<%- post.searchedPreview %>

+
+
+ +
+ <% if (themeConfig.showFeatureImage && post.feature) { %> + + <% } %> +
+ <% }); %> +
+
diff --git a/docs/blog/media/scripts/index.js b/docs/blog/media/scripts/index.js new file mode 100644 index 0000000..a32b591 --- /dev/null +++ b/docs/blog/media/scripts/index.js @@ -0,0 +1 @@ +console.log('Hello Gridea') \ No newline at end of file diff --git a/docs/blog/post-images/1625471849023.jpeg b/docs/blog/post-images/1625471849023.jpeg new file mode 100644 index 0000000..d575f59 Binary files /dev/null and b/docs/blog/post-images/1625471849023.jpeg differ diff --git a/docs/blog/post-images/first-blog.jpeg b/docs/blog/post-images/first-blog.jpeg new file mode 100644 index 0000000..d575f59 Binary files /dev/null and b/docs/blog/post-images/first-blog.jpeg differ diff --git a/docs/blog/post-images/first-blog.png b/docs/blog/post-images/first-blog.png new file mode 100644 index 0000000..c3c1460 Binary files /dev/null and b/docs/blog/post-images/first-blog.png differ diff --git a/docs/blog/post/first-blog/index.html b/docs/blog/post/first-blog/index.html new file mode 100644 index 0000000..5777a18 --- /dev/null +++ b/docs/blog/post/first-blog/index.html @@ -0,0 +1,163 @@ + + + + + + +我们开始写博客了 | HFish + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+
+
+

+ 我们开始写博客了 +

+ +
+

这个博客主要是HFish产品团队跟大家分享自己的使用心得实践体会学习笔记

+

目前负责维护博客的人包括3个:

+
+

Ren老湿:HFish业务leader,传说中的技术大佬。

+
+

多年管理岗位后,对北京的水疗店里,哪家的小姐姐最美、哪家的性价比最高,了如指掌!在某次团建中他遭到了麻老师地供应链攻击(葡萄酒中兑了葡萄味的江小白),神志迷离状态中,说出了自己之前团队的APT编号……但联想到他笨拙的日站身手,引得大家哄堂大笑。

+
+

麻老师:HFish的新人产品经理,公司里的女明星,每天都有后援会投喂的那种。

+
+

麻老师硕士毕业论文的方向是【汽车自动控制】,读书期间原力觉醒,对提升中国物联网安全实力,迸发了超强的责任感!一毕业就加入了HFish团队。

+

每周的周会上,Ren老湿总是憧憬未来,如果我们的我们用户数量的柱形图有麻老师腿那么长,我们何愁大事不成!

+

而大家问到免费的HFish未来走向何方时?魏脑丝也总会放下自己刚点的炉火外卖给大家布道!对于我们这个团队来说,靠一款安全产品赢利,那是我们的失败!娱乐圈的钱明显要比安全圈好赚呀,放眼全球,麻老师这种“超模工程师”+“黑客狙击手”的女艺人人设,都是独一无二的!到那一天盈利对我们来说,只是我们发展的副产品而已!

+
+

**魏脑丝:**HFish的产品运营,混迹娱乐圈多年,因为《限娱令》丢了工作,兜兜转转混入了技术圈。

+
+

魏脑丝技术虽然小白,但是能忽悠,不管懂不懂,他都能跟你瞎扯!据说当年面试时,HR问他:“为啥你觉得自己能胜任安全产品社区的运营工作?”他高傲地回复到:“我之前在竞争最激烈的娱乐行业,做宅男向粉丝的运营。你看安全产品社区里面的用户,还是这帮宅男,但是这个细分市场却完全没有竞争可言,我不觉得我加入这里需要谈【胜任】这个问题,我进入这个行业,是降!维!打!击!”

+ +
+
+
+ + + + + + + + + + + + + +
+
+ + diff --git a/docs/blog/search/index.html b/docs/blog/search/index.html new file mode 100644 index 0000000..19107b9 --- /dev/null +++ b/docs/blog/search/index.html @@ -0,0 +1,139 @@ + + + + + + + + +搜索 - HFish + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+
+   搜索中...... +

+ 第一次搜索可能需要耗费较长时间构建索引,请耐心等待... +
+ +
+ + + + +
+ + + diff --git a/docs/blog/styles/main.css b/docs/blog/styles/main.css new file mode 100644 index 0000000..2cc7e3f --- /dev/null +++ b/docs/blog/styles/main.css @@ -0,0 +1,1922 @@ +/*! modern-normalize | MIT License | https://github.com/sindresorhus/modern-normalize */ +/* Document + ========================================================================== */ +/** + * Use a better box model (opinionated). + */ +html { + box-sizing: border-box; +} +*, +*::before, +*::after { + box-sizing: inherit; +} +/** + * Use a more readable tab size (opinionated). + */ +:root { + -moz-tab-size: 4; + tab-size: 4; +} +/** + * 1. Correct the line height in all browsers. + * 2. Prevent adjustments of font size after orientation changes in iOS. + */ +html { + line-height: 1.15; + /* 1 */ + -webkit-text-size-adjust: 100%; + /* 2 */ +} +/* Sections + ========================================================================== */ +/** + * Remove the margin in all browsers. + */ +body { + margin: 0; +} +/** + * Improve consistency of default fonts in all browsers. (https://github.com/sindresorhus/modern-normalize/issues/3) + */ +body { + font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'; +} +/* Grouping content + ========================================================================== */ +/** + * Add the correct height in Firefox. + */ +hr { + height: 0; +} +/* Text-level semantics + ========================================================================== */ +/** + * Add the correct text decoration in Chrome, Edge, and Safari. + */ +abbr[title] { + text-decoration: underline dotted; +} +/** + * Add the correct font weight in Chrome, Edge, and Safari. + */ +b, +strong { + font-weight: bolder; +} +/** + * 1. Improve consistency of default fonts in all browsers. (https://github.com/sindresorhus/modern-normalize/issues/3) + * 2. Correct the odd `em` font sizing in all browsers. + */ +code, +kbd, +samp, +pre { + font-family: SFMono-Regular, Consolas, 'Liberation Mono', Menlo, Courier, monospace; + /* 1 */ + font-size: 1em; + /* 2 */ +} +/** + * Add the correct font size in all browsers. + */ +small { + font-size: 80%; +} +/** + * Prevent `sub` and `sup` elements from affecting the line height in all browsers. + */ +sub, +sup { + font-size: 75%; + line-height: 0; + position: relative; + vertical-align: baseline; +} +sub { + bottom: -0.25em; +} +sup { + top: -0.5em; +} +/* Forms + ========================================================================== */ +/** + * 1. Change the font styles in all browsers. + * 2. Remove the margin in Firefox and Safari. + */ +button, +input, +optgroup, +select, +textarea { + font-family: inherit; + /* 1 */ + font-size: 100%; + /* 1 */ + line-height: 1.15; + /* 1 */ + margin: 0; + /* 2 */ +} +/** + * Remove the inheritance of text transform in Edge and Firefox. + * 1. Remove the inheritance of text transform in Firefox. + */ +button, +select { + /* 1 */ + text-transform: none; +} +/** + * Correct the inability to style clickable types in iOS and Safari. + */ +button, +[type='button'], +[type='reset'], +[type='submit'] { + -webkit-appearance: button; +} +/** + * Remove the inner border and padding in Firefox. + */ +button::-moz-focus-inner, +[type='button']::-moz-focus-inner, +[type='reset']::-moz-focus-inner, +[type='submit']::-moz-focus-inner { + border-style: none; + padding: 0; +} +/** + * Restore the focus styles unset by the previous rule. + */ +button:-moz-focusring, +[type='button']:-moz-focusring, +[type='reset']:-moz-focusring, +[type='submit']:-moz-focusring { + outline: 1px dotted ButtonText; +} +/** + * Correct the padding in Firefox. + */ +fieldset { + padding: 0.35em 0.75em 0.625em; +} +/** + * Remove the padding so developers are not caught out when they zero out `fieldset` elements in all browsers. + */ +legend { + padding: 0; +} +/** + * Add the correct vertical alignment in Chrome and Firefox. + */ +progress { + vertical-align: baseline; +} +/** + * Correct the cursor style of increment and decrement buttons in Safari. + */ +[type='number']::-webkit-inner-spin-button, +[type='number']::-webkit-outer-spin-button { + height: auto; +} +/** + * 1. Correct the odd appearance in Chrome and Safari. + * 2. Correct the outline style in Safari. + */ +[type='search'] { + -webkit-appearance: textfield; + /* 1 */ + outline-offset: -2px; + /* 2 */ +} +/** + * Remove the inner padding in Chrome and Safari on macOS. + */ +[type='search']::-webkit-search-decoration { + -webkit-appearance: none; +} +/** + * 1. Correct the inability to style clickable types in iOS and Safari. + * 2. Change font properties to `inherit` in Safari. + */ +::-webkit-file-upload-button { + -webkit-appearance: button; + /* 1 */ + font: inherit; + /* 2 */ +} +/* Interactive + ========================================================================== */ +/* + * Add the correct display in Chrome and Safari. + */ +summary { + display: list-item; +} +*, +*:before, +*:after { + margin: 0; + padding: 0; +} +html, +body, +div, +span, +applet, +object, +iframe, +h1, +h2, +h3, +h4, +h5, +h6, +p, +blockquote, +pre, +a, +abbr, +acronym, +address, +big, +cite, +code, +del, +dfn, +em, +img, +ins, +kbd, +q, +s, +samp, +small, +strike, +strong, +sub, +sup, +tt, +var, +b, +u, +i, +center, +dl, +dt, +dd, +ol, +ul, +li, +fieldset, +form, +label, +legend, +table, +caption, +tbody, +tfoot, +thead, +tr, +th, +td, +article, +aside, +canvas, +details, +embed, +figure, +figcaption, +footer, +header, +hgroup, +menu, +nav, +output, +ruby, +section, +summary, +time, +mark, +audio, +video { + border: 0; + vertical-align: baseline; +} +html { + font-size: 58%; +} +body { + font-family: "PingFang SC", -apple-system, BlinkMacSystemFont, opensans, Optima, 'Microsoft Yahei', sans-serif; + font-size: 16px; + letter-spacing: 1.0382px; +} +button { + outline: none !important; +} +a { + text-decoration: none !important; + transition: all 0.3s; +} +body, +div, +a, +p, +ul, +li, +ol, +h1, +h2, +h3, +h4, +h5, +h6, +table, +tr, +td { + box-sizing: border-box; + margin: 0; + padding: 0; +} +ol li { + list-style: decimal; + font-size: 16px; +} +ul li { + list-style: disc; + font-size: 16px; +} +.main { + max-width: 100%; + min-height: 100vh; + margin: 0 auto; +} +.main .main-content { + flex: 1; + display: flex; + min-height: 100vh; + flex-direction: column; + justify-content: space-between; +} +.gt-post-content { + word-break: normal; + word-wrap: break-word; +} +.gt-post-content a { + transition: all 0.3s; +} +.gt-post-content img { + display: block; + max-width: 100%; + border-radius: 2px; + margin: 18px auto; +} +.gt-post-content p { + line-height: 1.725; + margin-bottom: 18px; + font-size: 16px; + letter-spacing: 1.0382px; +} +.gt-post-content pre { + margin-bottom: 18px; +} +.gt-post-content blockquote { + padding: 16px; + border-left: 4px; + border-style: solid; + margin-bottom: 16px; +} +.gt-post-content blockquote p { + margin-bottom: 0; +} +.gt-post-content table { + border-collapse: collapse; + margin: 1rem 0; + display: block; + overflow-x: auto; +} +.gt-post-content tr { + border-top: 1px solid #dfe2e5; +} +.gt-post-content td, +.gt-post-content th { + border: 1px solid #dfe2e5; + padding: 0.6em 1em; +} +.gt-post-content ul, +.gt-post-content ol { + padding-left: 20px; + line-height: 1.725; + margin-bottom: 16px; +} +.gt-post-content h1, +.gt-post-content h2, +.gt-post-content h3, +.gt-post-content h4, +.gt-post-content h5, +.gt-post-content h6 { + margin-bottom: 18px; + padding-top: 14px; + font-weight: bold; +} +.gt-post-content h1 { + font-size: 28px; +} +.gt-post-content h2 { + font-size: 24px; +} +.gt-post-content h3 { + font-size: 20px; +} +.gt-post-content h4 { + font-size: 18px; +} +.gt-post-content h5 { + font-size: 16px; +} +.gt-post-content h6 { + font-size: 14px; +} +.gt-post-content p code, +.gt-post-content li code { + padding: 0 6px; + margin: 0 3px; + font-size: 13px; + border-radius: 4px; + display: inline-block; +} +.gt-post-content pre { + margin-bottom: 18px; +} +.gt-post-content pre code { + font-size: 13px; + font-family: Menlo, Monaco, 'Source Code Pro', Consolas, 'Courier New', monospace; + padding: 1em; + border-radius: 5px; + line-height: 1.375; + width: 100%; + overflow: scroll; + display: block; +} +.gt-fr { + display: flex; + flex-direction: row; + align-items: center; +} +.gt-fc { + display: flex; + flex-direction: column; +} +.navbar { + padding: 38px 96px !important; +} +.navbar .navbar-brand { + display: flex; + flex-direction: row; + align-items: center; +} +.navbar .navbar-brand .user-avatar { + width: 40px; + height: 40px; + border-radius: 50%; +} +.navbar .navbar-brand .site-name { + font-size: 28px !important; + font-weight: bold; + margin-left: 16px; +} +.navbar .navbar-nav { + width: 100%; + justify-content: flex-end; +} +.navbar .navbar-nav .nav-item { + padding: 16px 32px; +} +.navbar .navbar-nav .nav-item a { + font-size: 15px; + flex-shrink: 0; +} +.navbar .img-more { + width: 22px; + height: 22px; +} +@media (max-width: 992px) { + .navbar { + padding: 30px 30px 0 30px !important; + } + .navbar .navbar-brand .user-avatar { + width: 31px; + height: 31px; + border-radius: 50%; + } + .navbar .navbar-brand .site-name { + font-size: 21px !important; + font-weight: bold; + } + .navbar .nav-item { + padding: 16px 32px; + } + .navbar .nav-item:first-child { + margin-top: 35px; + } +} +.post-list-container { + display: flex; + flex-direction: column; + align-items: center; +} +.post-list-container .post-inner { + min-width: 1000px; + max-width: 1000px; +} +.post-list-container .post-inner .post { + margin: 30px; + border-radius: 4px; + padding: 28px; + display: flex; + flex-direction: row; + justify-content: space-between; + align-items: center; + transition: all 0.3s; +} +.post-list-container .post-inner .post .post-left { + width: 100%; + display: flex; + flex-direction: column; +} +.post-list-container .post-inner .post .post-left .sticky-top-flag { + color: white; + padding: 3px 10px; + font-size: 12px; + border-radius: 3px; + margin-right: 10px; + vertical-align: middle; +} +.post-list-container .post-inner .post .post-left .post-title { + font-size: 22px; + font-weight: normal; + vertical-align: middle; +} +.post-list-container .post-inner .post .post-left .post-abstract { + width: 100%; + margin-top: 20px; + line-height: 1.5; +} +.post-list-container .post-inner .post .post-left .post-abstract * { + font-size: 13px; + margin-bottom: 0; +} +.post-list-container .post-inner .post .post-left .post-info { + margin-top: 20px; +} +.post-list-container .post-inner .post .post-left .post-info .post-time { + font-size: 12px; +} +.post-list-container .post-inner .post .post-left .post-info .post-tag { + font-size: 12px; + margin-left: 10px; +} +.post-list-container .post-inner .post:hover { + transform: scale(1.012); +} +.post-list-container .post-inner .post .post-feature-image { + width: 200px; + height: 100px; + flex-basis: 200px; + flex-shrink: 0; + margin-left: 20px; + border-radius: 2px; + overflow: hidden; + background-size: cover; + background-position: center; +} +.pagination-container { + padding: 24px 32px 32px; + align-self: center; +} +.pagination-container .prev-page { + margin: 0 16px; + font-size: 14px; +} +.pagination-container .next-page { + margin: 0 16px; + font-size: 14px; +} +@media (max-width: 992px) { + .post-list-container .post-inner { + min-width: 0; + width: 100%; + margin-top: 16px; + } + .post-list-container .post-inner .post { + margin: 12px 16px 12px 16px; + padding: 18px 22px 18px 22px; + } + .post-list-container .post-inner .post .post-left .post-title { + font-size: 17px; + font-weight: bold; + } + .post-list-container .post-inner .post .post-left .post-abstract { + margin-top: 10px; + } + .post-list-container .post-inner .post .post-left .post-info { + margin-top: 10px; + } + .post-list-container .post-inner .post .post-left .post-info .post-time { + font-size: 12px; + } + .post-list-container .post-inner .post .post-left .post-info .post-tag { + font-size: 12px; + margin-left: 10px; + } + .post-list-container .post-inner .post .post-feature-image { + width: 0; + height: 0; + flex-basis: 0; + flex-shrink: 0; + margin-left: 0; + border-radius: 2px; + overflow: hidden; + background-size: cover; + background-position: center; + } +} +.post-container { + display: flex; + flex-direction: column; + align-items: center; + min-height: 100%; + flex: 1; +} +.post-container .post-detail { + flex: 1; + padding: 24px 32px; + width: 1000px; + border-radius: 4px; +} +.post-container .post-detail .post-title { + font-size: 26px; + text-align: center; + padding: 24px; + font-weight: normal; +} +.post-container .post-detail .post-info { + text-align: center; + font-size: 12px; + padding-bottom: 24px; +} +.post-container .post-detail .post-info .post-tag { + padding: 8px 16px; +} +.post-container .post-detail .post-content { + margin-top: 30px; +} +.next-post { + text-align: center; + padding: 24px 32px; +} +.next-post .next { + margin-bottom: 24px; + font-size: 14px; +} +.next-post .post-title { + font-size: 20px; + font-weight: bold; +} +#gitalk-container, +#disqus_thread { + padding: 24px 32px; + width: 80%; + max-width: 1000px; +} +@media (max-width: 992px) { + .post-container .post-detail { + width: 100%; + margin-top: 20px; + } + .post-container .post-detail .post-title { + font-size: 20px; + font-weight: bold; + } + #gitalk-container, + #disqus_thread { + padding: 24px 32px; + width: 100%; + } +} +.archives-container { + padding: 32px; + display: flex; + flex-direction: column; +} +.archives-container .year { + font-size: 34px; + font-weight: bold; + margin-top: 16px; + margin-bottom: 16px; + align-self: start; +} +.archives-container .post { + float: left; + padding: 16px 0; +} +.archives-container .post .post-title { + float: left; + font-size: 16px; +} +.archives-container .post .post-title small { + float: left; + font-size: 80%; +} +@media (max-width: 600px) { + .archives-container { + padding: 16px; + } +} +.tags-container { + padding: 32px 32px; + flex: 1; + display: flex; + flex-direction: row; + justify-content: center; + align-items: center; + flex-wrap: wrap; +} +.tags-container .tag { + font-size: 15px; + margin: 5px 15px; +} +.current-tag-container .title { + text-align: center; + font-size: 18px; + margin-bottom: 24px; +} +@media (max-width: 992px) { + .current-tag-container .title { + margin-top: 50px; + } +} +.about-page { + padding: 24px 32px; +} +.site-footer { + font-size: 12px; + text-align: center; + padding: 24px; +} +.site-footer .slogan { + padding-bottom: 16px; +} +.site-footer .social-container { + padding-bottom: 16px; +} +.site-footer .social-container i { + padding-left: 10px; + padding-right: 10px; + font-size: 20px; +} +.site-footer .footer-info { + padding-bottom: 10px; +} +.friend-box { + float: left; + max-width: calc(50% - 20px); + min-width: calc(50% - 20px); + margin: 15px 10px; + background-color: rgba(20, 153, 196, 0.125); + padding: 15px; + border-radius: 15px; +} +.friend-box img.friend-avatar { + width: 70px; + height: 70px; + border-radius: 50% !important; + float: left; + margin: 0 15px 0 0 !important; +} +.friend-box .flink-info { + height: 70px; + overflow: hidden; + line-height: 24px; + padding-left: 30px; + font-size: 14px; +} +.friend-box .flink-info a { + font-size: 18px; + background: linear-gradient(180deg, transparent 75%, rgba(116, 192, 252, 0.4) 0); + margin-bottom: 10px; +} +.friend-box .flink-info .flink-info-desc { + margin-top: 10px; +} +@media (max-width: 993px) { + .friend-box { + max-width: 90% !important; + } +} +@media (max-width: 465px) { + .flink-info-desc { + display: none; + } +} +#gridea-search-form .search-input { + position: relative; + left: -2px; + width: 180px; + height: 30px; + padding: 0 0 2px 35px; + font-size: 12px; + background-size: 20px; + border: 0; + border-radius: 15px; + border-bottom-color: currentcolor; + border-bottom-style: none; + border-bottom-width: medium; + outline: 0; + border-bottom: 2px #495057; + transition: border-color 0.2s; +} +@media (max-width: 992px) { + #gridea-search-form .fa-search { + visibility: hidden; + } +} +.searching, +.no-result { + text-align: center; +} +/* + +Orginal Style from ethanschoonover.com/solarized (c) Jeremy Hull + +*/ +.hljs { + display: block; + overflow-x: auto; + padding: 0.5em; + background: #002b36; + color: #839496; +} +.hljs-comment, +.hljs-quote { + color: #586e75; +} +/* Solarized Green */ +.hljs-keyword, +.hljs-selector-tag, +.hljs-addition { + color: #859900; +} +/* Solarized Cyan */ +.hljs-number, +.hljs-string, +.hljs-meta .hljs-meta-string, +.hljs-literal, +.hljs-doctag, +.hljs-regexp { + color: #2aa198; +} +/* Solarized Blue */ +.hljs-title, +.hljs-section, +.hljs-name, +.hljs-selector-id, +.hljs-selector-class { + color: #268bd2; +} +/* Solarized Yellow */ +.hljs-attribute, +.hljs-attr, +.hljs-variable, +.hljs-template-variable, +.hljs-class .hljs-title, +.hljs-type { + color: #b58900; +} +/* Solarized Orange */ +.hljs-symbol, +.hljs-bullet, +.hljs-subst, +.hljs-meta, +.hljs-meta .hljs-keyword, +.hljs-selector-attr, +.hljs-selector-pseudo, +.hljs-link { + color: #cb4b16; +} +/* Solarized Red */ +.hljs-built_in, +.hljs-deletion { + color: #dc322f; +} +.hljs-formula { + background: #073642; +} +.hljs-emphasis { + font-style: italic; +} +.hljs-strong { + font-weight: bold; +} +/* 代码滑块 */ +pre::-webkit-scrollbar { + width: 8px; + height: 8px; +} +pre::-webkit-scrollbar-thumb { + border-radius: 4px; + background-color: #cbcbcb; +} +pre::-webkit-scrollbar-thumb:hover { + background-color: #bbb; +} +code::-webkit-scrollbar { + width: 8px; + height: 8px; +} +code::-webkit-scrollbar-thumb { + border-radius: 6px; + background-color: #cbcbcb; +} +code::-webkit-scrollbar-thumb:hover { + background-color: #bbb; +} +@font-face { + font-family: KaTeX_AMS; + src: url(fonts/KaTeX_AMS-Regular.eot); + src: url(fonts/KaTeX_AMS-Regular.eot#iefix) format('embedded-opentype'), url(fonts/KaTeX_AMS-Regular.woff2) format('woff2'), url(fonts/KaTeX_AMS-Regular.woff) format('woff'), url(fonts/KaTeX_AMS-Regular.ttf) format('ttf'); + font-weight: 400; + font-style: normal; +} +@font-face { + font-family: KaTeX_Caligraphic; + src: url(fonts/KaTeX_Caligraphic-Bold.eot); + src: url(fonts/KaTeX_Caligraphic-Bold.eot#iefix) format('embedded-opentype'), url(fonts/KaTeX_Caligraphic-Bold.woff2) format('woff2'), url(fonts/KaTeX_Caligraphic-Bold.woff) format('woff'), url(fonts/KaTeX_Caligraphic-Bold.ttf) format('ttf'); + font-weight: 700; + font-style: normal; +} +@font-face { + font-family: KaTeX_Caligraphic; + src: url(fonts/KaTeX_Caligraphic-Regular.eot); + src: url(fonts/KaTeX_Caligraphic-Regular.eot#iefix) format('embedded-opentype'), url(fonts/KaTeX_Caligraphic-Regular.woff2) format('woff2'), url(fonts/KaTeX_Caligraphic-Regular.woff) format('woff'), url(fonts/KaTeX_Caligraphic-Regular.ttf) format('ttf'); + font-weight: 400; + font-style: normal; +} +@font-face { + font-family: KaTeX_Fraktur; + src: url(fonts/KaTeX_Fraktur-Bold.eot); + src: url(fonts/KaTeX_Fraktur-Bold.eot#iefix) format('embedded-opentype'), url(fonts/KaTeX_Fraktur-Bold.woff2) format('woff2'), url(fonts/KaTeX_Fraktur-Bold.woff) format('woff'), url(fonts/KaTeX_Fraktur-Bold.ttf) format('ttf'); + font-weight: 700; + font-style: normal; +} +@font-face { + font-family: KaTeX_Fraktur; + src: url(fonts/KaTeX_Fraktur-Regular.eot); + src: url(fonts/KaTeX_Fraktur-Regular.eot#iefix) format('embedded-opentype'), url(fonts/KaTeX_Fraktur-Regular.woff2) format('woff2'), url(fonts/KaTeX_Fraktur-Regular.woff) format('woff'), url(fonts/KaTeX_Fraktur-Regular.ttf) format('ttf'); + font-weight: 400; + font-style: normal; +} +@font-face { + font-family: KaTeX_Main; + src: url(fonts/KaTeX_Main-Bold.eot); + src: url(fonts/KaTeX_Main-Bold.eot#iefix) format('embedded-opentype'), url(fonts/KaTeX_Main-Bold.woff2) format('woff2'), url(fonts/KaTeX_Main-Bold.woff) format('woff'), url(fonts/KaTeX_Main-Bold.ttf) format('ttf'); + font-weight: 700; + font-style: normal; +} +@font-face { + font-family: KaTeX_Main; + src: url(fonts/KaTeX_Main-Italic.eot); + src: url(fonts/KaTeX_Main-Italic.eot#iefix) format('embedded-opentype'), url(fonts/KaTeX_Main-Italic.woff2) format('woff2'), url(fonts/KaTeX_Main-Italic.woff) format('woff'), url(fonts/KaTeX_Main-Italic.ttf) format('ttf'); + font-weight: 400; + font-style: italic; +} +@font-face { + font-family: KaTeX_Main; + src: url(fonts/KaTeX_Main-Regular.eot); + src: url(fonts/KaTeX_Main-Regular.eot#iefix) format('embedded-opentype'), url(fonts/KaTeX_Main-Regular.woff2) format('woff2'), url(fonts/KaTeX_Main-Regular.woff) format('woff'), url(fonts/KaTeX_Main-Regular.ttf) format('ttf'); + font-weight: 400; + font-style: normal; +} +@font-face { + font-family: KaTeX_Math; + src: url(fonts/KaTeX_Math-Italic.eot); + src: url(fonts/KaTeX_Math-Italic.eot#iefix) format('embedded-opentype'), url(fonts/KaTeX_Math-Italic.woff2) format('woff2'), url(fonts/KaTeX_Math-Italic.woff) format('woff'), url(fonts/KaTeX_Math-Italic.ttf) format('ttf'); + font-weight: 400; + font-style: italic; +} +@font-face { + font-family: KaTeX_SansSerif; + src: url(fonts/KaTeX_SansSerif-Regular.eot); + src: url(fonts/KaTeX_SansSerif-Regular.eot#iefix) format('embedded-opentype'), url(fonts/KaTeX_SansSerif-Regular.woff2) format('woff2'), url(fonts/KaTeX_SansSerif-Regular.woff) format('woff'), url(fonts/KaTeX_SansSerif-Regular.ttf) format('ttf'); + font-weight: 400; + font-style: normal; +} +@font-face { + font-family: KaTeX_Script; + src: url(fonts/KaTeX_Script-Regular.eot); + src: url(fonts/KaTeX_Script-Regular.eot#iefix) format('embedded-opentype'), url(fonts/KaTeX_Script-Regular.woff2) format('woff2'), url(fonts/KaTeX_Script-Regular.woff) format('woff'), url(fonts/KaTeX_Script-Regular.ttf) format('ttf'); + font-weight: 400; + font-style: normal; +} +@font-face { + font-family: KaTeX_Size1; + src: url(fonts/KaTeX_Size1-Regular.eot); + src: url(fonts/KaTeX_Size1-Regular.eot#iefix) format('embedded-opentype'), url(fonts/KaTeX_Size1-Regular.woff2) format('woff2'), url(fonts/KaTeX_Size1-Regular.woff) format('woff'), url(fonts/KaTeX_Size1-Regular.ttf) format('ttf'); + font-weight: 400; + font-style: normal; +} +@font-face { + font-family: KaTeX_Size2; + src: url(fonts/KaTeX_Size2-Regular.eot); + src: url(fonts/KaTeX_Size2-Regular.eot#iefix) format('embedded-opentype'), url(fonts/KaTeX_Size2-Regular.woff2) format('woff2'), url(fonts/KaTeX_Size2-Regular.woff) format('woff'), url(fonts/KaTeX_Size2-Regular.ttf) format('ttf'); + font-weight: 400; + font-style: normal; +} +@font-face { + font-family: KaTeX_Size3; + src: url(fonts/KaTeX_Size3-Regular.eot); + src: url(fonts/KaTeX_Size3-Regular.eot#iefix) format('embedded-opentype'), url(fonts/KaTeX_Size3-Regular.woff2) format('woff2'), url(fonts/KaTeX_Size3-Regular.woff) format('woff'), url(fonts/KaTeX_Size3-Regular.ttf) format('ttf'); + font-weight: 400; + font-style: normal; +} +@font-face { + font-family: KaTeX_Size4; + src: url(fonts/KaTeX_Size4-Regular.eot); + src: url(fonts/KaTeX_Size4-Regular.eot#iefix) format('embedded-opentype'), url(fonts/KaTeX_Size4-Regular.woff2) format('woff2'), url(fonts/KaTeX_Size4-Regular.woff) format('woff'), url(fonts/KaTeX_Size4-Regular.ttf) format('ttf'); + font-weight: 400; + font-style: normal; +} +@font-face { + font-family: KaTeX_Typewriter; + src: url(fonts/KaTeX_Typewriter-Regular.eot); + src: url(fonts/KaTeX_Typewriter-Regular.eot#iefix) format('embedded-opentype'), url(fonts/KaTeX_Typewriter-Regular.woff2) format('woff2'), url(fonts/KaTeX_Typewriter-Regular.woff) format('woff'), url(fonts/KaTeX_Typewriter-Regular.ttf) format('ttf'); + font-weight: 400; + font-style: normal; +} +.katex-display { + display: block; + margin: 1em 0; + text-align: center; +} +.katex-display > .katex { + display: inline-block; +} +.katex { + font: 400 1.21em KaTeX_Main; + line-height: 1.2; + white-space: nowrap; + text-indent: 0; +} +.katex .katex-html { + display: inline-block; +} +.katex .katex-mathml { + position: absolute; + clip: rect(1px, 1px, 1px, 1px); + padding: 0; + border: 0; + height: 1px; + width: 1px; + overflow: hidden; +} +.katex .base, +.katex .strut { + display: inline-block; +} +.katex .mathit { + font-family: KaTeX_Math; + font-style: italic; +} +.katex .mathbf { + font-family: KaTeX_Main; + font-weight: 700; +} +.katex .amsrm, +.katex .mathbb { + font-family: KaTeX_AMS; +} +.katex .mathcal { + font-family: KaTeX_Caligraphic; +} +.katex .mathfrak { + font-family: KaTeX_Fraktur; +} +.katex .mathtt { + font-family: KaTeX_Typewriter; +} +.katex .mathscr { + font-family: KaTeX_Script; +} +.katex .mathsf { + font-family: KaTeX_SansSerif; +} +.katex .mainit { + font-family: KaTeX_Main; + font-style: italic; +} +.katex .textstyle > .mord + .mop { + margin-left: 0.16667em; +} +.katex .textstyle > .mord + .mbin { + margin-left: 0.22222em; +} +.katex .textstyle > .mord + .mrel { + margin-left: 0.27778em; +} +.katex .textstyle > .mop + .mop, +.katex .textstyle > .mop + .mord, +.katex .textstyle > .mord + .minner { + margin-left: 0.16667em; +} +.katex .textstyle > .mop + .mrel { + margin-left: 0.27778em; +} +.katex .textstyle > .mop + .minner { + margin-left: 0.16667em; +} +.katex .textstyle > .mbin + .minner, +.katex .textstyle > .mbin + .mop, +.katex .textstyle > .mbin + .mopen, +.katex .textstyle > .mbin + .mord { + margin-left: 0.22222em; +} +.katex .textstyle > .mrel + .minner, +.katex .textstyle > .mrel + .mop, +.katex .textstyle > .mrel + .mopen, +.katex .textstyle > .mrel + .mord { + margin-left: 0.27778em; +} +.katex .textstyle > .mclose + .mop { + margin-left: 0.16667em; +} +.katex .textstyle > .mclose + .mbin { + margin-left: 0.22222em; +} +.katex .textstyle > .mclose + .mrel { + margin-left: 0.27778em; +} +.katex .textstyle > .mclose + .minner, +.katex .textstyle > .minner + .mop, +.katex .textstyle > .minner + .mord, +.katex .textstyle > .mpunct + .mclose, +.katex .textstyle > .mpunct + .minner, +.katex .textstyle > .mpunct + .mop, +.katex .textstyle > .mpunct + .mopen, +.katex .textstyle > .mpunct + .mord, +.katex .textstyle > .mpunct + .mpunct, +.katex .textstyle > .mpunct + .mrel { + margin-left: 0.16667em; +} +.katex .textstyle > .minner + .mbin { + margin-left: 0.22222em; +} +.katex .textstyle > .minner + .mrel { + margin-left: 0.27778em; +} +.katex .mclose + .mop, +.katex .minner + .mop, +.katex .mop + .mop, +.katex .mop + .mord, +.katex .mord + .mop, +.katex .textstyle > .minner + .minner, +.katex .textstyle > .minner + .mopen, +.katex .textstyle > .minner + .mpunct { + margin-left: 0.16667em; +} +.katex .reset-textstyle.textstyle { + font-size: 1em; +} +.katex .reset-textstyle.scriptstyle { + font-size: 0.7em; +} +.katex .reset-textstyle.scriptscriptstyle { + font-size: 0.5em; +} +.katex .reset-scriptstyle.textstyle { + font-size: 1.42857em; +} +.katex .reset-scriptstyle.scriptstyle { + font-size: 1em; +} +.katex .reset-scriptstyle.scriptscriptstyle { + font-size: 0.71429em; +} +.katex .reset-scriptscriptstyle.textstyle { + font-size: 2em; +} +.katex .reset-scriptscriptstyle.scriptstyle { + font-size: 1.4em; +} +.katex .reset-scriptscriptstyle.scriptscriptstyle { + font-size: 1em; +} +.katex .style-wrap { + position: relative; +} +.katex .vlist { + display: inline-block; +} +.katex .vlist > span { + display: block; + height: 0; + position: relative; +} +.katex .vlist > span > span { + display: inline-block; +} +.katex .vlist .baseline-fix { + display: inline-table; + table-layout: fixed; +} +.katex .msupsub { + text-align: left; +} +.katex .mfrac > span > span { + text-align: center; +} +.katex .mfrac .frac-line { + width: 100%; +} +.katex .mfrac .frac-line:before { + border-bottom-style: solid; + border-bottom-width: 1px; + content: ""; + display: block; +} +.katex .mfrac .frac-line:after { + border-bottom-style: solid; + border-bottom-width: 0.04em; + content: ""; + display: block; + margin-top: -1px; +} +.katex .mspace { + display: inline-block; +} +.katex .mspace.negativethinspace { + margin-left: -0.16667em; +} +.katex .mspace.thinspace { + width: 0.16667em; +} +.katex .mspace.mediumspace { + width: 0.22222em; +} +.katex .mspace.thickspace { + width: 0.27778em; +} +.katex .mspace.enspace { + width: 0.5em; +} +.katex .mspace.quad { + width: 1em; +} +.katex .mspace.qquad { + width: 2em; +} +.katex .llap, +.katex .rlap { + width: 0; + position: relative; +} +.katex .llap > .inner, +.katex .rlap > .inner { + position: absolute; +} +.katex .llap > .fix, +.katex .rlap > .fix { + display: inline-block; +} +.katex .llap > .inner { + right: 0; +} +.katex .rlap > .inner { + left: 0; +} +.katex .katex-logo .a { + font-size: 0.75em; + margin-left: -0.32em; + position: relative; + top: -0.2em; +} +.katex .katex-logo .t { + margin-left: -0.23em; +} +.katex .katex-logo .e { + margin-left: -0.1667em; + position: relative; + top: 0.2155em; +} +.katex .katex-logo .x { + margin-left: -0.125em; +} +.katex .rule { + display: inline-block; + border-style: solid; + position: relative; +} +.katex .overline .overline-line { + width: 100%; +} +.katex .overline .overline-line:before { + border-bottom-style: solid; + border-bottom-width: 1px; + content: ""; + display: block; +} +.katex .overline .overline-line:after { + border-bottom-style: solid; + border-bottom-width: 0.04em; + content: ""; + display: block; + margin-top: -1px; +} +.katex .sqrt > .sqrt-sign { + position: relative; +} +.katex .sqrt .sqrt-line { + width: 100%; +} +.katex .sqrt .sqrt-line:before { + border-bottom-style: solid; + border-bottom-width: 1px; + content: ""; + display: block; +} +.katex .sqrt .sqrt-line:after { + border-bottom-style: solid; + border-bottom-width: 0.04em; + content: ""; + display: block; + margin-top: -1px; +} +.katex .sqrt > .root { + margin-left: 0.27777778em; + margin-right: -0.55555556em; +} +.katex .fontsize-ensurer, +.katex .sizing { + display: inline-block; +} +.katex .fontsize-ensurer.reset-size1.size1, +.katex .sizing.reset-size1.size1 { + font-size: 1em; +} +.katex .fontsize-ensurer.reset-size1.size2, +.katex .sizing.reset-size1.size2 { + font-size: 1.4em; +} +.katex .fontsize-ensurer.reset-size1.size3, +.katex .sizing.reset-size1.size3 { + font-size: 1.6em; +} +.katex .fontsize-ensurer.reset-size1.size4, +.katex .sizing.reset-size1.size4 { + font-size: 1.8em; +} +.katex .fontsize-ensurer.reset-size1.size5, +.katex .sizing.reset-size1.size5 { + font-size: 2em; +} +.katex .fontsize-ensurer.reset-size1.size6, +.katex .sizing.reset-size1.size6 { + font-size: 2.4em; +} +.katex .fontsize-ensurer.reset-size1.size7, +.katex .sizing.reset-size1.size7 { + font-size: 2.88em; +} +.katex .fontsize-ensurer.reset-size1.size8, +.katex .sizing.reset-size1.size8 { + font-size: 3.46em; +} +.katex .fontsize-ensurer.reset-size1.size9, +.katex .sizing.reset-size1.size9 { + font-size: 4.14em; +} +.katex .fontsize-ensurer.reset-size1.size10, +.katex .sizing.reset-size1.size10 { + font-size: 4.98em; +} +.katex .fontsize-ensurer.reset-size2.size1, +.katex .sizing.reset-size2.size1 { + font-size: 0.71428571em; +} +.katex .fontsize-ensurer.reset-size2.size2, +.katex .sizing.reset-size2.size2 { + font-size: 1em; +} +.katex .fontsize-ensurer.reset-size2.size3, +.katex .sizing.reset-size2.size3 { + font-size: 1.14285714em; +} +.katex .fontsize-ensurer.reset-size2.size4, +.katex .sizing.reset-size2.size4 { + font-size: 1.28571429em; +} +.katex .fontsize-ensurer.reset-size2.size5, +.katex .sizing.reset-size2.size5 { + font-size: 1.42857143em; +} +.katex .fontsize-ensurer.reset-size2.size6, +.katex .sizing.reset-size2.size6 { + font-size: 1.71428571em; +} +.katex .fontsize-ensurer.reset-size2.size7, +.katex .sizing.reset-size2.size7 { + font-size: 2.05714286em; +} +.katex .fontsize-ensurer.reset-size2.size8, +.katex .sizing.reset-size2.size8 { + font-size: 2.47142857em; +} +.katex .fontsize-ensurer.reset-size2.size9, +.katex .sizing.reset-size2.size9 { + font-size: 2.95714286em; +} +.katex .fontsize-ensurer.reset-size2.size10, +.katex .sizing.reset-size2.size10 { + font-size: 3.55714286em; +} +.katex .fontsize-ensurer.reset-size3.size1, +.katex .sizing.reset-size3.size1 { + font-size: 0.625em; +} +.katex .fontsize-ensurer.reset-size3.size2, +.katex .sizing.reset-size3.size2 { + font-size: 0.875em; +} +.katex .fontsize-ensurer.reset-size3.size3, +.katex .sizing.reset-size3.size3 { + font-size: 1em; +} +.katex .fontsize-ensurer.reset-size3.size4, +.katex .sizing.reset-size3.size4 { + font-size: 1.125em; +} +.katex .fontsize-ensurer.reset-size3.size5, +.katex .sizing.reset-size3.size5 { + font-size: 1.25em; +} +.katex .fontsize-ensurer.reset-size3.size6, +.katex .sizing.reset-size3.size6 { + font-size: 1.5em; +} +.katex .fontsize-ensurer.reset-size3.size7, +.katex .sizing.reset-size3.size7 { + font-size: 1.8em; +} +.katex .fontsize-ensurer.reset-size3.size8, +.katex .sizing.reset-size3.size8 { + font-size: 2.1625em; +} +.katex .fontsize-ensurer.reset-size3.size9, +.katex .sizing.reset-size3.size9 { + font-size: 2.5875em; +} +.katex .fontsize-ensurer.reset-size3.size10, +.katex .sizing.reset-size3.size10 { + font-size: 3.1125em; +} +.katex .fontsize-ensurer.reset-size4.size1, +.katex .sizing.reset-size4.size1 { + font-size: 0.55555556em; +} +.katex .fontsize-ensurer.reset-size4.size2, +.katex .sizing.reset-size4.size2 { + font-size: 0.77777778em; +} +.katex .fontsize-ensurer.reset-size4.size3, +.katex .sizing.reset-size4.size3 { + font-size: 0.88888889em; +} +.katex .fontsize-ensurer.reset-size4.size4, +.katex .sizing.reset-size4.size4 { + font-size: 1em; +} +.katex .fontsize-ensurer.reset-size4.size5, +.katex .sizing.reset-size4.size5 { + font-size: 1.11111111em; +} +.katex .fontsize-ensurer.reset-size4.size6, +.katex .sizing.reset-size4.size6 { + font-size: 1.33333333em; +} +.katex .fontsize-ensurer.reset-size4.size7, +.katex .sizing.reset-size4.size7 { + font-size: 1.6em; +} +.katex .fontsize-ensurer.reset-size4.size8, +.katex .sizing.reset-size4.size8 { + font-size: 1.92222222em; +} +.katex .fontsize-ensurer.reset-size4.size9, +.katex .sizing.reset-size4.size9 { + font-size: 2.3em; +} +.katex .fontsize-ensurer.reset-size4.size10, +.katex .sizing.reset-size4.size10 { + font-size: 2.76666667em; +} +.katex .fontsize-ensurer.reset-size5.size1, +.katex .sizing.reset-size5.size1 { + font-size: 0.5em; +} +.katex .fontsize-ensurer.reset-size5.size2, +.katex .sizing.reset-size5.size2 { + font-size: 0.7em; +} +.katex .fontsize-ensurer.reset-size5.size3, +.katex .sizing.reset-size5.size3 { + font-size: 0.8em; +} +.katex .fontsize-ensurer.reset-size5.size4, +.katex .sizing.reset-size5.size4 { + font-size: 0.9em; +} +.katex .fontsize-ensurer.reset-size5.size5, +.katex .sizing.reset-size5.size5 { + font-size: 1em; +} +.katex .fontsize-ensurer.reset-size5.size6, +.katex .sizing.reset-size5.size6 { + font-size: 1.2em; +} +.katex .fontsize-ensurer.reset-size5.size7, +.katex .sizing.reset-size5.size7 { + font-size: 1.44em; +} +.katex .fontsize-ensurer.reset-size5.size8, +.katex .sizing.reset-size5.size8 { + font-size: 1.73em; +} +.katex .fontsize-ensurer.reset-size5.size9, +.katex .sizing.reset-size5.size9 { + font-size: 2.07em; +} +.katex .fontsize-ensurer.reset-size5.size10, +.katex .sizing.reset-size5.size10 { + font-size: 2.49em; +} +.katex .fontsize-ensurer.reset-size6.size1, +.katex .sizing.reset-size6.size1 { + font-size: 0.41666667em; +} +.katex .fontsize-ensurer.reset-size6.size2, +.katex .sizing.reset-size6.size2 { + font-size: 0.58333333em; +} +.katex .fontsize-ensurer.reset-size6.size3, +.katex .sizing.reset-size6.size3 { + font-size: 0.66666667em; +} +.katex .fontsize-ensurer.reset-size6.size4, +.katex .sizing.reset-size6.size4 { + font-size: 0.75em; +} +.katex .fontsize-ensurer.reset-size6.size5, +.katex .sizing.reset-size6.size5 { + font-size: 0.83333333em; +} +.katex .fontsize-ensurer.reset-size6.size6, +.katex .sizing.reset-size6.size6 { + font-size: 1em; +} +.katex .fontsize-ensurer.reset-size6.size7, +.katex .sizing.reset-size6.size7 { + font-size: 1.2em; +} +.katex .fontsize-ensurer.reset-size6.size8, +.katex .sizing.reset-size6.size8 { + font-size: 1.44166667em; +} +.katex .fontsize-ensurer.reset-size6.size9, +.katex .sizing.reset-size6.size9 { + font-size: 1.725em; +} +.katex .fontsize-ensurer.reset-size6.size10, +.katex .sizing.reset-size6.size10 { + font-size: 2.075em; +} +.katex .fontsize-ensurer.reset-size7.size1, +.katex .sizing.reset-size7.size1 { + font-size: 0.34722222em; +} +.katex .fontsize-ensurer.reset-size7.size2, +.katex .sizing.reset-size7.size2 { + font-size: 0.48611111em; +} +.katex .fontsize-ensurer.reset-size7.size3, +.katex .sizing.reset-size7.size3 { + font-size: 0.55555556em; +} +.katex .fontsize-ensurer.reset-size7.size4, +.katex .sizing.reset-size7.size4 { + font-size: 0.625em; +} +.katex .fontsize-ensurer.reset-size7.size5, +.katex .sizing.reset-size7.size5 { + font-size: 0.69444444em; +} +.katex .fontsize-ensurer.reset-size7.size6, +.katex .sizing.reset-size7.size6 { + font-size: 0.83333333em; +} +.katex .fontsize-ensurer.reset-size7.size7, +.katex .sizing.reset-size7.size7 { + font-size: 1em; +} +.katex .fontsize-ensurer.reset-size7.size8, +.katex .sizing.reset-size7.size8 { + font-size: 1.20138889em; +} +.katex .fontsize-ensurer.reset-size7.size9, +.katex .sizing.reset-size7.size9 { + font-size: 1.4375em; +} +.katex .fontsize-ensurer.reset-size7.size10, +.katex .sizing.reset-size7.size10 { + font-size: 1.72916667em; +} +.katex .fontsize-ensurer.reset-size8.size1, +.katex .sizing.reset-size8.size1 { + font-size: 0.28901734em; +} +.katex .fontsize-ensurer.reset-size8.size2, +.katex .sizing.reset-size8.size2 { + font-size: 0.40462428em; +} +.katex .fontsize-ensurer.reset-size8.size3, +.katex .sizing.reset-size8.size3 { + font-size: 0.46242775em; +} +.katex .fontsize-ensurer.reset-size8.size4, +.katex .sizing.reset-size8.size4 { + font-size: 0.52023121em; +} +.katex .fontsize-ensurer.reset-size8.size5, +.katex .sizing.reset-size8.size5 { + font-size: 0.57803468em; +} +.katex .fontsize-ensurer.reset-size8.size6, +.katex .sizing.reset-size8.size6 { + font-size: 0.69364162em; +} +.katex .fontsize-ensurer.reset-size8.size7, +.katex .sizing.reset-size8.size7 { + font-size: 0.83236994em; +} +.katex .fontsize-ensurer.reset-size8.size8, +.katex .sizing.reset-size8.size8 { + font-size: 1em; +} +.katex .fontsize-ensurer.reset-size8.size9, +.katex .sizing.reset-size8.size9 { + font-size: 1.19653179em; +} +.katex .fontsize-ensurer.reset-size8.size10, +.katex .sizing.reset-size8.size10 { + font-size: 1.43930636em; +} +.katex .fontsize-ensurer.reset-size9.size1, +.katex .sizing.reset-size9.size1 { + font-size: 0.24154589em; +} +.katex .fontsize-ensurer.reset-size9.size2, +.katex .sizing.reset-size9.size2 { + font-size: 0.33816425em; +} +.katex .fontsize-ensurer.reset-size9.size3, +.katex .sizing.reset-size9.size3 { + font-size: 0.38647343em; +} +.katex .fontsize-ensurer.reset-size9.size4, +.katex .sizing.reset-size9.size4 { + font-size: 0.43478261em; +} +.katex .fontsize-ensurer.reset-size9.size5, +.katex .sizing.reset-size9.size5 { + font-size: 0.48309179em; +} +.katex .fontsize-ensurer.reset-size9.size6, +.katex .sizing.reset-size9.size6 { + font-size: 0.57971014em; +} +.katex .fontsize-ensurer.reset-size9.size7, +.katex .sizing.reset-size9.size7 { + font-size: 0.69565217em; +} +.katex .fontsize-ensurer.reset-size9.size8, +.katex .sizing.reset-size9.size8 { + font-size: 0.83574879em; +} +.katex .fontsize-ensurer.reset-size9.size9, +.katex .sizing.reset-size9.size9 { + font-size: 1em; +} +.katex .fontsize-ensurer.reset-size9.size10, +.katex .sizing.reset-size9.size10 { + font-size: 1.20289855em; +} +.katex .fontsize-ensurer.reset-size10.size1, +.katex .sizing.reset-size10.size1 { + font-size: 0.20080321em; +} +.katex .fontsize-ensurer.reset-size10.size2, +.katex .sizing.reset-size10.size2 { + font-size: 0.2811245em; +} +.katex .fontsize-ensurer.reset-size10.size3, +.katex .sizing.reset-size10.size3 { + font-size: 0.32128514em; +} +.katex .fontsize-ensurer.reset-size10.size4, +.katex .sizing.reset-size10.size4 { + font-size: 0.36144578em; +} +.katex .fontsize-ensurer.reset-size10.size5, +.katex .sizing.reset-size10.size5 { + font-size: 0.40160643em; +} +.katex .fontsize-ensurer.reset-size10.size6, +.katex .sizing.reset-size10.size6 { + font-size: 0.48192771em; +} +.katex .fontsize-ensurer.reset-size10.size7, +.katex .sizing.reset-size10.size7 { + font-size: 0.57831325em; +} +.katex .fontsize-ensurer.reset-size10.size8, +.katex .sizing.reset-size10.size8 { + font-size: 0.69477912em; +} +.katex .fontsize-ensurer.reset-size10.size9, +.katex .sizing.reset-size10.size9 { + font-size: 0.8313253em; +} +.katex .fontsize-ensurer.reset-size10.size10, +.katex .sizing.reset-size10.size10 { + font-size: 1em; +} +.katex .delimsizing.size1 { + font-family: KaTeX_Size1; +} +.katex .delimsizing.size2 { + font-family: KaTeX_Size2; +} +.katex .delimsizing.size3 { + font-family: KaTeX_Size3; +} +.katex .delimsizing.size4 { + font-family: KaTeX_Size4; +} +.katex .delimsizing.mult .delim-size1 > span { + font-family: KaTeX_Size1; +} +.katex .delimsizing.mult .delim-size4 > span { + font-family: KaTeX_Size4; +} +.katex .nulldelimiter { + display: inline-block; + width: 0.12em; +} +.katex .op-symbol { + position: relative; +} +.katex .op-symbol.small-op { + font-family: KaTeX_Size1; +} +.katex .op-symbol.large-op { + font-family: KaTeX_Size2; +} +.katex .accent > .vlist > span, +.katex .op-limits > .vlist > span { + text-align: center; +} +.katex .accent .accent-body > span { + width: 0; +} +.katex .accent .accent-body.accent-vec > span { + position: relative; + left: 0.326em; +} +.katex .mtable .vertical-separator { + display: inline-block; + margin: 0 -0.025em; + border-right: 0.05em solid #000; +} +.katex .mtable .arraycolsep { + display: inline-block; +} +.katex .mtable .col-align-c > .vlist { + text-align: center; +} +.katex .mtable .col-align-l > .vlist { + text-align: left; +} +.katex .mtable .col-align-r > .vlist { + text-align: right; +} + + .gt-bg-theme-color-first { + background: #f9f9f9!important; + } + + .gt-bg-theme-color-second { + background: #f3f3f3!important; + } + + .gt-bg-content-color-first { + background: #5e5e5e!important; + } + + .gt-bg-content-color-second { + background: #BFBFBF!important; + } + + .gt-bg-accent-color-first { + background: #8b959f!important; + } + + .gt-bg-accent-color-second { + background: RGBA(139,149,159,0.14)!important; + } + + .gt-c-theme-color-first { + color: #f9f9f9!important; + } + + .gt-c-theme-color-second { + color: #f3f3f3!important; + } + + .gt-c-content-color-first { + color: #5e5e5e!important; + } + + .gt-c-content-color-second { + color: #BFBFBF!important; + } + + .gt-c-accent-color-first { + color: #8b959f!important; + } + + .gt-c-accent-color-second { + color: RGBA(139,149,159,0.14)!important; + } + + body { + color: #5e5e5e!important; + } + + a { + color: #8b959f!important; + } + + .post-content h1 { + display: inline-block; + color: #5e5e5e!important; + position: relative!important; + background: linear-gradient(180deg, transparent 75%, RGBA(139,149,159,0.4) 0)!important; + } + + .post-content h2 { + display: inline-block; + color: #5e5e5e!important; + position: relative!important; + background: linear-gradient(180deg, transparent 75%, RGBA(139,149,159,0.4) 0)!important; + } + + .gt-a-link { + color: #5e5e5e!important; + position: relative!important; + background: linear-gradient(180deg, transparent 75%, RGBA(139,149,159,0.4) 0)!important; + } + + .gt-post-content a { + color: #8b959f!important; + } + + .gt-post-content blockquote { + background: RGBA(139,149,159,0.14)!important; + border-color: #8b959f!important; + } + + .gt-post-content code { + background: RGBA(139,149,159,0.14)!important; + } + + input::placeholder { + color: #BFBFBF!important; + } + + .search-input { + color: #5e5e5e!important; + background-color: #f3f3f3!important; + } + \ No newline at end of file diff --git a/docs/blog/tag/vuXWknrCE/index.html b/docs/blog/tag/vuXWknrCE/index.html new file mode 100644 index 0000000..5d2ec34 --- /dev/null +++ b/docs/blog/tag/vuXWknrCE/index.html @@ -0,0 +1,163 @@ + + + + + + +blog | HFish + + + + + + + + + + + + + + + + + + + + + + +
+
+ + +
+

+ #blog +

+
+
+
+ +
+
+ +
+ +
+ +
+ + + + +
+ +
+
+
+ + +
+ + + + + +
+
+ + diff --git a/docs/blog/tags/index.html b/docs/blog/tags/index.html new file mode 100644 index 0000000..92ee1af --- /dev/null +++ b/docs/blog/tags/index.html @@ -0,0 +1,130 @@ + + + + + + +HFish + + + + + + + + + + + + + + + + + + + + + + +
+
+ + +
+
+
+

标签

+
+ + #blog + +
+
+
+
+ + + + +
+
+ + diff --git a/docs/changelog.md b/docs/changelog.md new file mode 100644 index 0000000..9c8bfaf --- /dev/null +++ b/docs/changelog.md @@ -0,0 +1,11 @@ +- V2.5.0 2021-07-28 + +> 特别注意:只支持2.4.0及其以上的版本支持顺滑升级,其他版本需要重新进行部署安装。 + + 1.新增API配置功能,支持用户对攻击IP、攻击详细信息、攻击者所使用攻击账号密码导出。 + 2.新增TCP端口监听服务,支持最高对10个自定义端口的灵活监听。 + 3.新增蜜罐服务的支持,单个节点,最高可添加10种蜜罐服务。 + 4.新增windows开机自启动能力,防止意外关机导致的程序退出。 + 5.修复告警策略中,修改配置不生效的问题 。 + 6.修复数据清理时,扫描数据,攻击IP及账号资产未进行清理的问题。 + 7.修复部分使用交互问题。 diff --git a/docs/config.md b/docs/config.md deleted file mode 100644 index 77b8819..0000000 --- a/docs/config.md +++ /dev/null @@ -1,98 +0,0 @@ - - - - -# 控制端配置 - -### 配置工作总览 - -!> 在完成控制端的部署后,我们还需要几个配置工作让整个系统运行起来。 - -```wiki -1. 添加【蜜罐服务】,让系统获得相应蜜罐的能力。 -2. 创建【服务模板】,模板是数个蜜罐服务的集合,在大规模部署的环境中,模板可以帮我们更高效管理我们的集群。 -3. 【增加节点】,单机版自带一个节点,集群版不带节点。系统至少需要一个节点才能正常运行。 -4. 为蜜罐节点选择【服务模板】,选择了什么服务模板,蜜罐节点就具有了模板中的蜜罐能力。 -``` - - - -### 添加蜜罐服务 - -!> 控制端运行起来后,我们需要做的第一件事情就是下载蜜罐服务。您有2种方法可以添加蜜罐服务,任选一种即可。 - -> 【服务管理】中下载蜜罐服务 - -```wiki -1. 登陆控制端后,打开【服务管理】页面,首次登陆页面上蜜罐服务都是灰色。 -2. 选择自己需要的蜜罐服务进行下载。 -``` - -image-20210616164012531 - - - -> 手动上传蜜罐服务包 - -**当您处于离线环境不方便在线安装情况下,您可以使用手动上传安装的方式。** - -```wiki -1. 下载最新官方服务包 http://img.threatbook.cn/hfish/svc/services-<% version %>.tar.gz -2. 在新增服务页面上选择该服务包上传。 -``` - -image-20210616165214921 - - - -> *上传自定义web蜜罐 - -​ 如果您有自定义web蜜罐的需求,我们为您准备了开发样例,您可以参考我们的[文档](https://hfish.io/#/function?id=web%e8%9c%9c%e7%bd%90%e8%87%aa%e5%ae%9a%e4%b9%89%e5%bc%80%e5%8f%91)完成蜜罐的开发工作后,进行上传。 -​ 当然您也可以在社区中寻找其它用户开发好的蜜罐上传后使用。 - - - -### 创建模板 - -!> 蜜罐服务添加完成后,我们需要创建模板,把数个蜜罐服务自由组合成为模板。当前每个模板最多支持5个蜜罐服务。 - -image-20210616170816548 - - - -### 增加节点 - -!> 点击增加节点,选择相应版本的【节点安装包】,确定 - -image-20210616171459269 - -```wiki -- 如果您在上面的操作中,选择的是linux安装包,在【确定】后,会出现如下页面,您可以用两种方式让您的节点主机完成部署。 -1. 一句话脚本,直接在节点主机上运行 -2. 下载可执行文件,并把这个文件上传到节点主机上运行 - -- 如果您在上面的操作中,选择的windows安装包,在【确定】后,只有一种方式供您选择。 -1. 下载可执行文件,并把这个文件上传到节点主机上运行 -``` - -image-20210616172027825 - - - -### 为节点选择服务模板 - -> 展开蜜罐节点,选择上面创建的蜜罐模板 - -image-20210616173015062 - - - -> 刚变更模板后的蜜罐服务状态为【启用】 - -image-20210616173053947 - - - -> 节点正常完成模板加载后,服务状态应该为【在线】。如果是【离线】,说明蜜罐服务没有正常启动,请参考我们后面的【排错说明】,找到问题。 - -image-20210616173128526 \ No newline at end of file diff --git a/docs/deploy.md b/docs/deploy.md deleted file mode 100644 index 168f205..0000000 --- a/docs/deploy.md +++ /dev/null @@ -1,169 +0,0 @@ -# 控制端部署 - -## Linux安装说明 - -### 一键安装脚本 - -如果您部署的环境为Linux,且可以访问互联网。我们为您准备了一键部署脚本进行安装和配置,请用root用户,运行下面的脚本。 - -``` -bash <(curl -sS -L https://hfish.io/install) -``` - -![image-20210616163833456](http://img.threatbook.cn/hfish/20210616163834.png) - -> 安装并运行单机版 - -这种安装方式,在安装完成后,自动在控制端上创建一个节点,并同时把控制端进程和节点端进程启动。 - -```wiki -#控制端所在目录 -/opt/hfish/ - -#节点端所在目录 -/opt/hfish/client -``` - -> 安装并运行集群版 - -这种安装方式,会在安装完成后,启动控制端进程,需要我们后续完成添加节点的操作。 - -!> 控制端部署完成后,请继续参考下面的【控制端配置】完成配置 - - - -### 手动安装 - -!> 如果上述的安装脚本您无法使用,您可以尝试用手动安装完成部署。 - -到官网 https://hfish.io 下载HFish最新版本安装包,按如下步骤进行安装 (以linux64位系统为例): - -> 第一步: 在当前目录创建一个路径解压安装包 - -``` -mkdir hfish -``` - -> 第二步:将安装文件包解压到hfish目录下 - -``` -tar zxvf hfish-*-linux-amd64.tar.gz -C hfish -``` - -> 第三步:请防火墙开启4433或者4434,确认返回success(如果有其他服务需要打开端口,使用相同命令打开。 - -``` -firewall-cmd --add-port=4433/tcp --permanent -firewall-cmd --add-port=4434/tcp --permanent -firewall-cmd --reload -``` - -> 第四步:进入安装目录直接运行server,或者后台运行 nohup ./server & - -``` -cd hfish -nohup ./server & -``` - -> 第五步:登陆web界面 - -``` -登陆链接:https:// [ip]:4433/web -账号:admin -密码:HFish2021 -``` - -例:如果控制端的ip是192.168.1.1,登陆链接为:https://192.168.1.1:4433/web - -!> 控制端部署完成后,请继续参考下面的【控制端配置】完成配置 - - - -## Windows安装说明 - -> 第一步:下载HFish - -​ 访问我们官网的[下载页面](https://hfish.io/#/download),下载最新版的服务端并解压。 - -> 第二步:运行文件目录下的server.exe - -​ server.exe为后台运行,启动后直接后台运行。 - -> 第三步:登陆web界面 - -``` -登陆链接:https:// [ip]:4433/web -账号:admin -密码:HFish2021 -``` - -例:如果控制端的ip是192.168.1.1,登陆链接为:https://192.168.1.1:4433/web - -!> 控制端部署完成后,请继续参考下面的【控制端配置】完成配置 - - - -## Docker安装说明 - -Docker也是我们推荐的蜜罐交付方式。而且因为容器环境本身就有一层权限隔离的原因,合理配置过的Docker运行环境,能获得更高的业务安全性。 - -> Docker镜像的下载 - -```shell -docker pull registry.cn-beijing.aliyuncs.com/threatbook/hfish-amd64 -``` - -> 镜像的运行 - -```shell -docker run -d -p 4433:4433 -p 4434:4434 --name=hfish --restart=always registry.cn-beijing.aliyuncs.com/threatbook/hfish-amd64 -``` - -!> 控制端部署完成后,请继续参考下面的【控制端配置】完成配置 - - - -## 数据库切换MySQL - -HFish系统默认使用的sqlite数据库,具体见 db/hfish.db(自带的已经初始化好的db),相关的初始化脚本见 db/sql/sqlite/V<% version %>__sqlite.sql - -如果您想要重置 hfish.db, 可以通过下面命令生成新的 db 文件(请确保安装了sqlite3数据库)。 替换 db/hfish.db 即可。 - -``` -sqlite3 hfish.db < db/sql/sqlite/V<% version %>__sqlite.sql -``` - - - -**sqlite数据库无需安装,使用方便,但在遭到大规模攻击,及当前版本升级时候会存在数据丢失的问题。** - -因此,HFish同时**支持mysql**数据库,相关的初始化脚本见 db/sql/mysql/V<% version %>__mysql.sql。 - -如果您想要切换到mysql数据库,可以进行以下操作(请确认已经安装了mysql数据库,推荐5.7及以上版本) - -> 1. 初始化数据库 - -linux环境可以在命令行执行下述命令,然后输入密码(root用户密码)。 - -``` -mysql -u root -p < db/sql/mysql/V<% version %>__mysql.sql -``` - -windows环境可以使用远程连接工具(比如sqlyog等)导入db/sql/mysql/V<% version %>__mysql.sql 脚本。 - - - -> 2. 修改config.ini配置文件,数据库的连接方式,主要需要修改type和url,如下: - -``` -[database] -type = sqlite3 -max_open = 50 -max_idle = 50 -url = ./db/hfish.db?cache=shared&mode=rwc -# type = mysql -# url = root:HFish312@tcp(:3306)/hfish?charset=utf8&parseTime=true&loc=Local -``` - - - diff --git a/docs/docs/function/webdiy.md b/docs/docs/function/webdiy.md deleted file mode 100644 index 63da2e2..0000000 --- a/docs/docs/function/webdiy.md +++ /dev/null @@ -1,46 +0,0 @@ -### WEB蜜罐自定义开发 - -为了方便企业的定制业务,管理段提供了上传自定义web服务的内容,可根据微步在线的开发规范和原则,自己对web界面进行开发,修改,并上传,使其成为真正的蜜罐服务。 - -> 1.web蜜罐文件所在目录 - -```shell -- index.html -在节点client安装目录./services/service_id/root 下面 - -- 其它格式的文件 -在节点client安装目录./services/service_id/root下的所有目录都可以自行定义、上传文件,用户可以在不同目录下面上传自己的样式文件和图片。 -``` - -> 2.修改页面元素 - -根据index.html文件中的信息,替换和修改相关的文件。 - -> 3.制作全新的登陆页面 - -我们可以自己制作一个全新的登陆页面,通过替换表单元素实现“定制开发” - -```shell -- 删除client安装目录./services/service_id/root下所有文件后,自行上传编辑完成的html页面和相关文件 - -- 修改主页文件名为index.html - -- 按照下面图片的要求,修改表单元素。 -``` - -![蜜罐web页面表哥元素](https://hfish.cn-bj.ufileos.com/images/20210406150240.png) - - - -> 4.将修改完成的服务包进行上传,完成web服务添加 - -image-20210506162036933 - - - -image-20210506162100883 - - - -最后,如果您希望微步为您进行规范统一开发,请邮件发送给honeypot@threatbook.cn。 - diff --git a/docs/docs/index.html b/docs/docs/index.html deleted file mode 100644 index 65f4d07..0000000 --- a/docs/docs/index.html +++ /dev/null @@ -1,69 +0,0 @@ - - - - - - Document - - - - - - - - - - -
- - - - - - - - - - \ No newline at end of file diff --git a/docs/download.md b/docs/download.md index 3713f73..664174d 100755 --- a/docs/download.md +++ b/docs/download.md @@ -3,25 +3,28 @@ ### HFish v<% version %> ```wiki -2021年6月16日发布 +2021年7月25日发布 -1.新增扫描感知功能,可感知到全端口范围内的TCP、UDP、ICMP扫描,支持IPv4与IPv6。 -2.新增服务在线下载及上传功能,新版发布后,进入服务列表,即可看到最新的服务。 -3.新增多用户管理功能,支持管理员与普通用户的权限区分。 -4.修复节点多网卡导致的报错问题,每个节点最高支持50个不同ip地址。 -5.修复邮件服务器配置问题,填写发件邮箱进行邮件配置测试。 -6.修复情报页面api报错问题。 +特别注意:只支持2.4.0及其以上的版本支持顺滑升级,其他版本需要重新进行部署安装。 + +1.新增API配置功能,支持用户对攻击IP、攻击详细信息、攻击者所使用攻击账号密码导出。 +2.新增TCP端口监听服务,支持最高对10个自定义端口的灵活监听。 +3.新增蜜罐服务的支持,单个节点,最高可添加10种蜜罐服务。 +4.新增windows开机自启动能力,防止意外关机导致的程序退出。 +5.修复告警策略中,修改配置不生效的问题 。 +6.修复数据清理时,扫描数据,攻击IP及账号资产未进行清理的问题。 +7.修复部分使用交互问题。 ``` -!> 注意:如果当前使用 sqlite 数据库的话,升级时,hfish.db 文件将会被覆盖,导致之前的攻击记录丢失,请注意进行备份。如果要将之前的 db 文件导入当前版本时,请参考 mysql.sql 的语句修改 db 文件,执行导入。 + ## 下载安装 ### 控制端安装包 -- [HFish-Linux-amd64](http://hfish.cn-bj.ufileos.com/hfish-<% version %>-linux-amd64.tar.gz) 为 Linux x86 架构 64 位系统使用 -- [HFish-Windows-amd64](http://hfish.cn-bj.ufileos.com/hfish-<% version %>-windows-amd64.tar.gz) 为 Windows x86 架构 64 位系统使用 -- [HFish-Linux-arm64](http://hfish.cn-bj.ufileos.com/hfish-<% version %>-linux-arm64.tar.gz) 为 Linux Arm 架构 64 位系统使用,常见于 NAS、路由器、树莓派等…… +- [HFish-Linux-amd64](https://hfish.cn-bj.ufileos.com/hfish-<% version %>-linux-amd64.tar.gz) 为 Linux x86 架构 64 位系统使用 +- [HFish-Windows-amd64](https://hfish.cn-bj.ufileos.com/hfish-<% version %>-windows-amd64.tar.gz) 为 Windows x86 架构 64 位系统使用 +- [HFish-Linux-arm64](https://hfish.cn-bj.ufileos.com/hfish-2.5.0-linux-arm64.tar.gz) 为 Linux Arm 架构 64 位系统使用,常见于 NAS、路由器、树莓派等…… ## 文件结构 @@ -64,4 +67,4 @@ HFish └───web #控制台web文件 │ │ …… -``` +``` \ No newline at end of file diff --git a/docs/download/hfish-last-version b/docs/download/hfish-last-version new file mode 100644 index 0000000..4fa695e --- /dev/null +++ b/docs/download/hfish-last-version @@ -0,0 +1,15 @@ +{ + "version":"2.5.0", + "date":"2021-07-28", + "desc":[ + +​ "特别注意:只支持2.4.0及其以上的版本支持顺滑升级,其他版本需要重新进行部署安装。", + "1.新增API配置功能,支持用户对攻击IP、攻击详细信息、攻击者所使用攻击账号密码导出。", +​ "2.新增TCP端口监听服务,支持最高对10个自定义端口的灵活监听。", +​ "3.新增蜜罐服务的支持,单个节点,最高可添加10种蜜罐服务。", +​ "4.新增windows开机自启动能力,防止意外关机导致的程序退出。", +​ "5.修复告警策略中,修改配置不生效的问题 。", +​ "6.修复数据清理时,扫描数据,攻击IP及账号资产未进行清理的问题。", +​ "7.修复部分使用交互问题。" +​ ] +} \ No newline at end of file diff --git a/docs/download/hfish-test-version b/docs/download/hfish-test-version new file mode 100644 index 0000000..4fa695e --- /dev/null +++ b/docs/download/hfish-test-version @@ -0,0 +1,15 @@ +{ + "version":"2.5.0", + "date":"2021-07-28", + "desc":[ + +​ "特别注意:只支持2.4.0及其以上的版本支持顺滑升级,其他版本需要重新进行部署安装。", + "1.新增API配置功能,支持用户对攻击IP、攻击详细信息、攻击者所使用攻击账号密码导出。", +​ "2.新增TCP端口监听服务,支持最高对10个自定义端口的灵活监听。", +​ "3.新增蜜罐服务的支持,单个节点,最高可添加10种蜜罐服务。", +​ "4.新增windows开机自启动能力,防止意外关机导致的程序退出。", +​ "5.修复告警策略中,修改配置不生效的问题 。", +​ "6.修复数据清理时,扫描数据,攻击IP及账号资产未进行清理的问题。", +​ "7.修复部分使用交互问题。" +​ ] +} \ No newline at end of file diff --git a/docs/function.md b/docs/function.md deleted file mode 100644 index 6dfb5d0..0000000 --- a/docs/function.md +++ /dev/null @@ -1,114 +0,0 @@ -# 功能说明 - -### 账号资产 - -> 用户名密码页面收集了所有被用来攻击的账号密码,可以对企业账号资产有效监控 - -image-20210506152344041 - -> 为辅助企业进行内部账号监控,设定高级监测策略,建议输入企业的邮箱、员工姓名、企业名称等信息进行监控,从而随时监控泄漏情况 - -1.点击界面右上角查看高级监测策略 - -image-20210401150526485 - -2.按照规则要求,导入csv文件。 - -**注意!务必按照提示规则进行写入** - -image-20210506153037454 - -3.页面可查看到所有匹配高级监测策略的数据,从而帮助运维人员精准排查泄漏账号,实现企业账号资产安全防护。 - -image-20210506153041469 - -### 主机失陷检测 - -失陷蜜饵是部署在业务主机上的失陷检测蜜饵。在主机失陷情况下,通过部署虚假的账号、本地证书等失陷蜜饵,诱导攻击者转移攻击目标,并触发失陷告警。 - -其中,主机蜜饵是一种基于部署虚假的账号密码配置文件,诱导转移攻击者攻击目标的防御手段。 - -命令在主机运行后,会在本地生成一份虚假的“账号密码备份文件”。 当该主机被攻陷时,攻击者将被诱导,使用文件中的账号信息进行登录。借此,安全人员发现主机失陷情况。 - -image-20210506162347469 - - - -![image-20210506162447618](https://hfish.cn-bj.ufileos.com/images/image-20210506162447618.png) - - - -### 恶意IP - -> 恶意IP页面将监控所有攻击IP的相关信息,包括微步情报及企业自定义情报。 -> -> 另外,所有的溯源信息,最终都会呈现在恶意IP页面,并成为企业的私有情报库。 - - - -![image-20210506150145273](https://hfish.cn-bj.ufileos.com/images/image-20210506150145273.png) - -### 自定义蜜罐传输协议 - -针对Web应用仿真、网络设备服务、安全设备服务以及IOT服务,可以根据自身业务场景和网络情况,选择其具体的传输协议(HTTP或者HTTPS),从而让蜜罐更符合当前网络结构,更好吸引攻击者视线。 - -image-20210506155628363 - - - -### WEB蜜罐自定义开发 - - - -为了方便企业的定制业务,管理段提供了上传自定义web服务的内容,可根据微步在线的开发规范和原则,自己对web界面进行开发,修改,并上传,使其成为真正的蜜罐服务。 - -我们为大家准备了一个样例,请先下载我们的web模板样例。 - -http://threatbook-user-img.cn-bj.ufileos.com/hfish/svc/web-demo.zip - - - -> 1.web蜜罐文件所在目录 - -```shell -- index.html -在节点client安装目录./services/service_id/root 下面 - -- 其它格式的文件 -在节点client安装目录./services/service_id/root下的所有目录都可以自行定义、上传文件,用户可以在不同目录下面上传自己的样式文件和图片。 -``` - -> 2.修改页面元素 - -根据index.html文件中的信息,替换和修改相关的文件。 - -> 3.制作全新的登陆页面 - -我们可以自己制作一个全新的登陆页面,通过替换表单元素实现“定制开发” - -```shell -- 删除client安装目录./services/service_id/root下所有文件后,自行上传编辑完成的html页面和相关文件 - -- 修改主页文件名为index.html - -- 按照下面图片的要求,修改表单元素。 -``` - -![蜜罐web页面表哥元素](https://hfish.cn-bj.ufileos.com/images/20210406150240.png) - - - -> 4.将修改完成的服务包进行上传,完成web服务添加 - -image-20210506162036933 - - - -image-20210506162100883 - - - - - -最后,如果您希望微步为您进行规范统一开发,请邮件发送给honeypot@threatbook.cn。 - diff --git a/docs/index.html b/docs/index.html index 2444ea5..bf1effe 100644 --- a/docs/index.html +++ b/docs/index.html @@ -63,7 +63,7 @@ themeColor: '#e93636', dv: { model: { - version: '2.4.1', + version: '2.5.0', } }, search: { @@ -73,13 +73,22 @@ noData: '找不到结果!', depth: 2 }, + tabs: { + persist : true, // 刷新后是否同步状态 + sync : true, // 如果有多个选项卡是否同步变化 + theme : 'classic', // default + tabComments: true, // default + tabHeadings: true // default + } // repo: 'https://github.com/hacklcx/HFish', } - - - + + + + + \ No newline at end of file diff --git a/docs/install.sh b/docs/install.sh new file mode 100644 index 0000000..7beacbd --- /dev/null +++ b/docs/install.sh @@ -0,0 +1,128 @@ +#!/bin/bash + +#初始化 +initVar() { + installType='yum -y install' + removeType='yum -y remove' + upgrade="yum -y update" + echoType='echo -e' +} +initVar +export LANG=en_US.UTF-8 + +#字体颜色 +echoContent() { + case $1 in + # 红色 + "red") + # shellcheck disable=SC2154 + ${echoType} "\033[31m${printN}$2 \033[0m" + ;; + # 天蓝色 + "skyBlue") + ${echoType} "\033[1;36m${printN}$2 \033[0m" + ;; + # 绿色 + "green") + ${echoType} "\033[32m${printN}$2 \033[0m" + ;; + # 白色 + "white") + ${echoType} "\033[37m${printN}$2 \033[0m" + ;; + "magenta") + ${echoType} "\033[31m${printN}$2 \033[0m" + ;; + # 黄色 + "yellow") + ${echoType} "\033[33m${printN}$2 \033[0m" + ;; + esac +} + +cd /opt + +#首页菜单 +menu() { + echoContent red "\n==============================================================\n" + echoContent green "当前版本:v2.4.2" + echoContent green "HFish官网 https://hfish.io " + echoContent red "\n==============================================================\n" + echoContent skyBlue "-------------------------安装部署-----------------------------\n" + echoContent yellow "1.安装并运行HFish单机版" + echoContent yellow "2.安装并运行HFish集群版控制端" + echoContent yellow "3.退出安装" + # echoContent yellow "4.用Docker运行HFish控制端" + # echoContent skyBlue "\n-------------------------配置管理-----------------------------\n" + # echoContent yellow "5.防火墙放通控制端端口(coming soon)" + # echoContent yellow "6.将HFish添加为系统服务(coming soon)" + # echoContent yellow "7.将控制端数据库替换为MariaDB(coming soon)" + # echoContent skyBlue "\n-------------------------运维管理-----------------------------\n" + # echoContent yellow "8.将错误日志反馈给开发者(coming soon)" + # echoContent yellow "9.卸载HFish(coming soon)" + echoContent red "\n==============================================================" + + read -r -p "请选择:" selectMenuType + case ${selectMenuType} in + 1): + standaloneInstall + ;; + 2): + serverInstall + ;; + 3) + exitInstall + ;; + *) + echoContent red ' ---> 选择错误,重新选择' + selectMenuType + ;; + esac +} + +standaloneInstall(){ + if [ $(uname -s) = 'Linux' ] && [ $(uname -m) = 'x86_64' ] && [ $(getconf LONG_BIT) = '64' ]; then + wget -N --no-check-certificate http://hfish.cn-bj.ufileos.com/hfish-standalone-2.4.2-linux-amd64.tar.gz + elif [ $(uname -m) = 'aarch64' ] && [ $(getconf LONG_BIT) = '64' ]; then + wget -N --no-check-certificate http://hfish.cn-bj.ufileos.com/hfish-standalone-2.4.2-linux-arm64.tar.gz + else + echoContent red "未检测到系统版本,请参阅 https://hfish.io 官网文档手动安装!\n" && exit 1 + fi + + tar -zxvf hfish-standalone*.tar.gz + cd /opt/hfish && nohup ./server & + sleep 2 + cd /opt/hfish/client && nohup ./client & +} + +serverInstall() { + if [ $(uname -s) = 'Linux' ] && [ $(uname -m) = 'x86_64' ] && [ $(getconf LONG_BIT) = '64' ]; then + wget -N --no-check-certificate http://hfish.cn-bj.ufileos.com/hfish-2.4.2-linux-amd64.tar.gz + elif [ $(uname -m) = 'aarch64' ] && [ $(getconf LONG_BIT) = '64' ]; then + wget -N --no-check-certificate http://hfish.cn-bj.ufileos.com/hfish-2.4.2-linux-arm64.tar.gz + else + echoContent red "未检测到系统版本,请参阅 https://hfish.io 官网文档手动安装!\n" && exit 1 + fi + + mkdir -p hfish + tar -zxvf hfish*.tar.gz -C hfish + cd hfish + nohup ./server & +} + +exitInstall() { + exit 1 +} + +# selectServiceInstall() { +# if [ -d "/opt/hfish/packages" ]; then +# cd /opt/hfish/packages +# wget http://img.threatbook.cn/hfish/svc/services-2.4.0.tar.gz +# tar zxvf services*.tar.gz +# rm -f services-2.4.0.tar.gz +# else +# echoContent red "未检测到安装目录,请参阅 https://hfish.io 官网文档手动安装!\n" && exit 1 +# fi +# } + +menu \ No newline at end of file diff --git a/docs/known.md b/docs/known.md new file mode 100644 index 0000000..4f50119 --- /dev/null +++ b/docs/known.md @@ -0,0 +1,3 @@ +- 待更新 + +…… diff --git a/docs/setting.md b/docs/setting.md deleted file mode 100644 index a0b5ee5..0000000 --- a/docs/setting.md +++ /dev/null @@ -1,100 +0,0 @@ -# 服务端配置 - -### 告警策略 - - - -> 添加一个新的策略 - -![image-20210318173355287](https://hfish.cn-bj.ufileos.com/images/2021-03-18-093357.png) - - - -> 对策略进行配置 - -![image-20210209202737224](https://qiniu.cuiqingcai.com/2021-03-18-090743.png) - - - -> 通知当前分为威胁告警和系统通知两种类型 - -威胁告警是系统感知攻击时的告警;系统通知是系统自身运行状态的告警。 - - - -> 在设置通知方式前,您应该先完成了前边的通知配置 - -如果您完成了通知配置,那么这里三种不同的通知方式中就会出现您之前的配置,勾选即可。 - -> 对接精准的云端的威胁情报后,可以对攻击行为进行更准的研判,帮助我们更科学的进行处置。 - -对接了威胁情报后,当HFish捕获到了来自外网的攻击行为后,我们可以在攻击列表中了解攻击者的IP情报。HFish会把您在云端查询到的情报在本地缓存7天,保持您攻击情报时效性的同时,节省您的查询次数。 - -image-20210318220204897 - - - -我们支持对接两种来自微步在线的威胁情报 - -> 对接微步在线云API(IP信誉接口) - -关于该接口完整的说明,可以参考[微步在线云API文档](https://x.threatbook.cn/nodev4/vb4/API) - -本接口在注册后可以获得每日50条云端情报的查询额度,给微步发送扩容邮件后,可以提升到每日200条的额度。详情访问[微步在线X社区](https://x.threatbook.cn/nodev4/vb4/article?threatInfoID=3101)。 - -如果有企业化需求,可以邮件 honeypot@threatbook.cn - - - -> 对接TIP的本地情报,您可以跟据页面的描述进行注册和使用。 - -使用该接口需要购买微步在线的TIP本地情报系统 - -![image-20210616181828767](http://img.threatbook.cn/hfish/20210616181830.png) - -> 通知功能是蜜罐的核心功能之一 - -对于蜜罐捕获到的信息,跟据您不同的安全运营流程,您可能需要把该信息第一时间通知其它的安全设备,也可能需要把该信息通知给相关的安全运营人员。HFish用三种方式满足您的需求。 - -- Syslog通知 -- 邮件通知 -- Webhook通知 - -image-20210318215610629 - -> 用 Syslog 联动其它安全设备 - -您可以自定义接受通知设备的地址、协议和端口,用来接受OneFish捕获的攻击信息和报警。HFish最多支持5路syslog进行通知。 - -image-20210318215642971 - -> 用邮件通知相关安全人员 - -您可以通过配置相关的邮件服务器信息,来接受OneFish的通知和报警。 - -image-20210318215718987 - -> Webhook通知其它设备/人 - -很多的场景下我们都可以方便的使用webhook联动人或者设备。 - -- 对于当前企业办公中最为流行的3大即时通讯软件企业微信、钉钉、飞书的机器人,我们也做了适配,您在IM中建立一个机器人,把机器人的token复制到OneFish的webhook配置中,就可以第一时间在IM中获取蜜罐捕获的攻击告警了。 -- 三家IM的官方文档如下,您可以对照进行参考 - -```wiki -- 企业微信官方文档 - - https://work.weixin.qq.com/help?doc_id=13376#%E5%A6%82%E4%BD%95%E4%BD%BF%E7%94%A8%E7%BE%A4%E6%9C%BA%E5%99%A8%E4%BA%BA - -- 钉钉官方文档 - - https://ding-doc.dingtalk.com/doc#/serverapi2/qf2nxq - -- 飞书官方文档 - https://www.feishu.cn/hc/zh-CN/articles/360040553973 -``` - - - - - diff --git a/docs/static/version b/docs/static/version index cdd3163..fe304d9 100644 --- a/docs/static/version +++ b/docs/static/version @@ -1,6 +1,6 @@ { - "version":"2.4.0", - "date":"2021-06-11", + "version":"2.4.2", + "date":"2021-06-25", "desc":[ "1.新增扫描感知功能,可感知到全端口范围内的TCP、UDP、ICMP扫描,支持IPv4与IPv6。", "2.新增服务在线下载及上传功能,新版发布后,进入服务列表,即可看到最新的服务。", @@ -9,4 +9,4 @@ "5.修复邮件服务器配置问题,填写发件邮箱进行邮件配置测试。", "6.修复情报页面api报错问题。" ] -} \ No newline at end of file +} diff --git a/docs/uninstall.md b/docs/uninstall.md new file mode 100644 index 0000000..4a4d9c8 --- /dev/null +++ b/docs/uninstall.md @@ -0,0 +1,95 @@ +# 卸载蜜罐的流程 + +> 卸载server端 + +1. 退出server进程 + +```shell +# 结束./server 进程 +root@HFish~$ ps aux | grep server +root 8435 0.2 10.2 997804 188176 ? Sl Mar23 23:54 ./server + +root@HFish:~$ kill 8435 +``` + +2. 删除server文件夹 + +```shell +# 默认情况下 OneFish 统一被部署到/opt/onefish目标,删除即可 +root@HFish~$ rm -rf /opt/onefish +``` + +3. 清理数据库 + +```shell +#删除 OneFish 数据库 +root@HFish:~$ mysql -h127.0.0.1 -uroot -p +Enter password:*******(默认为OneFish210!) +mysql> DROP DATABASE onefish; + +# 停止 MySQL 服务 +root@HFish:~$ systemctl stop mysqld +root@HFish:~$ systemctl disable mysqld +``` + +4. 还原SSH和Firewall配置 + +```shell +# 删除SSH config内对于访问来源的限制 +root@HFish~$ vi /etc/ssh/sshd_config +删除 AllowUsers root@xxx 这行 + +# 重启 SSH 服务 +root@HFish~$ systemctl restart sshd + +# 清除Firewall服务的规则 +root@HFish~$ firewall-cmd --permanent --list-all | grep ports | head -n 1 | \ +cut -d: -f2 | tr ' ' '\n' | xargs -I {} firewall-cmd --permanent --remove-port={} + +# 重启 Firewall 服务 +root@HFish~$ systemctl restart firewalld +``` + + + +> 卸载节点端 + +1. 退出client进程 + +```shell +# 结束./client 进程 +root@HFish~$ ps aux | grep client +root 1012 0.2 10.2 997804 188176 ? Sl Mar23 23:54 ./client + +root@HFish:~$ kill -8 1012 +``` + +2. 删除client文件夹 + +```shell +# 默认情况下 OneFish 统一被部署到/opt/onefish目标,删除即可 +root@HFish~$ rm -rf /opt/onefish +``` + +3. 还原SSH和Firewall配置 + +```shell +# 还原默认 SSH 端口 +root@HFish~$ vi /etc/ssh/sshd_config +- 把 Port 22122 注释掉或修改为默认的22 + +# 删除 SSH config 内对于访问来源的限制 +root@HFish~$ vi /etc/ssh/sshd_config +删除 AllowUsers root@xxx 这行 + +# 重启 SSH 服务 +root@HFish~$ systemctl restart sshd + +# 清除Firewall服务的规则 +root@HFish~$ firewall-cmd --permanent --list-all | grep ports | head -n 1 | \ +cut -d: -f2 | tr ' ' '\n' | xargs -I {} firewall-cmd --permanent --remove-port={} + +# 重启 Firewall 服务 +root@HFish~$ systemctl restart firewalld +``` + diff --git a/install b/install index 98e22aa..7beacbd 100644 --- a/install +++ b/install @@ -45,15 +45,14 @@ cd /opt #首页菜单 menu() { echoContent red "\n==============================================================\n" - echoContent green "当前版本:v2.4.0" + echoContent green "当前版本:v2.4.2" echoContent green "HFish官网 https://hfish.io " echoContent red "\n==============================================================\n" echoContent skyBlue "-------------------------安装部署-----------------------------\n" echoContent yellow "1.安装并运行HFish单机版" echoContent yellow "2.安装并运行HFish集群版控制端" - echoContent yellow "3.用Docker运行HFish控制端" - echoContent yellow "4.补充不同架构蜜罐服务包" - + echoContent yellow "3.退出安装" + # echoContent yellow "4.用Docker运行HFish控制端" # echoContent skyBlue "\n-------------------------配置管理-----------------------------\n" # echoContent yellow "5.防火墙放通控制端端口(coming soon)" # echoContent yellow "6.将HFish添加为系统服务(coming soon)" @@ -71,8 +70,8 @@ menu() { 2): serverInstall ;; - 4) - selectServiceInstall + 3) + exitInstall ;; *) echoContent red ' ---> 选择错误,重新选择' @@ -83,14 +82,14 @@ menu() { standaloneInstall(){ if [ $(uname -s) = 'Linux' ] && [ $(uname -m) = 'x86_64' ] && [ $(getconf LONG_BIT) = '64' ]; then - wget -N --no-check-certificate http://hfish.cn-bj.ufileos.com/standalone-2.4.0-linux-amd64.tar.gz + wget -N --no-check-certificate http://hfish.cn-bj.ufileos.com/hfish-standalone-2.4.2-linux-amd64.tar.gz elif [ $(uname -m) = 'aarch64' ] && [ $(getconf LONG_BIT) = '64' ]; then - wget -N --no-check-certificate http://hfish.cn-bj.ufileos.com/standalone-2.4.0-linux-arm64.tar.gz + wget -N --no-check-certificate http://hfish.cn-bj.ufileos.com/hfish-standalone-2.4.2-linux-arm64.tar.gz else echoContent red "未检测到系统版本,请参阅 https://hfish.io 官网文档手动安装!\n" && exit 1 fi - tar -zxvf standalone*.tar.gz + tar -zxvf hfish-standalone*.tar.gz cd /opt/hfish && nohup ./server & sleep 2 cd /opt/hfish/client && nohup ./client & @@ -98,28 +97,32 @@ standaloneInstall(){ serverInstall() { if [ $(uname -s) = 'Linux' ] && [ $(uname -m) = 'x86_64' ] && [ $(getconf LONG_BIT) = '64' ]; then - wget -N --no-check-certificate http://hfish.cn-bj.ufileos.com/hfish-2.4.0-linux-amd64.tar.gz + wget -N --no-check-certificate http://hfish.cn-bj.ufileos.com/hfish-2.4.2-linux-amd64.tar.gz elif [ $(uname -m) = 'aarch64' ] && [ $(getconf LONG_BIT) = '64' ]; then - wget -N --no-check-certificate http://hfish.cn-bj.ufileos.com/hfish-2.4.0-linux-arm64.tar.gz + wget -N --no-check-certificate http://hfish.cn-bj.ufileos.com/hfish-2.4.2-linux-arm64.tar.gz else echoContent red "未检测到系统版本,请参阅 https://hfish.io 官网文档手动安装!\n" && exit 1 fi + mkdir -p hfish tar -zxvf hfish*.tar.gz -C hfish cd hfish nohup ./server & } - -selectServiceInstall() { - if [ -d "/opt/hfish/packages" ]; then - cd /opt/hfish/packages - wget http://img.threatbook.cn/hfish/svc/services-2.4.0.tar.gz - tar zxvf services*.tar.gz - rm -f services-2.4.0.tar.gz - else - echoContent red "未检测到安装目录,请参阅 https://hfish.io 官网文档手动安装!\n" && exit 1 - fi +exitInstall() { + exit 1 } +# selectServiceInstall() { +# if [ -d "/opt/hfish/packages" ]; then +# cd /opt/hfish/packages +# wget http://img.threatbook.cn/hfish/svc/services-2.4.0.tar.gz +# tar zxvf services*.tar.gz +# rm -f services-2.4.0.tar.gz +# else +# echoContent red "未检测到安装目录,请参阅 https://hfish.io 官网文档手动安装!\n" && exit 1 +# fi +# } + menu \ No newline at end of file diff --git a/readme.md b/readme.md index 350c48b..21e1603 100644 --- a/readme.md +++ b/readme.md @@ -9,7 +9,9 @@

HFish是一款安全、简单可信赖的跨平台蜜罐软件,允许商业和个人用户免费使用。

-官网 +官网 +| +使用手册 | Github | @@ -18,6 +20,8 @@ 下载部署

+## 二维码 + ## 特点 + 安全可靠:主打低中交互蜜罐,简单有效; @@ -31,7 +35,7 @@ -## 链接 +## 快速开始 [官方网站](https://hfish.io/):更多使用蜜罐、使用场景和玩法详见官网 @@ -147,6 +151,8 @@ HFish由控制端和节点端组成,控制端用来生成和管理节点端, ![image2021-6-7_19-4-10](images/20210611115224.png) +## 致谢 + ## wx群 如何大家有更多的建议希望能够更便捷的交流,可以添加我们的wx群。