Skip to content
Permalink
Browse files

Added create objref from bytes option.

  • Loading branch information...
James Forshaw
James Forshaw committed Sep 30, 2019
1 parent e9ee0a9 commit 9cb7774ae570dbf055e84a8466b8bd704ed8a86d
Showing with 5 additions and 0 deletions.
  1. +5 −0 OleViewDotNet.PowerShell/OleViewDotNet.psm1
@@ -1325,6 +1325,8 @@ function Get-ComObjRef {
[object]$Object,
[Parameter(Mandatory, Position = 0, ParameterSetName = "FromPath")]
[string]$Path,
[Parameter(Mandatory, Position = 0, ParameterSetName = "FromBytes")]
[byte[]]$Bytes,
[ComObjRefOutput]$Output = "Object",
[Parameter(ParameterSetName = "FromObject", ValueFromPipelineByPropertyName)]
[Guid]$Iid = "00000000-0000-0000-C000-000000000046",
@@ -1351,6 +1353,9 @@ function Get-ComObjRef {
"FromPath" {
$ba = Get-Content -Path $Path -Encoding Byte
[OleViewDotNet.COMObjRef]::FromArray($ba) | Out-ObjRef -Output $Output
}
"FromBytes" {
[OleViewDotNet.COMObjRef]::FromArray($Bytes) | Out-ObjRef -Output $Output
}
}
}

0 comments on commit 9cb7774

Please sign in to comment.
You can’t perform that action at this time.