Skip to content

Commit

Permalink
Moved logging config to own directory due to execution
Browse files Browse the repository at this point in the history
  • Loading branch information
madirish committed Dec 23, 2014
1 parent 124a642 commit c8c43f7
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
*.pyc
kojoney.sqlite3
honeypot.log
download/*
http__*
8 changes: 8 additions & 0 deletions conf/log_config.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import os
import sys
from kojoney_config import LOG_LOCATION

if os.getuid() == 0:
ROOT_CONFIG_LOGS = [sys.stderr, open(LOG_LOCATION, "a")]
else:
CONFIG_LOGS = [sys.stderr, open(LOG_LOCATION, "a")]
1 change: 1 addition & 0 deletions download/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
__author__ = 'justin'
1 change: 1 addition & 0 deletions func/logging.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
from twisted.python import log

from conf.kojoney_config import *
from conf.log_config import *
from lib.kojoney_db import KojoneyDB


Expand Down
3 changes: 1 addition & 2 deletions kojoney.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
from lib.kojoney_password_checker import *
from lib.kojoney_factory import *
from lib.kojoney_db import KojoneyDB

from conf.log_config import *

#
# First of all. Start logging now()!
Expand All @@ -53,7 +53,6 @@
HONEYPOTDB = KojoneyDB()
HONEYPOTDB.update_db()

CONFIG_LOGS = [sys.stderr, open(LOG_LOCATION, "a")]

"""
Running our fake shell over an SSH channel.
Expand Down

0 comments on commit c8c43f7

Please sign in to comment.