diff options
author | Harmj0y <will@harmj0y.net> | 2016-05-13 01:08:03 -0400 |
---|---|---|
committer | Harmj0y <will@harmj0y.net> | 2016-05-13 01:08:03 -0400 |
commit | 7d3f0066ec4558d3625580e12740604b8894f1fe (patch) | |
tree | cf381d89ff363087752ae2efa031f2b3be364081 /Tests/Exfiltration.tests.ps1 | |
parent | 56824c1799cea3471e839c01fcd5a338134f8147 (diff) | |
parent | eec3704f40f457bde6a5c5d1bb7c93c463e2e0ac (diff) | |
download | PowerSploit-7d3f0066ec4558d3625580e12740604b8894f1fe.tar.gz PowerSploit-7d3f0066ec4558d3625580e12740604b8894f1fe.zip |
Merge branch 'dev' of https://github.com/PowerShellMafia/PowerSploit into dev
Diffstat (limited to 'Tests/Exfiltration.tests.ps1')
-rw-r--r-- | Tests/Exfiltration.tests.ps1 | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/Tests/Exfiltration.tests.ps1 b/Tests/Exfiltration.tests.ps1 index e4f60d5..ed98f45 100644 --- a/Tests/Exfiltration.tests.ps1 +++ b/Tests/Exfiltration.tests.ps1 @@ -52,3 +52,34 @@ Describe 'Get-Keystrokes' { Remove-Item -Force "$($env:TEMP)\key.log" } + +Describe "Get-MicrophoneAudio" { + + $RecordPath = "$env:TEMP\test_record.wav" + $RecordLen = 2 + Context 'Successful Recording' { + BeforeEach { + #Ensure the recording as been removed prior to testing + Remove-Item -Path $RecordPath -ErrorAction SilentlyContinue + } + + AfterEach { + #Remove the recording after testing + Remove-Item -Path $RecordPath -ErrorAction SilentlyContinue + } + + It 'should record audio from the microphone and save it to a specified path' { + $result = Get-MicrophoneAudio -Path $RecordPath -Length $RecordLen + $result | Should Not BeNullOrEmpty + $result.Length | Should BeGreaterThan 0 + } + + } + + Context 'Invalid Arguments' { + It 'should not allow invalid paths to be used' { + { Get-MicrophoneAudio -Path "c:\FAKEPATH\yay.wav" -Length RecordLen} | Should Throw + } + } + +} |