aboutsummaryrefslogtreecommitdiff
path: root/Tests
diff options
context:
space:
mode:
authorJesse Davis <jdalton.davis@gmail.com>2016-01-13 21:02:50 -0600
committerJesse Davis <jdalton.davis@gmail.com>2016-01-13 21:02:50 -0600
commit759bd481ae57e450fd6fb371690014e67411ac98 (patch)
treef5bd5f7e0575758ab9c9f9700d9ce56a2ef6713e /Tests
parentf66e219bd633bfcab96b5f34bfcaf86d3984faaf (diff)
downloadPowerSploit-759bd481ae57e450fd6fb371690014e67411ac98.tar.gz
PowerSploit-759bd481ae57e450fd6fb371690014e67411ac98.zip
Fixed Pester/PassThru
Diffstat (limited to 'Tests')
-rw-r--r--Tests/Exfiltration.tests.ps110
1 files changed, 5 insertions, 5 deletions
diff --git a/Tests/Exfiltration.tests.ps1 b/Tests/Exfiltration.tests.ps1
index baeebb8..064ebfe 100644
--- a/Tests/Exfiltration.tests.ps1
+++ b/Tests/Exfiltration.tests.ps1
@@ -15,10 +15,10 @@ Describe 'Get-Keystrokes' {
$Shell = New-Object -ComObject wscript.shell
$Shell.AppActivate($WindowTitle)
- $KeyLogger = Get-Keystrokes -Return
+ $KeyLogger = Get-Keystrokes -PassThru
Start-Sleep -Seconds 1
- $Shell.SendKeys('Pester is SUPER l337!')
+ $Shell.SendKeys("Pester`b`b`b`b`b`b")
$KeyLogger.Dispose()
It 'Should output to file' { Test-Path "$($env:TEMP)\key.log" | Should Be $true }
@@ -28,7 +28,7 @@ Describe 'Get-Keystrokes' {
It 'Should log all keystrokes' {
$Keys = $KeyObjects | % { $_.TypedKey }
$String = -join $Keys
- $String | Should Be '<Shift>Pester< >is< ><Shift>S<Shift>U<Shift>P<Shift>E<Shift>R< >l337<Shift>!'
+ $String | Should Match 'Pester'
}
It 'Should get foreground window title' {
@@ -40,10 +40,10 @@ Describe 'Get-Keystrokes' {
$KeyTime.GetType().Name | Should Be 'DateTime'
}
- It 'Should stop logging Pester is SUPER l337!after timeout' {
+ It 'Should stop logging after timeout' {
$Timeout = 0.05
- $KeyLogger = Get-Keystrokes -Timeout $Timeout -Return
+ $KeyLogger = Get-Keystrokes -Timeout $Timeout -PassThru
Start-Sleep -Seconds 4