keep pylint happy, add empty top docstring, to fill out later

This commit is contained in:
Michel Oosterhof
2015-11-17 16:25:03 +00:00
parent d9f343fdf3
commit 494fd6829b
17 changed files with 89 additions and 23 deletions

View File

@@ -1,12 +1,14 @@
# Copyright (c) 2009-2014 Upi Tamminen <desaster@gmail.com>
# See the COPYRIGHT file for more information
"""
This module contains ...
"""
import json
from os import path
from random import randint
from zope.interface import implements
from twisted.python import log
# by Walter de Jong <walter@sara.nl>

View File

@@ -1,6 +1,10 @@
# Copyright (c) 2009-2014 Upi Tamminen <desaster@gmail.com>
# See the COPYRIGHT file for more information
"""
This module contains ...
"""
from sys import modules
from zope.interface import implements
@@ -13,14 +17,14 @@ from twisted.python import log, failure
from twisted.conch import error
from twisted.conch.ssh import keys
from . import credentials
from . import auth
from cowrie.core import credentials
from cowrie.core import auth
class HoneypotPublicKeyChecker:
implements(ICredentialsChecker)
"""
Checker that accepts, logs and denies public key authentication attempts
"""
implements(ICredentialsChecker)
credentialInterfaces = (ISSHPrivateKey,)
@@ -36,10 +40,10 @@ class HoneypotPublicKeyChecker:
return failure.Failure(error.ConchError('Incorrect signature'))
class HoneypotNoneChecker:
implements(ICredentialsChecker)
"""
Checker that does no authentication check
"""
implements(ICredentialsChecker)
credentialInterfaces = (credentials.IUsername,)
@@ -50,10 +54,10 @@ class HoneypotNoneChecker:
return defer.succeed(credentials.username)
class HoneypotPasswordChecker:
implements(ICredentialsChecker)
"""
Checker that accepts "keyboard-interactive" and "password"
"""
implements(ICredentialsChecker)
credentialInterfaces = (credentials.IUsernamePasswordIP,
credentials.IPluggableAuthenticationModulesIP)

View File

@@ -1,6 +1,10 @@
# Copyright (c) 2009-2014 Upi Tamminen <desaster@gmail.com>
# See the COPYRIGHT file for more information
"""
This module contains ...
"""
import ConfigParser
def readConfigFile(cfgfile):

View File

@@ -26,6 +26,10 @@
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
# SUCH DAMAGE.
"""
This module contains ...
"""
import struct
from twisted.conch.ssh import connection, common

View File

@@ -26,6 +26,10 @@
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
# SUCH DAMAGE.
"""
This module contains ...
"""
from zope.interface import implements
from twisted.cred.credentials import IUsernamePassword, \

View File

@@ -1,6 +1,10 @@
# Copyright (c) 2009-2014 Upi Tamminen <desaster@gmail.com>
# See the COPYRIGHT file for more information
"""
This module contains ...
"""
import re
import time
import abc

View File

@@ -1,6 +1,10 @@
# Copyright (c) 2009-2014 Upi Tamminen <desaster@gmail.com>
# See the COPYRIGHT file for more information
"""
This module contains ...
"""
class NotEnabledException(Exception):
""" Feature not enabled
"""

View File

@@ -1,6 +1,10 @@
# Copyright (c) 2009-2014 Upi Tamminen <desaster@gmail.com>
# See the COPYRIGHT file for more information
"""
This module contains ...
"""
import os
import time
import fnmatch

View File

@@ -1,6 +1,10 @@
# Copyright (c) 2009-2014 Upi Tamminen <desaster@gmail.com>
# See the COPYRIGHT file for more information
"""
This module contains ...
"""
import os
import shlex
import re
@@ -8,7 +12,7 @@ import copy
from twisted.python import log
from . import fs
from cowrie.core import fs
class HoneyPotCommand(object):

View File

@@ -1,12 +1,16 @@
# Copyright (c) 2009-2014 Upi Tamminen <desaster@gmail.com>
# See the COPYRIGHT file for more information
"""
This module contains ...
"""
import time
from twisted.internet import protocol
from twisted.conch import telnet, recvline
from . import ttylog
from cowrie.core import ttylog
class Interact(telnet.Telnet):

View File

@@ -26,6 +26,10 @@
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
# SUCH DAMAGE.
"""
This module contains ...
"""
import abc
import datetime
import re

View File

@@ -1,6 +1,10 @@
# Copyright (c) 2009-2014 Upi Tamminen <desaster@gmail.com>
# See the COPYRIGHT file for more information
"""
This module contains ...
"""
import os
import time
import socket
@@ -12,9 +16,9 @@ from twisted.conch.insults import insults
from twisted.python import log
from twisted.protocols.policies import TimeoutMixin
from . import honeypot
from . import ttylog
from . import utils
from cowrie.core import honeypot
from cowrie.core import ttylog
from cowrie.core import utils
class HoneyPotBaseProtocol(insults.TerminalProtocol, TimeoutMixin):

View File

@@ -26,15 +26,19 @@
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
# SUCH DAMAGE.
"""
This module contains ...
"""
from zope.interface import implements
import twisted
from twisted.conch import interfaces as conchinterfaces
from twisted.python import log
from . import protocol
from . import server
from . import ssh
from cowrie.core import protocol
from cowrie.core import server
from cowrie.core import ssh
import sys
import gc

View File

@@ -26,12 +26,16 @@
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
# SUCH DAMAGE.
"""
This module contains ...
"""
import pickle
import twisted.python.log as log
from . import fs
from . import honeypot
from cowrie.core import fs
from cowrie.core import honeypot
class CowrieServer:
"""

View File

@@ -1,6 +1,10 @@
# Copyright (c) 2009-2014 Upi Tamminen <desaster@gmail.com>
# See the COPYRIGHT file for more information
"""
This module contains ...
"""
import os
import time
import struct
@@ -18,12 +22,12 @@ from twisted.conch.openssh_compat import primes
from twisted.conch.ssh.common import NS, getNS
from twisted.internet import defer
from . import credentials
from . import auth
from . import connection
from . import honeypot
from . import protocol
from . import server
from cowrie.core import credentials
from cowrie.core import auth
from cowrie.core import connection
from cowrie.core import honeypot
from cowrie.core import protocol
from cowrie.core import server
class HoneyPotSSHUserAuthServer(userauth.SSHUserAuthServer):

View File

@@ -3,6 +3,10 @@
# Should be compatible with user mode linux
"""
This module contains ...
"""
import struct
OP_OPEN, OP_CLOSE, OP_WRITE, OP_EXEC = 1, 2, 3, 4

View File

@@ -1,6 +1,10 @@
# Copyright (c) 2010-2014 Upi Tamminen <desaster@gmail.com>
# See the COPYRIGHT file for more information
"""
This module contains ...
"""
def durationHuman(seconds):
seconds = long(round(seconds))
minutes, seconds = divmod(seconds, 60)