- fixed logo
- updated tests, long-running checks are removed - create search lists only if necessary
This commit is contained in:
parent
667bb5220d
commit
78d187db52
@ -12,7 +12,7 @@ namespace winPEAS.Tests
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
string[] args = new string[] {
|
string[] args = new string[] {
|
||||||
"systeminfo", "servicesinfo", "processinfo", "applicationsinfo", "browserinfo", "debug"
|
"systeminfo", "userinfo", "servicesinfo", "browserinfo", "eventsinfo", "debug"
|
||||||
};
|
};
|
||||||
Program.Main(args);
|
Program.Main(args);
|
||||||
}
|
}
|
||||||
|
@ -68,6 +68,8 @@ namespace winPEAS.Checks
|
|||||||
{
|
{
|
||||||
//Check parameters
|
//Check parameters
|
||||||
bool isAllChecks = true;
|
bool isAllChecks = true;
|
||||||
|
bool isFileSearchEnabled = false;
|
||||||
|
var searchEnabledChecks = new HashSet<string>() { "fileanalysis, filesinfo" };
|
||||||
bool wait = false;
|
bool wait = false;
|
||||||
FileStream fileStream = null;
|
FileStream fileStream = null;
|
||||||
StreamWriter fileWriter = null;
|
StreamWriter fileWriter = null;
|
||||||
@ -202,9 +204,19 @@ namespace winPEAS.Checks
|
|||||||
{
|
{
|
||||||
_systemCheckSelectedKeysHashSet.Add(argToLower);
|
_systemCheckSelectedKeysHashSet.Add(argToLower);
|
||||||
isAllChecks = false;
|
isAllChecks = false;
|
||||||
|
|
||||||
|
if (searchEnabledChecks.Contains(argToLower))
|
||||||
|
{
|
||||||
|
isFileSearchEnabled = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (isAllChecks)
|
||||||
|
{
|
||||||
|
isFileSearchEnabled = true;
|
||||||
|
}
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
CheckRunner.Run(() =>
|
CheckRunner.Run(() =>
|
||||||
@ -223,7 +235,7 @@ namespace winPEAS.Checks
|
|||||||
|
|
||||||
Beaprint.PrintInit();
|
Beaprint.PrintInit();
|
||||||
|
|
||||||
CheckRunner.Run(CreateDynamicLists, IsDebug);
|
CheckRunner.Run(() => CreateDynamicLists(isFileSearchEnabled), IsDebug);
|
||||||
|
|
||||||
RunChecks(isAllChecks, wait);
|
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...");
|
Beaprint.GrayPrint(" Creating Dynamic lists, this could take a while, please wait...");
|
||||||
|
|
||||||
@ -395,14 +407,22 @@ namespace winPEAS.Checks
|
|||||||
}
|
}
|
||||||
|
|
||||||
//create the file lists
|
//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...");
|
try
|
||||||
SearchHelper.CreateSearchDirectoriesList();
|
{
|
||||||
|
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} |
|
| {1}Do you like PEASS?{0} |
|
||||||
|---------------------------------------------------------------------------------|
|
|---------------------------------------------------------------------------------|
|
||||||
| {3}Get the latest version{0} : {2}https://github.com/sponsors/carlospolop{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} |
|
| {3}Respect on HTB{0} : {2}SirBroccoli {0} |
|
||||||
|---------------------------------------------------------------------------------|
|
|---------------------------------------------------------------------------------|
|
||||||
| {1}Thank you!{0} |
|
| {1}Thank you!{0} |
|
||||||
|
Loading…
Reference in New Issue
Block a user