Merge pull request #97 from Dfte/fixsamdumperror

Fix SAM dump error when remote registry is disabled OR EDR blocks it
This commit is contained in:
Login Securite 2024-10-28 14:58:17 +01:00 committed by GitHub
commit 9e55820bc2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -268,7 +268,7 @@ class DonPAPICore:
# Dump SAM
self.logger.display("Dumping SAM")
self.dump_sam()
if self.sam_dump.items_found:
if hasattr(self.sam_dump, "items_found") and self.sam_dump.items_found is not None:
self.logger.secret(f"Got {len(self.sam_dump.items_found)} accounts", "SAM")
else:
self.logger.fail(f"No account found in SAM (maybe blocked by EDR)")