From 7250bbb1ada46c6965683a903eded8f5b6440fe2 Mon Sep 17 00:00:00 2001 From: sawka Date: Mon, 19 Dec 2022 17:38:24 -0800 Subject: [PATCH] rename to mshell_exittrap --- pkg/shexec/parser.go | 2 +- pkg/shexec/shexec.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/shexec/parser.go b/pkg/shexec/parser.go index 4b4ff300..299cecc8 100644 --- a/pkg/shexec/parser.go +++ b/pkg/shexec/parser.go @@ -451,7 +451,7 @@ func ParseShellStateOutput(outputBytes []byte) (*packet.ShellState, error) { } rtn.Aliases = strings.ReplaceAll(string(fields[3]), "\r\n", "\n") rtn.Funcs = strings.ReplaceAll(string(fields[4]), "\r\n", "\n") - rtn.Funcs = removeFunc(rtn.Funcs, "_scripthaus_exittrap") + rtn.Funcs = removeFunc(rtn.Funcs, "_mshell_exittrap") return rtn, nil } diff --git a/pkg/shexec/shexec.go b/pkg/shexec/shexec.go index 6c41412a..009f3e6c 100644 --- a/pkg/shexec/shexec.go +++ b/pkg/shexec/shexec.go @@ -995,10 +995,10 @@ func makeRcFileStr(pk *packet.RunPacketType) string { func makeExitTrap(fdNum int) string { stateCmd := GetShellStateRedirectCommandStr(fdNum) fmtStr := ` -_scripthaus_exittrap () { +_mshell_exittrap () { %s } -trap _scripthaus_exittrap EXIT +trap _mshell_exittrap EXIT ` return fmt.Sprintf(fmtStr, stateCmd) }