1
0

Refactor command line interface

This commit is contained in:
2023-01-31 07:13:33 +00:00
parent 935266c850
commit 2f52f6db6d
8 changed files with 406 additions and 523 deletions

14
gen.go
View File

@ -12,6 +12,20 @@ import (
"code.dumpstack.io/tools/out-of-tree/config"
)
type GenCmd struct {
Type string `enum:"module,exploit" required:"" help:"module/exploit"`
}
func (cmd *GenCmd) Run(g *Globals) (err error) {
switch cmd.Type {
case "module":
err = genConfig(config.KernelModule)
case "exploit":
err = genConfig(config.KernelExploit)
}
return
}
func genConfig(at config.ArtifactType) (err error) {
a := config.Artifact{
Name: "Put name here",