diff options
Diffstat (limited to 'cmd')
-rw-r--r-- | cmd/root.go | 6 | ||||
-rw-r--r-- | cmd/wmi.go | 2 |
2 files changed, 7 insertions, 1 deletions
diff --git a/cmd/root.go b/cmd/root.go index 913a44a..6b5a416 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -54,6 +54,11 @@ var ( log = log.Level(zerolog.DebugLevel) } + if proxy != "" { + rpcClient.Proxy = proxy + smbClient.Proxy = proxy + } + if outputPath != "" { if outputMethod == "smb" { if exec.Output.RemotePath == "" { @@ -80,6 +85,7 @@ func init() { rootCmd.InitDefaultHelpCmd() rootCmd.PersistentFlags().BoolVar(&debug, "debug", false, "Enable debug logging") rootCmd.PersistentFlags().BoolVar(&logJson, "log-json", false, "Log in JSON format") + rootCmd.PersistentFlags().StringVarP(&proxy, "proxy", "x", "", "Proxy URL") dcomCmdInit() rootCmd.AddCommand(dcomCmd) @@ -54,7 +54,7 @@ var ( wmiCmd = &cobra.Command{ Use: "wmi", - Short: "Establish execution via wmi", + Short: "Establish execution via WMI", Args: cobra.NoArgs, } |