Telnet logging (#1288)

* fix SSH version comment
* better logging for output modules for telnet commands
This commit is contained in:
Michel Oosterhof 2020-01-13 09:37:51 +00:00 committed by GitHub
parent def209cc3c
commit d9f120a4b9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -522,7 +522,7 @@ dsa_private_key = ${honeypot:state_path}/ssh_host_dsa_key
# SSH-2.0-OpenSSH_6.0p1 Debian-4+deb7u2
# SSH-2.0-OpenSSH_5.9
#
# (default: "SSH-2.0-SSH-2.0-OpenSSH_6.0p1 Debian-4+deb7u2")
# (default: "SSH-2.0-OpenSSH_6.0p1 Debian-4+deb7u2")
version = SSH-2.0-OpenSSH_6.0p1 Debian-4+deb7u2
# Cipher encryption algorithms to be used.

View File

@ -179,7 +179,7 @@ class TelnetHandler:
# check if a command has terminated
if b'\r' in data:
if len(self.currentCommand) > 0:
log.msg('CMD: {0}'.format(self.currentCommand))
log.msg(eventid='cowrie.command.input', input=self.currentCommand, format='CMD: %(input)s')
self.currentCommand = b''
# send data after processing (also check if processing did not reduce it to an empty string)