Skip to content

Commit

Permalink
additional param on agent module req ctx
Browse files Browse the repository at this point in the history
  • Loading branch information
zarkones committed Feb 18, 2024
1 parent 1f5c2f6 commit 6b512ee
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions modules.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,16 @@ import (
)

type AgentModuleReqCtx struct {
ModuleName string `json:"moduleName"` // Example: HELLO_WORLD.dll
AgentID string `json:"agentId"`
ModuleName string `json:"moduleName"` // Example: HELLO_WORLD.DLL
}

func AgentDownloadModule(moduleName string, decryptionKey *rsa.PrivateKey) (module string, err error) {
func AgentDownloadModule(agentID, moduleName string, decryptionKey *rsa.PrivateKey) (module string, err error) {
if TrustedPubKey == nil {
return "", ErrKeyIsNil
}

payload, err := json.Marshal(AgentModuleReqCtx{moduleName})
payload, err := json.Marshal(AgentModuleReqCtx{AgentID: agentID, ModuleName: moduleName})
if err != nil {
return "", err
}
Expand Down

0 comments on commit 6b512ee

Please sign in to comment.