This repository has been archived on 2023-07-12. You can view files and clone it, but cannot push or open issues or pull requests.
2022-04-28 20:01:08 +02:00

28 lines
584 B
Go

package handler
import (
"fmt"
"github.com/bytedream/sshoneypot/sshoneypot/info"
)
func Default(info *info.Info) {
info.Writelnf("-bash: %s: command not found", info.Command)
}
func multipleArgs(info *info.Info) bool {
if len(info.Args) == 0 {
info.Writeln(missingOperand(info))
return false
} else {
return true
}
}
func missingOperand(info *info.Info) string {
return fmt.Sprintf("%s: missing operand", info.Command)
}
func noSuchFileOrDirectory(file string, info *info.Info) string {
return fmt.Sprintf("%s: %s: No such file or directory", info.Command, file)
}