mirror of
https://github.com/cowrie/cowrie.git
synced 2025-07-01 18:07:27 -04:00
file()->open()
This commit is contained in:
@ -98,7 +98,7 @@ class LoggingServerProtocol(insults.ServerProtocol):
|
|||||||
return
|
return
|
||||||
|
|
||||||
if self.stdinlog_open:
|
if self.stdinlog_open:
|
||||||
with file(self.stdinlog_file, 'ab') as f:
|
with open(self.stdinlog_file, 'ab') as f:
|
||||||
f.write(data)
|
f.write(data)
|
||||||
elif self.ttylog_open:
|
elif self.ttylog_open:
|
||||||
ttylog.ttylog_write(self.ttylog_file, len(data),
|
ttylog.ttylog_write(self.ttylog_file, len(data),
|
||||||
|
@ -48,7 +48,7 @@ class HoneyPotSSHUserAuthServer(userauth.SSHUserAuthServer):
|
|||||||
try:
|
try:
|
||||||
honeyfs = self.portal.realm.cfg.get('honeypot', 'contents_path')
|
honeyfs = self.portal.realm.cfg.get('honeypot', 'contents_path')
|
||||||
issuefile = honeyfs + "/etc/issue.net"
|
issuefile = honeyfs + "/etc/issue.net"
|
||||||
data = file(issuefile).read()
|
data = open(issuefile).read()
|
||||||
except IOError:
|
except IOError:
|
||||||
return
|
return
|
||||||
if not data or not len(data.strip()):
|
if not data or not len(data.strip()):
|
||||||
|
Reference in New Issue
Block a user