-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdoc.go
More file actions
29 lines (23 loc) · 952 Bytes
/
Copy pathdoc.go
File metadata and controls
29 lines (23 loc) · 952 Bytes
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
/*
Package gomsf provides a Go client for Metasploit's RPC API.
The package is organized around a Client plus manager types for each RPC
domain, including core operations, modules, consoles, sessions, jobs,
plugins, authentication, and database access.
Typical usage starts with NewClient or NewClientWithToken, then accesses
managers from the client:
client, err := gomsf.NewClient("password", gomsf.WithSSL(false))
if err != nil {
return err
}
version, err := client.Core().Version(ctx)
if err != nil {
return err
}
The package prefers explicit failures over silent coercion. Malformed RPC
payloads return ErrUnexpectedResponse. Structured Metasploit RPC failures
return *RPCError and match ErrRPC. Command helper methods for consoles and
sessions return ErrCommandTimeout on timeout. Module option validation
errors match ErrInvalidOption.
Live Metasploit integration tests are opt-in through RUN_MSF_INTEGRATION=1.
*/
package gomsf