Skip to content

Commit e47516c

Browse files
authored
Add printing of two messages
Added printing of MsgCallExtensionReq and MsgInvokeExecuteAssemblyReq Signed-off-by: Matthijs Gielen <github@mwgielen.com>
1 parent d8668e7 commit e47516c

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

client/command/tasks/fetch.go

+16
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ import (
2828
"github.com/AlecAivazis/survey/v2"
2929
"github.com/bishopfox/sliver/client/command/environment"
3030
"github.com/bishopfox/sliver/client/command/exec"
31+
"github.com/bishopfox/sliver/client/command/extensions"
3132
"github.com/bishopfox/sliver/client/command/filesystem"
3233
"github.com/bishopfox/sliver/client/command/network"
3334
"github.com/bishopfox/sliver/client/command/privilege"
@@ -212,9 +213,23 @@ func renderTaskResponse(task *clientpb.BeaconTask, con *console.SliverConsoleCli
212213
}
213214
environment.PrintUnsetEnvInfo(unsetEnvReq.Name, unsetEnv, con)
214215

216+
// ---------------------
217+
// Call extension commands
218+
// ---------------------
219+
case sliverpb.MsgCallExtensionReq:
220+
callExtension := &sliverpb.CallExtension{}
221+
err := proto.Unmarshal(task.Response, callExtension)
222+
if err != nil {
223+
con.PrintErrorf("Failed to decode task response: %s\n", err)
224+
return
225+
}
226+
extensions.PrintExtOutput("", "", callExtension, con)
227+
215228
// ---------------------
216229
// Exec commands
217230
// ---------------------
231+
case sliverpb.MsgInvokeExecuteAssemblyReq:
232+
fallthrough
218233
case sliverpb.MsgInvokeInProcExecuteAssemblyReq:
219234
fallthrough
220235
case sliverpb.MsgExecuteAssemblyReq:
@@ -235,6 +250,7 @@ func renderTaskResponse(task *clientpb.BeaconTask, con *console.SliverConsoleCli
235250
Flags: grumble.FlagMap{
236251
"save": &grumble.FlagMapItem{Value: false, IsDefault: true},
237252
"loot": &grumble.FlagMapItem{Value: false, IsDefault: true},
253+
"name": &grumble.FlagMapItem{Value: "", IsDefault: true},
238254
},
239255
}
240256
exec.HandleExecuteAssemblyResponse(execAssembly, assemblyPath, hostname, ctx, con)

0 commit comments

Comments
 (0)