File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change 66 "strings"
77
88 "github.com/vulncheck-oss/go-exploit/c2"
9+ "github.com/vulncheck-oss/go-exploit/c2/shelltunnel"
910 "github.com/vulncheck-oss/go-exploit/output"
1011)
1112
@@ -310,3 +311,19 @@ func (conf *Config) GetBoolFlag(name string) bool {
310311
311312 return * value
312313}
314+
315+ // Some C2 (ShellTunnel) don't actually care how the payload is generated, but
316+ // the underlying C2 might be implied depending on how the individual exploit
317+ // has been developed. It is certainly not a requirement to call this function
318+ // but it can help simplify the handling of secure shell vs insecure
319+ func (conf * Config ) ResolveC2Payload () c2.Impl {
320+ if conf .C2Type != c2 .ShellTunnel {
321+ return conf .C2Type
322+ }
323+
324+ if shelltunnel .GetInstance ().SSLShellServer {
325+ return c2 .SSLShellServer
326+ }
327+
328+ return c2 .SimpleShellServer
329+ }
You can’t perform that action at this time.
0 commit comments