MCPcopy Create free account
hub / github.com/Fahrj/reverse-ssh / createSessionRequestCallback

Function createSessionRequestCallback

core.go:69–77  ·  view source on GitHub ↗
(forbidden bool)

Source from the content-addressed store, hash-verified

67}
68
69func createSessionRequestCallback(forbidden bool) ssh.SessionRequestCallback {
70 return func(sess ssh.Session, requestType string) bool {
71 if forbidden {
72 log.Println("Denying shell/exec/subsystem request")
73 return false
74 }
75 return true
76 }
77}
78
79func createPasswordHandler(localPassword string) ssh.PasswordHandler {
80 return func(ctx ssh.Context, pass string) bool {

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected