aboutsummaryrefslogtreecommitdiff
path: root/cmd/wmi.go
diff options
context:
space:
mode:
authorBryan McNulty <bryanmcnulty@protonmail.com>2025-04-17 09:55:07 -0500
committerBryan McNulty <bryanmcnulty@protonmail.com>2025-04-17 09:55:07 -0500
commit4f906bddd3f4261b2d45bf37a4adfe795c42967e (patch)
treeb926e0d5a3520234f08209db68069d780a9e9230 /cmd/wmi.go
parentfc2ed14f92dd82268ca94d3d08c3760aba534d3f (diff)
downloadgoexec-4f906bddd3f4261b2d45bf37a4adfe795c42967e.tar.gz
goexec-4f906bddd3f4261b2d45bf37a4adfe795c42967e.zip
Update output,IO; add output support to WMI
Diffstat (limited to 'cmd/wmi.go')
-rw-r--r--cmd/wmi.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/cmd/wmi.go b/cmd/wmi.go
index 6fde395..42475f0 100644
--- a/cmd/wmi.go
+++ b/cmd/wmi.go
@@ -28,7 +28,7 @@ func wmiCallCmdInit() {
wmiCallCmd.Flags().StringVarP(&wmiCall.Resource, "namespace", "n", "//./root/cimv2", "WMI namespace")
wmiCallCmd.Flags().StringVarP(&wmiCall.Class, "class", "C", "", `WMI class to instantiate (i.e. "Win32_Process")`)
wmiCallCmd.Flags().StringVarP(&wmiCall.Method, "method", "m", "", `WMI Method to call (i.e. "Create")`)
- wmiCallCmd.Flags().StringVarP(&wmiArguments, "args", "A", "{}", `WMI Method argument(s) in JSON dictionary format (i.e. {"CommandLine":"calc.exe"})`)
+ wmiCallCmd.Flags().StringVarP(&wmiArguments, "args", "A", "{}", `WMI Method argument(s) in JSON dictionary format (i.e. {"Command":"calc.exe"})`)
if err := wmiCallCmd.MarkFlagRequired("class"); err != nil {
panic(err)
@@ -131,7 +131,7 @@ References:
ctx := log.With().
Str("module", "wmi").
Str("method", "proc").
- Logger().WithContext(gssapi.NewSecurityContext(context.TODO()))
+ Logger().WithContext(gssapi.NewSecurityContext(context.Background()))
if err := goexec.ExecuteCleanMethod(ctx, &wmiProc, &exec); err != nil {
log.Fatal().Err(err).Msg("Operation failed")