formatting

This commit is contained in:
Michel Oosterhof
2015-12-19 07:54:22 +00:00
parent 18efb7aa52
commit c14c08340a

View File

@@ -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: