Skip to content

Commit 11a1ebc

Browse files
committed
glob_ext on SharePoint version
1 parent 8f2bb24 commit 11a1ebc

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

acquire/acquire.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -866,10 +866,13 @@ class SPSE(Module):
866866
@classmethod
867867
def get_spec_additions(cls, target: Target, cli_args: argparse.Namespace) -> Iterator[tuple]:
868868
spec = set()
869-
key = "HKLM\\SOFTWARE\\Microsoft\\Shared Tools\\Web Server Extensions\\16.0\\WSS"
869+
key = "HKLM\\SOFTWARE\\Microsoft\\Shared Tools\\Web Server Extensions\\*\\WSS*"
870870

871-
for reg_key in target.registry.keys(key):
872-
spec.add(("path", reg_key.value("LogDir").value))
871+
for reg_key in target.registry.glob_ext(key):
872+
try:
873+
spec.add(("path", reg_key.value("LogDir").value))
874+
except Exception:
875+
pass
873876

874877
return spec
875878

0 commit comments

Comments
 (0)