Skip to content

Commit a63e9f1

Browse files
committed
Add --remote-isf-url argument to be able mutually exclusive to --offline
1 parent 72abb41 commit a63e9f1

File tree

2 files changed

+20
-2
lines changed

2 files changed

+20
-2
lines changed

volatility3/cli/__init__.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,12 +235,19 @@ def run(self):
235235
default=constants.CACHE_PATH,
236236
type=str,
237237
)
238-
parser.add_argument(
238+
isf_group = parser.add_mutually_exclusive_group()
239+
isf_group.add_argument(
239240
"--offline",
240241
help="Do not search online for additional JSON files",
241242
default=False,
242243
action="store_true",
243244
)
245+
isf_group.add_argument(
246+
"--remote-isf-url",
247+
help="Search online for ISF json files",
248+
default=constants.REMOTE_ISF_URL,
249+
type=str,
250+
)
244251
parser.add_argument(
245252
"--filters",
246253
help="List of filters to apply to the output (in the form of [+-]columname,pattern[!])",
@@ -313,6 +320,8 @@ def run(self):
313320

314321
if partial_args.offline:
315322
constants.OFFLINE = partial_args.offline
323+
elif partial_args.remote_isf_url:
324+
constants.REMOTE_ISF_URL = partial_args.remote_isf_url
316325

317326
# Do the initialization
318327
ctx = contexts.Context() # Construct a blank context

volatility3/cli/volshell/__init__.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,12 +159,19 @@ def run(self):
159159
default=constants.CACHE_PATH,
160160
type=str,
161161
)
162-
parser.add_argument(
162+
isf_group = parser.add_mutually_exclusive_group()
163+
isf_group.add_argument(
163164
"--offline",
164165
help="Do not search online for additional JSON files",
165166
default=False,
166167
action="store_true",
167168
)
169+
isf_group.add_argument(
170+
"--remote-isf-url",
171+
help="Search online for ISF json files",
172+
default=constants.REMOTE_ISF_URL,
173+
type=str,
174+
)
168175

169176
# Volshell specific flags
170177
os_specific = parser.add_mutually_exclusive_group(required=False)
@@ -236,6 +243,8 @@ def run(self):
236243

237244
if partial_args.offline:
238245
constants.OFFLINE = partial_args.offline
246+
elif partial_args.remote_isf_url:
247+
constants.REMOTE_ISF_URL = partial_args.remote_isf_url
239248

240249
# Do the initialization
241250
ctx = contexts.Context() # Construct a blank context

0 commit comments

Comments
 (0)