Skip to content

Commit 2199375

Browse files
committed
Tests: Add symlinkscan specific test
1 parent 32e9cee commit 2199375

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

test/plugins/windows/windows.py

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -758,6 +758,38 @@ def test_windows_generic_symlinkscan(self, volatility, python, image):
758758
assert rc == 0
759759
assert test_volatility.count_entries_flat(json.loads(out)) > 0
760760

761+
def test_windows_specific_symlinkscan(self, volatility, python):
762+
image = WindowsSamples.WINDOWSXP_GENERIC.value.path
763+
rc, out, _err = test_volatility.runvol_plugin(
764+
"windows.symlinkscan.SymlinkScan",
765+
image,
766+
volatility,
767+
python,
768+
globalargs=("-r", "json"),
769+
)
770+
assert rc == 0
771+
json_out = json.loads(out)
772+
assert test_volatility.count_entries_flat(json_out) > 5
773+
expected_rows = [
774+
{
775+
"CreateTime": "2005-06-25T16:47:28+00:00",
776+
"From Name": "AUX",
777+
"Offset": 453082584,
778+
"To Name": "\\DosDevices\\COM1",
779+
"__children": []
780+
},
781+
{
782+
"CreateTime": "2005-06-25T16:47:28+00:00",
783+
"From Name": "UNC",
784+
"Offset": 453176664,
785+
"To Name": "\\Device\\Mup",
786+
"__children": []
787+
}
788+
]
789+
790+
for expected_row in expected_rows:
791+
assert test_volatility.match_output_row(expected_row, json_out)
792+
761793

762794
class TestWindowsLdrModules:
763795
def test_windows_specific_ldrmodules(self, volatility, python):

0 commit comments

Comments
 (0)