mirror of
https://github.com/aljazceru/cowrie.git
synced 2026-01-06 07:44:28 +01:00
less verbose logging
This commit is contained in:
@@ -182,27 +182,26 @@ class HoneyPotFilesystem(object):
|
||||
def open(self, filename, openFlags, mode):
|
||||
#print "fs.open %s" % filename
|
||||
|
||||
if (openFlags & os.O_APPEND == os.O_APPEND):
|
||||
#print "fs.open append"
|
||||
#if (openFlags & os.O_APPEND == os.O_APPEND):
|
||||
# print "fs.open append"
|
||||
|
||||
if (openFlags & os.O_CREAT == os.O_CREAT):
|
||||
#print "fs.open creat"
|
||||
#if (openFlags & os.O_CREAT == os.O_CREAT):
|
||||
# print "fs.open creat"
|
||||
|
||||
if (openFlags & os.O_TRUNC == os.O_TRUNC):
|
||||
#print "fs.open trunc"
|
||||
#if (openFlags & os.O_TRUNC == os.O_TRUNC):
|
||||
# print "fs.open trunc"
|
||||
|
||||
if (openFlags & os.O_EXCL == os.O_EXCL):
|
||||
#print "fs.open excl"
|
||||
#if (openFlags & os.O_EXCL == os.O_EXCL):
|
||||
# print "fs.open excl"
|
||||
|
||||
if openFlags & os.O_RDWR == os.O_RDWR:
|
||||
#print "fs.open rdwr"
|
||||
raise notImplementedError
|
||||
|
||||
elif openFlags & os.O_WRONLY == os.O_WRONLY:
|
||||
# ensure we do not save with executable bit set
|
||||
realmode = mode & ~(stat.S_IEXEC | stat.S_IXGRP | stat.S_IXOTH)
|
||||
|
||||
#print "fs.open wronly %s " % os.O_WRONLY
|
||||
#print "fs.open wronly"
|
||||
# TODO: safeoutfile could contains source IP address
|
||||
safeoutfile = '%s/%s_%s' % \
|
||||
(config().get('honeypot', 'download_path'),
|
||||
@@ -217,7 +216,6 @@ class HoneyPotFilesystem(object):
|
||||
return fd
|
||||
|
||||
elif openFlags & os.O_RDONLY == os.O_RDONLY:
|
||||
#print "fs.open rdonly"
|
||||
return None
|
||||
|
||||
return None
|
||||
|
||||
Reference in New Issue
Block a user