Fixed export parsing bug in Get-PEHeader

This commit is contained in:
Matt Graeber
2013-03-10 14:14:11 -04:00
parent 60c49734df
commit 4f7e59c5a7
+1 -1
View File
@@ -751,7 +751,7 @@ $code = @"
$Result['Ordinal'] = "0x$(($Key + $Base).ToString('X4'))"
# Uncomment this after I somehow manage to implement the RVA for the imports
# $Result['RVA'] = "0x$($FunctionHashTable[$Key].ToString('X8'))"
$Result['VA'] = "0x$(($FunctionHashTable[$Key] + $PEBaseAddr).ToString("X$([IntPtr]::Size*2)"))"
$Result['VA'] = "0x$(($FunctionHashTable[$Key] + $PEBaseAddr.ToInt64()).ToString("X$([IntPtr]::Size*2)"))"
$Export = New-Object PSObject -Property $Result
$Export.PSObject.TypeNames.Insert(0, 'Export')