From c14c08340a77b825cbe7ccf623474f89f6d2b52a Mon Sep 17 00:00:00 2001 From: Michel Oosterhof Date: Sat, 19 Dec 2015 07:54:22 +0000 Subject: [PATCH] formatting --- cowrie/commands/sudo.py | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/cowrie/commands/sudo.py b/cowrie/commands/sudo.py index 665bd9d..b8c332d 100644 --- a/cowrie/commands/sudo.py +++ b/cowrie/commands/sudo.py @@ -53,18 +53,28 @@ Options: ''').strip().split('\n') class command_sudo(HoneyPotCommand): + """ + """ def short_help(self): + """ + """ for ln in sudo_shorthelp: self.writeln(ln) self.exit() + def long_help(self): + """ + """ for ln in sudo_longhelp: self.writeln(ln) self.exit() + def version(self): + """ + """ self.writeln( '''Sudo version 1.8.5p2 Sudoers policy plugin version 1.8.5p2 @@ -72,7 +82,10 @@ Sudoers file grammar version 41 Sudoers I/O plugin version 1.8.5p2''') self.exit() + def start(self): + """ + """ try: optlist, args = getopt.getopt(self.args, 'shV') except getopt.GetoptError as err: @@ -92,9 +105,11 @@ Sudoers I/O plugin version 1.8.5p2''') line = ' '.join(args) cmd = args[0] args = args[1:] - cmdclass = self.protocol.getCommand(cmd, self.environ['PATH'].split(':')) + cmdclass = self.protocol.getCommand(cmd, + self.environ['PATH'].split(':')) if cmdclass: - log.msg(eventid='KIPP0005', input=line, format='Command found: %(input)s') + log.msg(eventid='KIPP0005', input=line, + format='Command found: %(input)s') self.protocol.call_command(cmdclass, *args) self.exit() else: