Skip to content

Commit

Permalink
update 0.6.2
Browse files Browse the repository at this point in the history
  • Loading branch information
sanjinhub committed May 11, 2020
1 parent b9d9b1c commit 69e8b2d
Show file tree
Hide file tree
Showing 8 changed files with 158 additions and 22 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@
### Situational awareness


![](./images/data.jpg)
![](./images/data.png)


### Upper hook page
Expand Down
2 changes: 1 addition & 1 deletion README_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@
### 态势感知


![](./images/data.jpg)
![](./images/data.png)


### 上钩页
Expand Down
6 changes: 6 additions & 0 deletions admin/footer.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,12 @@
<div class="tab-content">
<div class="tab-pane fade in active" id="home-2">
<div class="timeline-2">
<div class="time-item">
<div class="item-info">
<small class="text-muted">2020-05-12</small>
<p>发布 v0.6.2 版本</p>
</div>
</div>
<div class="time-item">
<div class="item-info">
<small class="text-muted">2020-04-15</small>
Expand Down
Binary file removed images/data.jpg
Binary file not shown.
Binary file added images/data.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
104 changes: 104 additions & 0 deletions logs/hfish.log

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
)

func main() {
setting.Run()
//setting.Run()
args := os.Args
if args == nil || len(args) < 2 {
setting.Help()
Expand All @@ -17,7 +17,7 @@ func main() {
} else if args[1] == "init" || args[1] == "--init" {
setting.Init()
} else if args[1] == "version" || args[1] == "--version" {
fmt.Println("v0.6.1")
fmt.Println("v0.6.2")
} else if args[1] == "run" || args[1] == "--run" {
setting.Run()
} else {
Expand Down
62 changes: 44 additions & 18 deletions utils/conf/conf.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,29 +38,55 @@ func Contains(l *list.List, value string) (bool, *list.Element) {

func GetCustomName() []string {
names := cfg.SectionStrings()
var existConfig []string

existConfig := []string{
"DEFAULT",
"rpc",
"admin",
"api",
"plug",
"web",
"deep",
"ssh",
"redis",
"mysql",
"telnet",
"ftp",
"mem_cache",
"http",
"tftp",
"elasticsearch",
"vnc",
rpcStatus := Get("rpc", "status")

// 判断 RPC 是否开启 1 RPC 服务端 2 RPC 客户端
if rpcStatus == "1" || rpcStatus == "0" {
existConfig = []string{
"DEFAULT",
"rpc",
"admin",
"api",
"plug",
"web",
"deep",
"ssh",
"redis",
"mysql",
"telnet",
"ftp",
"mem_cache",
"http",
"tftp",
"elasticsearch",
"vnc",
}
} else if rpcStatus == "2" {
existConfig = []string{
"DEFAULT",
"rpc",
"api",
"plug",
"web",
"deep",
"ssh",
"redis",
"mysql",
"telnet",
"ftp",
"mem_cache",
"http",
"tftp",
"elasticsearch",
"vnc",
}
}

for i := 0; i < len(names); i++ {
for j := 0; j < len(existConfig); j++ {

if names[i] == existConfig[j] {
names = append(names[:i], names[i+1:]...)
}
Expand Down

0 comments on commit 69e8b2d

Please sign in to comment.