fix: unused options in redis fix: compatibility between python 2-3 fix: forgot vars declarations fix: carry conditions in listing redis keys fix: listing redis list keys fix: removed duplicated tasks when they are listed fix: index number when redis DB are listed fix: some error levels in log fix: renamed *proc* -> *tasks* files fix: added the process manager backend for 'tasks' options, thinking in future to add new process managers
47 lines
2.0 KiB
Python
47 lines
2.0 KiB
Python
# -*- coding: utf-8 -*-
|
|
|
|
"""
|
|
This file contains command line actions for argparser
|
|
"""
|
|
|
|
|
|
# ----------------------------------------------------------------------
|
|
def parser_redis_dump(parser):
|
|
"""
|
|
Dump all redis database information
|
|
"""
|
|
gr = parser.add_argument_group("custom raw dump options")
|
|
gr.add_argument("--no-screen", action="store_true", dest="no_screen", default=False,
|
|
help="do not show displays raw database info into screen")
|
|
gr.add_argument("-e", "--export-results", dest="export_results",
|
|
help="export dumped information results")
|
|
|
|
|
|
# ----------------------------------------------------------------------
|
|
def parser_redis_server_disconnect(parser):
|
|
gr = parser.add_argument_group("custom disconnect options")
|
|
|
|
gr.add_argument("-c", action="store", dest="client", help="user to disconnect")
|
|
gr.add_argument("--all", action="store_true", dest="disconnect_all", default=False,
|
|
help="disconnect all users")
|
|
|
|
|
|
# ----------------------------------------------------------------------
|
|
def parser_redis_server_cache_poison(parser):
|
|
gr = parser.add_argument_group("custom poison options")
|
|
|
|
gr.add_argument("--search", action="store_true", dest="search_cache", default=False,
|
|
help="try to find cache info stored in Redis")
|
|
gr.add_argument("--cache-key", action="store", dest="cache_key",
|
|
help="try to poisoning using selected key")
|
|
|
|
payload = parser.add_argument_group("payloads options")
|
|
payload.add_argument("-P", "--poison", action="store_true", dest="poison", default=False,
|
|
help="enables cache poisoning")
|
|
payload.add_argument("--payload", action="store", dest="poison_payload",
|
|
help="try inject cmd inline payload")
|
|
payload.add_argument("--file-payload", action="store", dest="poison_payload_file",
|
|
help="try inject selected payload reading from a file")
|
|
payload.add_argument("--replace-html", action="store", dest="new_html",
|
|
help="replace cache content with selected file content")
|