1
mirror of https://github.com/carlospolop/PEASS-ng synced 2024-11-20 12:39:21 +01:00

Better error handling in FileAnalysis

The previous specific check doesn't handle the following exception, causing it to be catched by the last try/catch block.

Error looking for regexes inside files: System.AggregateException: One or more errors occurred. ---> System.UnauthorizedAccessException: Access to the path '<REDACTED>' is denied.
This commit is contained in:
Signum21 2023-11-28 00:38:13 +01:00 committed by GitHub
parent 31aed5cd92
commit 340256b3b3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -444,7 +444,7 @@ namespace winPEAS.Checks
foundRegexes[regex_obj.name][regex.name] = fileResults;
}
}
catch (System.IO.IOException)
catch (Exception ex)
{
// Cannot read the file
}