From 7afebcd5347a2b982d27ac59a59c85dcaf275311 Mon Sep 17 00:00:00 2001 From: Bryan McNulty Date: Thu, 17 Apr 2025 12:28:23 -0500 Subject: Executable paths with spaces should be quoted in full command string --- cmd/root.go | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'cmd/root.go') 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) -- cgit v1.2.3