correctly order volshell args

This commit is contained in:
Abyss Watcher
2025-03-12 16:19:08 +01:00
parent ca20b6e979
commit a539047516
3 changed files with 9 additions and 7 deletions
+1 -1
View File
@@ -8,7 +8,7 @@ from test import test_volatility, LinuxSamples
class TestLinuxVolshell:
def test_linux_volshell(self, image, volatility, python):
out = test_volatility.basic_volshell_test(
image, volatility, python, globalargs=("-l",)
image, volatility, python, volshellargs=("-l",)
)
assert out.count(b"<task_struct") > 100
+1 -1
View File
@@ -10,7 +10,7 @@ from test import test_volatility, WindowsSamples
class TestWindowsVolshell:
def test_windows_volshell(self, image, volatility, python):
out = test_volatility.basic_volshell_test(
image, volatility, python, globalargs=("-w",)
image, volatility, python, volshellargs=("-w",)
)
assert out.count(b"<EPROCESS") > 40
+7 -5
View File
@@ -62,9 +62,9 @@ def runvol_plugin(
return runvol(args, volatility, python)
def runvolshell(img, volshell, python, volshellargs=None, globalargs=None):
volshellargs = volshellargs or []
globalargs = globalargs or []
def runvolshell(
img, volshell, python, volshellargs: Tuple = (), globalargs: Tuple = ()
):
args = (
globalargs
+ (
@@ -196,7 +196,9 @@ def count_entries_flat(plugin_json_out: List[dict]):
#
def basic_volshell_test(image, volatility, python, globalargs):
def basic_volshell_test(
image, volatility, python, volshellargs: Tuple = (), globalargs: Tuple = ()
):
# Basic VolShell test to verify requirements and ensure VolShell runs without crashing
volshell_commands = [
@@ -216,7 +218,7 @@ def basic_volshell_test(image, volatility, python, globalargs):
img=image,
volshell=volatility,
python=python,
volshellargs=("--script", filename),
volshellargs=("--script", filename) + volshellargs,
globalargs=globalargs,
)
finally: