guacamole-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mike Jumper <mjum...@apache.org>
Subject Re: How to get key strokes from guacamole?
Date Tue, 08 Jan 2019 20:36:17 GMT
On Tue, Jan 8, 2019 at 12:16 PM genesis <gguth@live.com> wrote:

> Hi!
>
> I´m trying to get the user key strokes in a ssh session on the guacamole
> server.
>

The upcoming 1.0.0 release provides support for including key events in
session recordings. The easiest way would be to use that.


> I found the *GuacamoleWebSocketTunnelEndpoint* class wich register a event
> listener to write messages using the *WriterGuacamoleWriter* class. So I
> got
> the browser session keystrokes on the the /onMessage/ method but the
> instruction passed is something like: 3.key,2.97,1.1; 3.key,2.97,1.0; and
> so
> on.
>

If you need to do this at the Java level, the Guacamole API provides a
FilteredGuacamoleWriter class that can be used to intercept instructions
like the "key" instruction that carries event information:

http://guacamole.apache.org/doc/guacamole-common/org/apache/guacamole/protocol/FilteredGuacamoleWriter.html
http://guacamole.apache.org/doc/gug/protocol-reference.html#key-instruction

If you just need this for auditing purposes, I suggest simply using the
built-in capabilities coming of the upcoming 1.0.0 release.


> I would like to know if is it possible to can get the actual key (or even
> better, the command typed by the user) that the user pressed on the
> guacamole server, or just the guacd deals with this?


The upcoming 1.0.0 release also provides a utility called "guaclog" which
helps interpret key events within a session capture, if present, but beware
the concept of a "command" really only exists within the shell. To
Guacamole, key events are key events. It can't tell whether you are
entering a command, writing text into a text editor, typing an email,
entering a password that looks an awful lot like a command, etc.

- Mike

Mime
View raw message