Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import (
"strings"

"github.com/vulncheck-oss/go-exploit/c2"
"github.com/vulncheck-oss/go-exploit/c2/shelltunnel"
"github.com/vulncheck-oss/go-exploit/output"
)

Expand Down Expand Up @@ -310,3 +311,19 @@ func (conf *Config) GetBoolFlag(name string) bool {

return *value
}

// Some C2 (ShellTunnel) don't actually care how the payload is generated, but
// the underlying C2 might be implied depending on how the individual exploit
// has been developed. It is certainly not a requirement to call this function
// but it can help simplify the handling of secure shell vs insecure
func (conf *Config) ResolveC2Payload() c2.Impl {
if conf.C2Type != c2.ShellTunnel {
return conf.C2Type
}

if shelltunnel.GetInstance().SSLShellServer {
return c2.SSLShellServer
}

return c2.SimpleShellServer
}
Loading