mirror of
https://github.com/cowrie/cowrie.git
synced 2025-07-01 18:07:27 -04:00
updated exception syntax
This commit is contained in:
@ -155,7 +155,7 @@ class HoneyPotRealm:
|
|||||||
return interfaces[0], \
|
return interfaces[0], \
|
||||||
HoneyPotAvatar(avatarId, self.env), lambda: None
|
HoneyPotAvatar(avatarId, self.env), lambda: None
|
||||||
else:
|
else:
|
||||||
raise Exception, "No supported interfaces found."
|
raise Exception("No supported interfaces found.")
|
||||||
|
|
||||||
class HoneyPotTransport(sshserver.KippoSSHServerTransport):
|
class HoneyPotTransport(sshserver.KippoSSHServerTransport):
|
||||||
"""
|
"""
|
||||||
@ -307,8 +307,8 @@ class HoneyPotAvatar(avatar.ConchUser):
|
|||||||
cfg.get('honeypot', 'exec_enabled').lower() not in \
|
cfg.get('honeypot', 'exec_enabled').lower() not in \
|
||||||
('yes', 'true', 'on'):
|
('yes', 'true', 'on'):
|
||||||
log.msg( 'Exec disabled. Not executing command: "%s"' % cmd )
|
log.msg( 'Exec disabled. Not executing command: "%s"' % cmd )
|
||||||
raise exceptions.NotEnabledException, \
|
raise exceptions.NotEnabledException(
|
||||||
'exec_enabled not enabled in configuration file!'
|
'exec_enabled not enabled in configuration file!')
|
||||||
return
|
return
|
||||||
|
|
||||||
log.msg( 'exec command: "%s"' % cmd )
|
log.msg( 'exec command: "%s"' % cmd )
|
||||||
|
|||||||
Reference in New Issue
Block a user