blob: 0372668efae9273066776213ab6e41a84b38e7fc (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
|
package scmrexec
import (
"context"
"github.com/oiweiwei/go-msrpc/dcerpc"
"github.com/oiweiwei/go-msrpc/msrpc/scmr/svcctl/v2"
)
const (
MethodCreate = "create"
MethodChange = "change"
CleanupMethodDelete = "delete"
CleanupMethodRevert = "revert"
)
type Module struct {
hostname string // The target hostname
dce dcerpc.Conn
reconnect func(context.Context) error
ctl svcctl.SvcctlClient
scm *svcctl.Handle
services []remoteService
}
type MethodCreateConfig struct {
NoDelete bool
ServiceName string
DisplayName string
ServiceType uint32
StartType uint32
}
type MethodChangeConfig struct {
NoStart bool
ServiceName string
}
type CleanupMethodDeleteConfig struct {
ServiceNames []string
}
type CleanupMethodRevertConfig struct{}
|