Skip to content
This repository was archived by the owner on Jan 21, 2021. It is now read-only.

Commit 6e5338c

Browse files
author
Matt Graeber
committed
Fixed architecture detection bug in Get-PEB
I was checking processor architecture when I should have been checking OS architecture.
1 parent 9b4b3dc commit 6e5338c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ReverseEngineering/Get-PEB.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ http://msdn.microsoft.com/en-us/library/windows/desktop/aa813706(v=vs.85).aspx
174174
return
175175
}
176176

177-
$OSArchitecture = (Get-WmiObject Win32_Processor).DataWidth
177+
$OSArchitecture = [Int](Get-WmiObject Win32_OperatingSystem).OSArchitecture.Split('-')[0]
178178

179179
try { $NativeUtils = [NativeUtils] } catch [Management.Automation.RuntimeException] # Only build the assembly if it hasn't already been defined
180180
{

0 commit comments

Comments
 (0)