mirror of
https://github.com/aljazceru/cowrie.git
synced 2026-01-07 16:24:28 +01:00
keep pylint happy, add empty top docstring, to fill out later
This commit is contained in:
@@ -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>
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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):
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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, \
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
"""
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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):
|
||||
|
||||
|
||||
@@ -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):
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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):
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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:
|
||||
"""
|
||||
|
||||
@@ -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):
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user