mirror of
https://github.com/carlospolop/PEASS-ng
synced 2024-11-24 01:26:22 +01:00
- added ISSUE_TEMPLATE.md
- added null reference checks
This commit is contained in:
parent
24884a1d7e
commit
dbfd0be62e
23
.github/ISSUE_TEMPLATE.md
vendored
Normal file
23
.github/ISSUE_TEMPLATE.md
vendored
Normal file
@ -0,0 +1,23 @@
|
||||
#### Issue description
|
||||
|
||||
|
||||
#### Steps to reproduce the issue
|
||||
|
||||
1.
|
||||
2.
|
||||
3.
|
||||
|
||||
#### clean / obfuscated winpeas?
|
||||
|
||||
|
||||
#### AV / Threat protection used
|
||||
|
||||
|
||||
#### Windows version / build
|
||||
|
||||
|
||||
#### Failing Winpeas check
|
||||
|
||||
|
||||
#### Additional details / screenshot
|
||||
|
@ -139,7 +139,7 @@ namespace winPEAS.Checks
|
||||
|
||||
// get our properties
|
||||
// ref - https://docs.microsoft.com/en-us/windows/win32/api/wuapi/nn-wuapi-iupdatehistoryentry
|
||||
var title = searcherObj.GetType().InvokeMember("Title", BindingFlags.GetProperty, null, item, new object[] { }).ToString();
|
||||
var title = searcherObj.GetType().InvokeMember("Title", BindingFlags.GetProperty, null, item, new object[] { })?.ToString() ?? string.Empty;
|
||||
var date = searcherObj.GetType().InvokeMember("Date", BindingFlags.GetProperty, null, item, new object[] { });
|
||||
var description = searcherObj.GetType().InvokeMember("Description", BindingFlags.GetProperty, null, item, new object[] { });
|
||||
var clientApplicationID = searcherObj.GetType().InvokeMember("ClientApplicationID", BindingFlags.GetProperty, null, item, new object[] { });
|
||||
|
@ -80,12 +80,15 @@ namespace winPEAS.Helpers.AppLocker
|
||||
|
||||
Beaprint.NoColorPrint($" AppLockerPolicy version: {appLockerSettings.Version}\n listing rules:\n\n");
|
||||
|
||||
foreach (var rule in appLockerSettings.RuleCollection)
|
||||
if (appLockerSettings.RuleCollection != null)
|
||||
{
|
||||
PrintFileHashRules(rule);
|
||||
PrintFilePathRules(rule);
|
||||
PrintFilePublisherRules(rule);
|
||||
}
|
||||
foreach (var rule in appLockerSettings.RuleCollection)
|
||||
{
|
||||
PrintFileHashRules(rule);
|
||||
PrintFilePathRules(rule);
|
||||
PrintFilePublisherRules(rule);
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (COMException)
|
||||
{
|
||||
|
@ -143,6 +143,12 @@ namespace winPEAS.Helpers.Registry
|
||||
{
|
||||
myKey = Microsoft.Win32.Registry.CurrentUser.OpenSubKey(path);
|
||||
}
|
||||
|
||||
if (myKey == null)
|
||||
{
|
||||
return new string[0];
|
||||
}
|
||||
|
||||
String[] subkeyNames = myKey.GetSubKeyNames();
|
||||
return myKey.GetSubKeyNames();
|
||||
}
|
||||
|
@ -92,6 +92,12 @@ namespace winPEAS.Info.SystemInfo.SysMon
|
||||
try
|
||||
{
|
||||
var key = registryKey.OpenSubKey(paramsKey);
|
||||
|
||||
if (key == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
byte[] result = (byte[])key.GetValue(val);
|
||||
|
||||
return result;
|
||||
|
@ -90,7 +90,10 @@ namespace winPEAS.Wifi.NativeWifiApi
|
||||
|
||||
~WlanClient()
|
||||
{
|
||||
WlanApi.WlanCloseHandle(clientHandle, IntPtr.Zero);
|
||||
if (clientHandle != IntPtr.Zero)
|
||||
{
|
||||
WlanApi.WlanCloseHandle(clientHandle, IntPtr.Zero);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
Loading…
Reference in New Issue
Block a user