Skip to content

Commit cd97980

Browse files
authored
Merge pull request #1285 from gcmoreira/remote_isf_url
Add --remote-isf-url argument to be able to use a remote ISF server from the command-line arguments
2 parents c67f2e5 + a64813b commit cd97980

File tree

2 files changed

+24
-2
lines changed

2 files changed

+24
-2
lines changed

volatility3/cli/__init__.py

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,12 +235,21 @@ 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+
"-u",
247+
"--remote-isf-url",
248+
metavar="URL",
249+
help="Search online for ISF json files",
250+
default=constants.REMOTE_ISF_URL,
251+
type=str,
252+
)
244253
parser.add_argument(
245254
"--filters",
246255
help="List of filters to apply to the output (in the form of [+-]columname,pattern[!])",
@@ -313,6 +322,8 @@ def run(self):
313322

314323
if partial_args.offline:
315324
constants.OFFLINE = partial_args.offline
325+
elif partial_args.remote_isf_url:
326+
constants.REMOTE_ISF_URL = partial_args.remote_isf_url
316327

317328
# Do the initialization
318329
ctx = contexts.Context() # Construct a blank context

volatility3/cli/volshell/__init__.py

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,12 +159,21 @@ 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+
"-u",
171+
"--remote-isf-url",
172+
metavar="URL",
173+
help="Search online for ISF json files",
174+
default=constants.REMOTE_ISF_URL,
175+
type=str,
176+
)
168177

169178
# Volshell specific flags
170179
os_specific = parser.add_mutually_exclusive_group(required=False)
@@ -236,6 +245,8 @@ def run(self):
236245

237246
if partial_args.offline:
238247
constants.OFFLINE = partial_args.offline
248+
elif partial_args.remote_isf_url:
249+
constants.REMOTE_ISF_URL = partial_args.remote_isf_url
239250

240251
# Do the initialization
241252
ctx = contexts.Context() # Construct a blank context

0 commit comments

Comments
 (0)