mirror of
https://github.com/cowrie/cowrie.git
synced 2025-07-01 18:07:27 -04:00
move hostname setting to avatar. general direction to move settings to avatar
This commit is contained in:
@ -23,7 +23,7 @@ class HoneyPotBaseProtocol(insults.TerminalProtocol):
|
|||||||
def __init__(self, avatar, env):
|
def __init__(self, avatar, env):
|
||||||
self.user = avatar
|
self.user = avatar
|
||||||
self.env = env
|
self.env = env
|
||||||
self.hostname = self.env.cfg.get('honeypot', 'hostname')
|
self.hostname = avatar.hostname
|
||||||
self.fs = avatar.fs
|
self.fs = avatar.fs
|
||||||
if self.fs.exists(avatar.home):
|
if self.fs.exists(avatar.home):
|
||||||
self.cwd = avatar.home
|
self.cwd = avatar.home
|
||||||
|
|||||||
@ -263,6 +263,7 @@ class HoneyPotAvatar(avatar.ConchUser):
|
|||||||
self.username = username
|
self.username = username
|
||||||
self.env = env
|
self.env = env
|
||||||
self.fs = fs.HoneyPotFilesystem(copy.deepcopy(self.env.fs))
|
self.fs = fs.HoneyPotFilesystem(copy.deepcopy(self.env.fs))
|
||||||
|
self.hostname = self.env.cfg.get('honeypot', 'hostname')
|
||||||
|
|
||||||
self.channelLookup.update({'session': HoneyPotSSHSession})
|
self.channelLookup.update({'session': HoneyPotSSHSession})
|
||||||
self.channelLookup['direct-tcpip'] = KippoOpenConnectForwardingClient
|
self.channelLookup['direct-tcpip'] = KippoOpenConnectForwardingClient
|
||||||
|
|||||||
Reference in New Issue
Block a user