diff options
author | PowerShellMafia <PowerShellMafia@users.noreply.github.com> | 2015-12-18 16:33:59 -0800 |
---|---|---|
committer | PowerShellMafia <PowerShellMafia@users.noreply.github.com> | 2015-12-18 16:33:59 -0800 |
commit | 9e771d15bf19ab3c2ac196393c088ecdab6c9a73 (patch) | |
tree | 58927893ecb9289ad1de64d3a67eb58d00e4b762 /Exfiltration/Get-Keystrokes.ps1 | |
parent | 9f78286ea7b0ec65d2aa09893a076864dd8d14e9 (diff) | |
parent | 9f183e36518176c4299eed5c68b7deac7f4e8025 (diff) | |
download | PowerSploit-3.0.0.tar.gz PowerSploit-3.0.0.zip |
Merge pull request #102 from PowerShellMafia/devv3.0.0
Merge 3.0 release changes
Diffstat (limited to 'Exfiltration/Get-Keystrokes.ps1')
-rw-r--r-- | Exfiltration/Get-Keystrokes.ps1 | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/Exfiltration/Get-Keystrokes.ps1 b/Exfiltration/Get-Keystrokes.ps1 index 8beaf75..d040589 100644 --- a/Exfiltration/Get-Keystrokes.ps1 +++ b/Exfiltration/Get-Keystrokes.ps1 @@ -12,12 +12,16 @@ function Get-Keystrokes { .PARAMETER LogPath - Specifies the path where pressed key details will be logged. By default, keystrokes are logged to '$($Env:TEMP)\key.log'. + Specifies the path where pressed key details will be logged. By default, keystrokes are logged to %TEMP%\key.log. .PARAMETER CollectionInterval Specifies the interval in minutes to capture keystrokes. By default, keystrokes are captured indefinitely. +.PARAMETER PollingInterval + + Specifies the time in milliseconds to wait between calls to GetAsyncKeyState. Defaults to 40 milliseconds. + .EXAMPLE Get-Keystrokes -LogPath C:\key.log @@ -26,6 +30,10 @@ function Get-Keystrokes { Get-Keystrokes -CollectionInterval 20 +.EXAMPLE + + Get-Keystrokes -PollingInterval 35 + .LINK http://www.obscuresec.com/ @@ -39,7 +47,11 @@ function Get-Keystrokes { [Parameter(Position = 1)] [UInt32] - $CollectionInterval + $CollectionInterval, + + [Parameter(Position = 2)] + [Int32] + $PollingInterval = 40 ) $LogPath = Join-Path (Resolve-Path (Split-Path -Parent $LogPath)) (Split-Path -Leaf $LogPath) @@ -139,7 +151,7 @@ function Get-Keystrokes { $ImportDll = $TypeBuilder.CreateType() } - Start-Sleep -Milliseconds 40 + Start-Sleep -Milliseconds $PollingInterval try { |