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) }