Merge pull request #380 from makikvues/fix-tests-and-logo
Fixed logo, removed long-running checks from tests, create search lists only if necessary
This commit is contained in:
commit
ae37d8f24f
@ -12,7 +12,7 @@ namespace winPEAS.Tests
|
||||
try
|
||||
{
|
||||
string[] args = new string[] {
|
||||
"systeminfo", "servicesinfo", "processinfo", "applicationsinfo", "browserinfo", "debug"
|
||||
"systeminfo", "userinfo", "servicesinfo", "browserinfo", "eventsinfo", "debug"
|
||||
};
|
||||
Program.Main(args);
|
||||
}
|
||||
|
@ -68,6 +68,8 @@ namespace winPEAS.Checks
|
||||
{
|
||||
//Check parameters
|
||||
bool isAllChecks = true;
|
||||
bool isFileSearchEnabled = false;
|
||||
var searchEnabledChecks = new HashSet<string>() { "fileanalysis, filesinfo" };
|
||||
bool wait = false;
|
||||
FileStream fileStream = null;
|
||||
StreamWriter fileWriter = null;
|
||||
@ -202,9 +204,19 @@ namespace winPEAS.Checks
|
||||
{
|
||||
_systemCheckSelectedKeysHashSet.Add(argToLower);
|
||||
isAllChecks = false;
|
||||
|
||||
if (searchEnabledChecks.Contains(argToLower))
|
||||
{
|
||||
isFileSearchEnabled = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (isAllChecks)
|
||||
{
|
||||
isFileSearchEnabled = true;
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
CheckRunner.Run(() =>
|
||||
@ -223,7 +235,7 @@ namespace winPEAS.Checks
|
||||
|
||||
Beaprint.PrintInit();
|
||||
|
||||
CheckRunner.Run(CreateDynamicLists, IsDebug);
|
||||
CheckRunner.Run(() => CreateDynamicLists(isFileSearchEnabled), IsDebug);
|
||||
|
||||
RunChecks(isAllChecks, wait);
|
||||
|
||||
@ -264,7 +276,7 @@ namespace winPEAS.Checks
|
||||
}
|
||||
}
|
||||
|
||||
private static void CreateDynamicLists()
|
||||
private static void CreateDynamicLists(bool isFileSearchEnabled)
|
||||
{
|
||||
Beaprint.GrayPrint(" Creating Dynamic lists, this could take a while, please wait...");
|
||||
|
||||
@ -395,14 +407,22 @@ namespace winPEAS.Checks
|
||||
}
|
||||
|
||||
//create the file lists
|
||||
try
|
||||
// only if we are running all checks or systeminfo / fileanalysis
|
||||
Beaprint.GrayPrint(" - Creating files/directories list for search...");
|
||||
if (isFileSearchEnabled)
|
||||
{
|
||||
Beaprint.GrayPrint(" - Creating files/directories list for search...");
|
||||
SearchHelper.CreateSearchDirectoriesList();
|
||||
try
|
||||
{
|
||||
SearchHelper.CreateSearchDirectoriesList();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Beaprint.GrayPrint("Error while creating directory list: " + ex);
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
else
|
||||
{
|
||||
Beaprint.GrayPrint("Error while creating directory list: " + ex);
|
||||
Beaprint.GrayPrint(" [skipped, file search is disabled]");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -82,7 +82,7 @@ namespace winPEAS.Helpers
|
||||
| {1}Do you like PEASS?{0} |
|
||||
|---------------------------------------------------------------------------------|
|
||||
| {3}Get the latest version{0} : {2}https://github.com/sponsors/carlospolop{0} |
|
||||
| {3}Follow on Twitter{0} : {2}@hacktricks_live{0} |
|
||||
| {3}Follow on Twitter{0} : {2}@hacktricks_live{0} |
|
||||
| {3}Respect on HTB{0} : {2}SirBroccoli {0} |
|
||||
|---------------------------------------------------------------------------------|
|
||||
| {1}Thank you!{0} |
|
||||
|
Loading…
Reference in New Issue
Block a user