Help us shape the future of Go! Take the 2026 Go Developer Survey

exec

package
v0.1.0-rc2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 1, 2026 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AtExec

func AtExec(session *gofenrirsmb.Session, cmd string) (string, error)

AtExec runs cmd on the remote host via the Task Scheduler (MS-TSCH / atexec). It registers a transient scheduled task running as SYSTEM that writes command output to C$\Windows\Temp\<random>.tmp, triggers it, reads the output, then deletes the task and the file. It is an alternative to smbexec (Exec) that does not create a Windows service. Returns the command output.

func Exec

func Exec(session *gofenrirsmb.Session, cmd string) (string, error)

Exec runs cmd on the remote host via smbexec (MS-SCMR service + C$ file read). It creates a temporary service, starts it to run cmd.exe, reads the output from C$\Windows\Temp\<random>.tmp, then cleans up the service and the file. Returns the command output as a string.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL