wallix / redemption

A GPL RDP proxy
GNU General Public License v2.0
212 stars 87 forks source link

Display only a text message in the redemption login screen instead of the login form #145

Closed dtouzeau closed 3 years ago

dtouzeau commented 3 years ago

Hi i would like from passtrough to send a text message only when a client is connected with wrong settings.

The only workaround i have found is to send an empty form with the close module

        interactive_data = {
            u'target_password': u'password',
            u'target_host': u'',
            u'target_login': u'Try to connect with the good paramers',
            u'display_message': 1
        }
        _status, _error = self.interactive_target(interactive_data)
        self.shared.send_data({u'module': u'close'})
       return False

Is there a better way to just output a message ?

mengtan commented 3 years ago

Not sure to understand your request, but there's a confirm module with a message you can use.

data_to_send = { 
    u'module': u'confirm',
    u'message': u'Your message',
}
self.shared.send_data(data_to_send)
_status, _error = self.shared.receive_data()
if self.shared.get(u'display_message') != u'True':
    _status, _error = False, u'Connection closed by client'
dtouzeau commented 3 years ago

Exactly what needed !!