mirror of
https://github.com/carlospolop/PEASS-ng
synced 2024-11-24 01:26:22 +01:00
- updates & fixes
This commit is contained in:
parent
7bbe71d290
commit
c2d7f1b5b0
@ -157,12 +157,17 @@ namespace winPEAS.Checks
|
||||
CheckRegANSI();
|
||||
}
|
||||
|
||||
CheckRunner.Run(CreateDynamicLists, IsDebug);
|
||||
Beaprint.PrintInit();
|
||||
|
||||
Beaprint.PrintInit(IsDebug);
|
||||
CheckRunner.Run(CreateDynamicLists, IsDebug);
|
||||
|
||||
RunChecks(isAllChecks, wait);
|
||||
}, IsDebug, "Total time");
|
||||
|
||||
if (IsDebug)
|
||||
{
|
||||
MemoryHelper.DisplayMemoryStats();
|
||||
}
|
||||
}
|
||||
finally
|
||||
{
|
||||
|
@ -282,9 +282,6 @@ namespace winPEAS.Checks
|
||||
}
|
||||
}
|
||||
}
|
||||
//Beaprint.GrayPrint(" This function is not yet implemented.");
|
||||
//Beaprint.InfoPrint("If you want to list saved Wifis connections you can list the using 'netsh wlan show profile'");
|
||||
//Beaprint.InfoPrint("If you want to get the clear-text password use 'netsh wlan show profile <SSID> key=clear'");
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
|
@ -77,7 +77,7 @@ namespace winPEAS.Helpers
|
||||
Thread.Sleep(700);
|
||||
}
|
||||
|
||||
public static void PrintInit(bool isDebug)
|
||||
public static void PrintInit()
|
||||
{
|
||||
if (Checks.Checks.Banner)
|
||||
{
|
||||
@ -87,11 +87,6 @@ namespace winPEAS.Helpers
|
||||
Console.WriteLine(YELLOW + " WinPEAS " + GREEN + Version + NOCOLOR + YELLOW + " by carlospolop, makikvues(sergi.chamila@gmail.com)" + NOCOLOR);
|
||||
Console.WriteLine();
|
||||
|
||||
if (isDebug)
|
||||
{
|
||||
MemoryHelper.DisplayMemoryStats();
|
||||
}
|
||||
|
||||
PrintLegend();
|
||||
Console.WriteLine();
|
||||
LinkPrint("https://book.hacktricks.xyz/windows/checklist-windows-privilege-escalation", "You can find a Windows local PE Checklist here:");
|
||||
|
@ -5,6 +5,7 @@
|
||||
public string Filename { get; set; }
|
||||
public string Extension { get; set; }
|
||||
public string FullPath { get; set; }
|
||||
public bool IsDirectory { get { return string.IsNullOrEmpty(Filename); } }
|
||||
|
||||
public CustomFileInfo(string filename, string extension, string fullPath)
|
||||
{
|
||||
|
@ -203,9 +203,8 @@ namespace winPEAS.Helpers.Search
|
||||
SearchHelper.GroupPolicyHistory.AddRange(groupPolicyHistoryLegacyFiles);
|
||||
}
|
||||
|
||||
internal static List<CustomFileInfo> SearchUserCredsFiles()
|
||||
internal static IEnumerable<CustomFileInfo> SearchUserCredsFiles()
|
||||
{
|
||||
var result = new List<CustomFileInfo>();
|
||||
var patterns = new List<string>
|
||||
{
|
||||
".*credential.*",
|
||||
@ -215,21 +214,24 @@ namespace winPEAS.Helpers.Search
|
||||
foreach (var file in SearchHelper.RootDirUsers)
|
||||
{
|
||||
//string extLower = file.Extension.ToLower();
|
||||
string nameLower = file.Filename.ToLower();
|
||||
// string nameExtLower = nameLower + "." + extLower;
|
||||
|
||||
foreach (var pattern in patterns)
|
||||
if (!file.IsDirectory)
|
||||
{
|
||||
if (Regex.IsMatch(nameLower, pattern, RegexOptions.IgnoreCase))
|
||||
{
|
||||
result.Add(new CustomFileInfo(file.Filename, file.Extension, file.FullPath));
|
||||
string nameLower = file.Filename.ToLower();
|
||||
// string nameExtLower = nameLower + "." + extLower;
|
||||
|
||||
break;
|
||||
foreach (var pattern in patterns)
|
||||
{
|
||||
if (Regex.IsMatch(nameLower, pattern, RegexOptions.IgnoreCase))
|
||||
{
|
||||
yield return file;
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
internal static List<string> SearchUsersInterestingFiles()
|
||||
@ -294,7 +296,7 @@ namespace winPEAS.Helpers.Search
|
||||
"sitelist.xml"
|
||||
};
|
||||
|
||||
var searchFiles = new List<CustomFileInfo>();
|
||||
var searchFiles = new List<CustomFileInfo>();
|
||||
searchFiles.AddRange(SearchHelper.ProgramFiles);
|
||||
searchFiles.AddRange(SearchHelper.ProgramFilesX86);
|
||||
searchFiles.AddRange(SearchHelper.DocumentsAndSettings);
|
||||
|
Loading…
Reference in New Issue
Block a user