diff options
author | Chris Campbell <obscuresec@gmail.com> | 2013-07-03 22:15:05 -0400 |
---|---|---|
committer | Chris Campbell <obscuresec@gmail.com> | 2013-07-03 22:15:05 -0400 |
commit | 2f28a290745c0ab216cbddf036175f8b44a6e611 (patch) | |
tree | 4597854529816ef945539096612cbe80604a0173 | |
parent | 321e53ee236c7271594f3be769890cc711b40309 (diff) | |
download | PowerSploit-2f28a290745c0ab216cbddf036175f8b44a6e611.tar.gz PowerSploit-2f28a290745c0ab216cbddf036175f8b44a6e611.zip |
Update Get-TimedScreenshot.ps1
Fix error handling and various style problems
-rw-r--r-- | Exfiltration/Get-TimedScreenshot.ps1 | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Exfiltration/Get-TimedScreenshot.ps1 b/Exfiltration/Get-TimedScreenshot.ps1 index e1c44d0..c14c723 100644 --- a/Exfiltration/Get-TimedScreenshot.ps1 +++ b/Exfiltration/Get-TimedScreenshot.ps1 @@ -50,7 +50,7 @@ https://github.com/mattifestation/PowerSploit/blob/master/Exfiltration/Get-Timed )
#Define helper function that generates and saves screenshot
- Function GenScreenshot {
+ Function Get-Screenshot {
$ScreenBounds = [Windows.Forms.SystemInformation]::VirtualScreen
$ScreenshotObject = New-Object Drawing.Bitmap $ScreenBounds.Width, $ScreenBounds.Height
$DrawingGraphics = [Drawing.Graphics]::FromImage($ScreenshotObject)
@@ -86,7 +86,7 @@ https://github.com/mattifestation/PowerSploit/blob/master/Exfiltration/Get-Timed [String] $FilePath = (Join-Path $Path $FileName)
#run screenshot function
- GenScreenshot
+ Get-Screenshot
Write-Verbose "Saved screenshot to $FilePath. Sleeping for $Interval seconds"
@@ -94,8 +94,8 @@ https://github.com/mattifestation/PowerSploit/blob/master/Exfiltration/Get-Timed }
#note that this will run once regardless if the specified time as passed
- While ((Get-Date -Format HH:%m) -lt $EndTime)
+ While ((Get-Date -Format HH:mm) -lt $EndTime)
}
- Catch {Write-Warning "$Error[0].ToString() + $Error[0].InvocationInfo.PositionMessage"}
-}
\ No newline at end of file + Catch {Write-Error $Error[0].ToString() + $Error[0].InvocationInfo.PositionMessage}
+}
|