stub out pastebin

This commit is contained in:
Barak Michener 2020-09-24 21:55:26 -07:00
parent b6b58fe2b3
commit a5bef3cd30
8 changed files with 366 additions and 12 deletions

View file

@ -12,11 +12,15 @@ type echoHandler struct {
count int
}
func (e *echoHandler) HandleExec(conn *ssh.ServerConn, channel ssh.Channel) {
func (e *echoHandler) HandleExec(_ string, conn *ssh.ServerConn, channel ssh.Channel) {
e.count += 1
io.Copy(channel, channel)
}
func (e *echoHandler) Close() error {
return nil
}
func (e *echoHandler) ServeHTTP(w http.ResponseWriter, req *http.Request) {
msg := fmt.Sprintf("Hello Echo World! Calls: %d", e.count)
w.Write([]byte(msg))