mirror of
https://github.com/shazow/ssh-chat.git
synced 2025-04-14 16:17:17 +03:00
More evil inputs.
This commit is contained in:
parent
cfbd2824e6
commit
d30d971ea2
@ -9,6 +9,8 @@ import (
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
"code.google.com/p/rog-go/new9p/client"
|
||||
|
||||
"golang.org/x/crypto/ssh"
|
||||
)
|
||||
|
||||
@ -240,7 +242,11 @@ func (s *Server) Start(laddr string) error {
|
||||
return
|
||||
}
|
||||
|
||||
logger.Infof("Connection #%d from: %s, %s, %s", s.count+1, sshConn.RemoteAddr(), sshConn.User(), sshConn.ClientVersion())
|
||||
version := client.Conn.ClientVersion()
|
||||
if len(version) > 100 {
|
||||
version = []byte("Evil Jerk with a superlong string")
|
||||
}
|
||||
logger.Infof("Connection #%d from: %s, %s, %s", s.count+1, sshConn.RemoteAddr(), sshConn.User(), version)
|
||||
|
||||
go ssh.DiscardRequests(requests)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user