rename to mshell_exittrap

This commit is contained in:
sawka 2022-12-19 17:38:24 -08:00
parent f010758b36
commit 7250bbb1ad
2 changed files with 3 additions and 3 deletions

View File

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

View File

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