mirror of
https://github.com/40t/go-sniffer.git
synced 2025-08-08 21:19:31 +08:00
Init
This commit is contained in:
28
core/core.go
Normal file
28
core/core.go
Normal file
@@ -0,0 +1,28 @@
|
||||
package core
|
||||
|
||||
type Core struct{
|
||||
//版本信息
|
||||
Version string
|
||||
}
|
||||
|
||||
var cxt Core
|
||||
|
||||
func New() Core {
|
||||
|
||||
cxt.Version = "0.1"
|
||||
|
||||
return cxt
|
||||
}
|
||||
|
||||
func (c *Core) Run() {
|
||||
|
||||
//插件
|
||||
plug := NewPlug()
|
||||
|
||||
//解析参数
|
||||
cmd := NewCmd(plug)
|
||||
cmd.Run()
|
||||
|
||||
//开启抓包
|
||||
NewDispatch(plug, cmd).Capture()
|
||||
}
|
Reference in New Issue
Block a user