MCPcopy
hub / github.com/ph4ntonn/Stowaway / DispatchSSHMess

Function DispatchSSHMess

agent/handler/ssh.go:179–197  ·  view source on GitHub ↗
(mgr *manager.Manager)

Source from the content-addressed store, hash-verified

177}
178
179func DispatchSSHMess(mgr *manager.Manager) {
180 mySSH := newSSH()
181
182 for {
183 message := <-mgr.SSHManager.SSHMessChan
184
185 switch mess := message.(type) {
186 case *protocol.SSHReq:
187 mySSH.Addr = mess.Addr
188 mySSH.Method = int(mess.Method)
189 mySSH.Username = mess.Username
190 mySSH.Password = mess.Password
191 mySSH.Certificate = mess.Certificate
192 go mySSH.start()
193 case *protocol.SSHCommand:
194 mySSH.input(mess.Command)
195 }
196 }
197}

Callers 1

RunMethod · 0.92

Calls 3

newSSHFunction · 0.85
startMethod · 0.45
inputMethod · 0.45

Tested by

no test coverage detected