From c4efff12837ae02458e73d0c236696ed256ddef0 Mon Sep 17 00:00:00 2001 From: Michel Oosterhof Date: Sun, 5 Oct 2014 21:02:24 +0000 Subject: [PATCH] add imports for logging, disable logging from fs.py --- kippo/core/auth.py | 3 ++- kippo/core/fs.py | 4 ++-- kippo/core/honeypot.py | 1 + kippo/core/protocol.py | 1 + 4 files changed, 6 insertions(+), 3 deletions(-) diff --git a/kippo/core/auth.py b/kippo/core/auth.py index 60386b4..a734673 100644 --- a/kippo/core/auth.py +++ b/kippo/core/auth.py @@ -6,6 +6,7 @@ import string import twisted from twisted.cred import checkers, credentials, error from twisted.internet import defer +from twisted.python import log from zope.interface import implements from kippo.core.config import config @@ -131,7 +132,7 @@ class HoneypotPasswordChecker: log.msg( 'login attempt [%s/%s] succeeded' % (username, password) ) return True else: - losg.msg( 'login attempt [%s/%s] failed' % (username, password) ) + log.msg( 'login attempt [%s/%s] failed' % (username, password) ) return False # vim: set sw=4 et: diff --git a/kippo/core/fs.py b/kippo/core/fs.py index 5cf6725..a7086de 100644 --- a/kippo/core/fs.py +++ b/kippo/core/fs.py @@ -96,7 +96,7 @@ class HoneyPotFilesystem(object): if not f[A_REALFILE] and os.path.exists(realfile) and \ not os.path.islink(realfile) and os.path.isfile(realfile) and \ f[A_SIZE] < 25000000: - log.msg( 'Updating realfile to %s' % realfile ) + #log.msg( 'Updating realfile to %s' % realfile ) f[A_REALFILE] = realfile def realfile(self, f, path): @@ -124,7 +124,7 @@ class HoneyPotFilesystem(object): if count > 10: raise TooManyLevels path = self.resolve_path(target, os.path.dirname(target)) - log.msg( '%s resolved into %s' % (target, path) ) + #log.msg( '%s resolved into %s' % (target, path) ) if not path or not self.exists(path): raise FileNotFound f = self.getfile(path) diff --git a/kippo/core/honeypot.py b/kippo/core/honeypot.py index 19cb017..82f3bde 100644 --- a/kippo/core/honeypot.py +++ b/kippo/core/honeypot.py @@ -6,6 +6,7 @@ from copy import deepcopy, copy import os import shlex +from twisted.python import log from kippo.core import fs from kippo.core.config import config import kippo.core.exceptions diff --git a/kippo/core/protocol.py b/kippo/core/protocol.py index 2f009ab..0eab281 100644 --- a/kippo/core/protocol.py +++ b/kippo/core/protocol.py @@ -10,6 +10,7 @@ from twisted.conch import recvline from twisted.conch.ssh import transport from twisted.conch.insults import insults from twisted.internet import protocol +from twisted.python import log from copy import deepcopy, copy from kippo.core import ttylog, fs