mirror of
https://github.com/volatilityfoundation/volatility3.git
synced 2026-09-03 07:48:43 +02:00
Add --remote-isf-url argument to be able mutually exclusive to --offline
This commit is contained in:
@@ -235,12 +235,19 @@ class CommandLine:
|
||||
default=constants.CACHE_PATH,
|
||||
type=str,
|
||||
)
|
||||
parser.add_argument(
|
||||
isf_group = parser.add_mutually_exclusive_group()
|
||||
isf_group.add_argument(
|
||||
"--offline",
|
||||
help="Do not search online for additional JSON files",
|
||||
default=False,
|
||||
action="store_true",
|
||||
)
|
||||
isf_group.add_argument(
|
||||
"--remote-isf-url",
|
||||
help="Search online for ISF json files",
|
||||
default=constants.REMOTE_ISF_URL,
|
||||
type=str,
|
||||
)
|
||||
parser.add_argument(
|
||||
"--filters",
|
||||
help="List of filters to apply to the output (in the form of [+-]columname,pattern[!])",
|
||||
@@ -313,6 +320,8 @@ class CommandLine:
|
||||
|
||||
if partial_args.offline:
|
||||
constants.OFFLINE = partial_args.offline
|
||||
elif partial_args.remote_isf_url:
|
||||
constants.REMOTE_ISF_URL = partial_args.remote_isf_url
|
||||
|
||||
# Do the initialization
|
||||
ctx = contexts.Context() # Construct a blank context
|
||||
|
||||
@@ -159,12 +159,19 @@ class VolShell(cli.CommandLine):
|
||||
default=constants.CACHE_PATH,
|
||||
type=str,
|
||||
)
|
||||
parser.add_argument(
|
||||
isf_group = parser.add_mutually_exclusive_group()
|
||||
isf_group.add_argument(
|
||||
"--offline",
|
||||
help="Do not search online for additional JSON files",
|
||||
default=False,
|
||||
action="store_true",
|
||||
)
|
||||
isf_group.add_argument(
|
||||
"--remote-isf-url",
|
||||
help="Search online for ISF json files",
|
||||
default=constants.REMOTE_ISF_URL,
|
||||
type=str,
|
||||
)
|
||||
|
||||
# Volshell specific flags
|
||||
os_specific = parser.add_mutually_exclusive_group(required=False)
|
||||
@@ -236,6 +243,8 @@ class VolShell(cli.CommandLine):
|
||||
|
||||
if partial_args.offline:
|
||||
constants.OFFLINE = partial_args.offline
|
||||
elif partial_args.remote_isf_url:
|
||||
constants.REMOTE_ISF_URL = partial_args.remote_isf_url
|
||||
|
||||
# Do the initialization
|
||||
ctx = contexts.Context() # Construct a blank context
|
||||
|
||||
Reference in New Issue
Block a user