From 4f7ae8db9535fc5c1642cec0cf1299ff3f7fcf89 Mon Sep 17 00:00:00 2001 From: cr0hn Date: Tue, 16 Feb 2016 17:31:03 +0100 Subject: [PATCH] Minor fixes --- enteletaor_lib/modules/redis/__init__.py | 7 ++++++- enteletaor_lib/modules/redis/redis_dump.py | 2 ++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/enteletaor_lib/modules/redis/__init__.py b/enteletaor_lib/modules/redis/__init__.py index d0d1693..60676e1 100644 --- a/enteletaor_lib/modules/redis/__init__.py +++ b/enteletaor_lib/modules/redis/__init__.py @@ -11,6 +11,7 @@ from .redis_dump import action_redis_dump from .redis_info import action_redis_server_info from .redis_clients import action_redis_server_connected from .redis_disconnect import action_redis_server_disconnect +from .redis_shell import action_redis_shell log = logging.getLogger() @@ -37,7 +38,7 @@ class RedisModule(IModule): action=action_redis_dump ), 'info': dict( - help="open a remote shell through Redis server", + help="open a remote shell through the Redis server", action=action_redis_server_info ), 'connected': dict( @@ -49,6 +50,10 @@ class RedisModule(IModule): cmd_args=parser_redis_server_disconnect, action=action_redis_server_disconnect ), + # 'shell': dict( + # help="open a remote os shell through the Redis server", + # action=action_redis_shell + # ), } name = "redis" diff --git a/enteletaor_lib/modules/redis/redis_dump.py b/enteletaor_lib/modules/redis/redis_dump.py index e0509b0..2dae9ab 100644 --- a/enteletaor_lib/modules/redis/redis_dump.py +++ b/enteletaor_lib/modules/redis/redis_dump.py @@ -6,10 +6,12 @@ import pprint log = logging.getLogger() + def dump_keys(con): for key in con.keys('*'): key_type = con.type(key).lower() + val = None if key_type == b"kv": val = con.get(key) if key_type == b"hash":