|
|
|
@ -103,6 +103,8 @@ func (s *Server) HandleClient(conn net.Conn) { |
|
|
|
|
|
|
|
|
|
log.Debugf("connected with id %s", claims.Id) |
|
|
|
|
|
|
|
|
|
conn.Write([]byte(`loading\n`)) |
|
|
|
|
|
|
|
|
|
jailId, err := s.createJail(now, claims) |
|
|
|
|
if err != nil { |
|
|
|
|
return |
|
|
|
@ -123,6 +125,7 @@ func (s *Server) HandleClient(conn net.Conn) { |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
greetings := fmt.Sprintf("welcome %s! I have a letter for you, just read it!", claims.Subject) |
|
|
|
|
conn.Write([]byte(fmt.Sprintf(`echo %s`, greetings))) |
|
|
|
|
cmd := fmt.Sprintf(`echo %s 2>&1 | tee msg /dev/console`, greetings) |
|
|
|
|
|
|
|
|
|
err = s.execJail(jailId, []string{"sh", "-c", cmd}) |
|
|
|
|