forked from p34709852/monkey
Island: Use relative imports inside encryption package
This commit is contained in:
parent
f65251ddde
commit
5aa0506ce1
|
@ -3,13 +3,10 @@ from typing import Union
|
|||
|
||||
from Crypto import Random # noqa: DUO133 # nosec: B413
|
||||
|
||||
from monkey_island.cc.server_utils.encryption import (
|
||||
IEncryptor,
|
||||
KeyBasedEncryptor,
|
||||
PasswordBasedBytesEncryptor,
|
||||
)
|
||||
from monkey_island.cc.server_utils.file_utils import open_new_securely_permissioned_file
|
||||
|
||||
from .encryptors import IEncryptor, KeyBasedEncryptor, PasswordBasedBytesEncryptor
|
||||
|
||||
_KEY_FILENAME = "mongo_key.bin"
|
||||
_BLOCK_SIZE = 32
|
||||
|
||||
|
|
|
@ -3,9 +3,7 @@ from typing import Callable, List, Type
|
|||
|
||||
import dpath.util
|
||||
|
||||
from monkey_island.cc.server_utils.encryption.dict_encryption.field_encryptors import (
|
||||
IFieldEncryptor,
|
||||
)
|
||||
from .field_encryptors import IFieldEncryptor
|
||||
|
||||
|
||||
class FieldNotFoundError(Exception):
|
||||
|
|
|
@ -1,9 +1,7 @@
|
|||
import logging
|
||||
|
||||
from monkey_island.cc.server_utils.encryption import get_datastore_encryptor
|
||||
from monkey_island.cc.server_utils.encryption.dict_encryption.field_encryptors import (
|
||||
IFieldEncryptor,
|
||||
)
|
||||
from ... import get_datastore_encryptor
|
||||
from . import IFieldEncryptor
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
|
|
@ -1,9 +1,7 @@
|
|||
from typing import List
|
||||
|
||||
from monkey_island.cc.server_utils.encryption import get_datastore_encryptor
|
||||
from monkey_island.cc.server_utils.encryption.dict_encryption.field_encryptors import (
|
||||
IFieldEncryptor,
|
||||
)
|
||||
from ... import get_datastore_encryptor
|
||||
from . import IFieldEncryptor
|
||||
|
||||
|
||||
class StringListEncryptor(IFieldEncryptor):
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
from .i_encryptor import IEncryptor
|
||||
from .key_based_encryptor import KeyBasedEncryptor
|
||||
from .password_based_string_encryptor import PasswordBasedStringEncryptor
|
||||
from .password_based_bytes_encryptor import PasswordBasedBytesEncryptor
|
|
@ -7,7 +7,7 @@ from Crypto import Random # noqa: DUO133 # nosec: B413
|
|||
from Crypto.Cipher import AES # noqa: DUO133 # nosec: B413
|
||||
from Crypto.Util import Padding # noqa: DUO133
|
||||
|
||||
from monkey_island.cc.server_utils.encryption import IEncryptor
|
||||
from .i_encryptor import IEncryptor
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@ import logging
|
|||
|
||||
import pyAesCrypt
|
||||
|
||||
from monkey_island.cc.server_utils.encryption import IEncryptor
|
||||
from .i_encryptor import IEncryptor
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
|
|
@ -3,10 +3,8 @@ import logging
|
|||
|
||||
import pyAesCrypt
|
||||
|
||||
from monkey_island.cc.server_utils.encryption import IEncryptor
|
||||
from monkey_island.cc.server_utils.encryption.encryptors.password_based_bytes_encryptor import (
|
||||
PasswordBasedBytesEncryptor,
|
||||
)
|
||||
from .i_encryptor import IEncryptor
|
||||
from .password_based_bytes_encryptor import PasswordBasedBytesEncryptor
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
|
Loading…
Reference in New Issue