mirror of
https://github.com/aljazceru/cowrie.git
synced 2026-01-18 21:54:27 +01:00
formatting
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user