mirror of
https://github.com/volatilityfoundation/volatility3.git
synced 2026-09-03 08:18:52 +02:00
correctly order volshell args
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user