mirror of
https://gitee.com/lauix/HFish
synced 2025-05-12 04:48:01 +08:00
新增两个蜜罐
This commit is contained in:
parent
beed40bdb5
commit
cfbfd6fcd9
@ -51,7 +51,7 @@ addr = 0.0.0.0:23 # Telnet 服务端地址 注意端
|
||||
status = 0 # 是否启动 Ftp 1 启动 0 关闭
|
||||
addr = 0.0.0.0:21 # Ftp 服务端地址 注意端口冲突
|
||||
|
||||
[memcache]
|
||||
status = 0 # 是否启动 Memcache 1 启动 0 关闭
|
||||
addr = 0.0.0.0:11211 # Memcache 服务端地址 注意端口冲突
|
||||
ratelimit = 4 # 每秒响应次数
|
||||
#[mem_cache]
|
||||
#status = 0 # 是否启动 MemCache 1 启动 0 关闭
|
||||
#addr = 0.0.0.0:11211 # Memcache 服务端地址 注意端口冲突
|
||||
#rate_limit = 4 # 每秒响应次数
|
2
go.mod
2
go.mod
@ -5,6 +5,8 @@ go 1.12
|
||||
require (
|
||||
github.com/anmitsu/go-shlex v0.0.0-20161002113705-648efa622239 // indirect
|
||||
github.com/axgle/mahonia v0.0.0-20180208002826-3358181d7394
|
||||
github.com/elazarl/goproxy v0.0.0-20190711103511-473e67f1d7d2
|
||||
github.com/elazarl/goproxy/ext v0.0.0-20190711103511-473e67f1d7d2 // indirect
|
||||
github.com/flynn/go-shlex v0.0.0-20150515145356-3f9db97f8568 // indirect
|
||||
github.com/gin-gonic/gin v1.4.0
|
||||
github.com/gliderlabs/ssh v0.2.2
|
||||
|
5
go.sum
5
go.sum
@ -4,6 +4,10 @@ github.com/axgle/mahonia v0.0.0-20180208002826-3358181d7394 h1:OYA+5W64v3OgClL+I
|
||||
github.com/axgle/mahonia v0.0.0-20180208002826-3358181d7394/go.mod h1:Q8n74mJTIgjX4RBBcHnJ05h//6/k6foqmgE45jTQtxg=
|
||||
github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8=
|
||||
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
github.com/elazarl/goproxy v0.0.0-20190711103511-473e67f1d7d2 h1:aZtFdDNWY/yH86JPR2WX/PN63635VsE/f/nXNPAbYxY=
|
||||
github.com/elazarl/goproxy v0.0.0-20190711103511-473e67f1d7d2/go.mod h1:/Zj4wYkgs4iZTTu3o/KG3Itv/qCCa8VVMlb3i9OVuzc=
|
||||
github.com/elazarl/goproxy/ext v0.0.0-20190711103511-473e67f1d7d2 h1:dWB6v3RcOy03t/bUadywsbyrQwCqZeNIEX6M1OtSZOM=
|
||||
github.com/elazarl/goproxy/ext v0.0.0-20190711103511-473e67f1d7d2/go.mod h1:gNh8nYJoAm43RfaxurUnxr+N1PwuFV3ZMl/efxlIlY8=
|
||||
github.com/flynn/go-shlex v0.0.0-20150515145356-3f9db97f8568 h1:BHsljHzVlRcyQhjrss6TZTdY2VfCqZPbv5k3iBFa2ZQ=
|
||||
github.com/flynn/go-shlex v0.0.0-20150515145356-3f9db97f8568/go.mod h1:xEzjJPgXI435gkrCt3MPfRiAkVrwSbHsst4LCFVfpJc=
|
||||
github.com/gin-contrib/sse v0.0.0-20190301062529-5545eab6dad3 h1:t8FVkw33L+wilf2QiWkw0UV77qRpcH/JHPKGpKa2E8g=
|
||||
@ -28,6 +32,7 @@ github.com/modern-go/reflect2 v1.0.1 h1:9f412s+6RmYXLWZSEzVVgPGK7C2PphHj5RJrvfx9
|
||||
github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0=
|
||||
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
|
||||
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
|
||||
github.com/rogpeppe/go-charset v0.0.0-20180617210344-2471d30d28b4/go.mod h1:qgYeAmZ5ZIpBWTGllZSQnw97Dj+woV0toclVaRGI8pc=
|
||||
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
|
||||
github.com/stretchr/testify v1.3.0 h1:TivCn/peBQ7UY8ooIcPgZFpTNSz0Q2U6UrFlUfqbe0Q=
|
||||
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
|
||||
|
@ -14,7 +14,6 @@ import (
|
||||
"HFish/core/protocol/ssh"
|
||||
"HFish/core/protocol/redis"
|
||||
"HFish/core/protocol/mysql"
|
||||
"HFish/core/protocol/memcache"
|
||||
"HFish/core/protocol/ftp"
|
||||
"HFish/core/protocol/telnet"
|
||||
"HFish/core/rpc/server"
|
||||
@ -93,6 +92,18 @@ func RunAdmin() http.Handler {
|
||||
}
|
||||
|
||||
func Run() {
|
||||
// 启动 MemCache 蜜罐
|
||||
//memCacheStatus := conf.Get("mem_cache", "status")
|
||||
//
|
||||
//// 判断 MemCache 蜜罐 是否开启
|
||||
//if memCacheStatus == "1" {
|
||||
// memCacheRateLimit := conf.Get("mem_cache", "rate_limit")
|
||||
// memCacheAddr := conf.Get("mem_cache", "addr")
|
||||
// go memcache.Start(memCacheAddr, memCacheRateLimit)
|
||||
//}
|
||||
|
||||
//=========================//
|
||||
|
||||
// 启动 FTP 蜜罐
|
||||
ftpStatus := conf.Get("ftp", "status")
|
||||
|
||||
@ -209,18 +220,6 @@ func Run() {
|
||||
|
||||
//=========================//
|
||||
|
||||
// 启动 Memcache 蜜罐
|
||||
memcacheStatus := conf.Get("memcache", "status")
|
||||
memcacheRateLimit := conf.Get("memcache", "ratelimit")
|
||||
|
||||
// 判断 暗网 Web 蜜罐 是否开启
|
||||
if memcacheStatus == "1" {
|
||||
memcacheAddr := conf.Get("memcache", "addr")
|
||||
go memcache.Start(memcacheAddr, memcacheRateLimit)
|
||||
}
|
||||
|
||||
//=========================//
|
||||
|
||||
// 启动 RPC
|
||||
rpcStatus := conf.Get("rpc", "status")
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user