aboutsummaryrefslogtreecommitdiff
path: root/cmd
diff options
context:
space:
mode:
Diffstat (limited to 'cmd')
-rw-r--r--cmd/root.go6
-rw-r--r--cmd/wmi.go2
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)
diff --git a/cmd/wmi.go b/cmd/wmi.go
index 42475f0..b75df12 100644
--- a/cmd/wmi.go
+++ b/cmd/wmi.go
@@ -54,7 +54,7 @@ var (
wmiCmd = &cobra.Command{
Use: "wmi",
- Short: "Establish execution via wmi",
+ Short: "Establish execution via WMI",
Args: cobra.NoArgs,
}