rex-powershell 0.1.80 → 0.1.81
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/lib/rex/powershell/output.rb +10 -10
- data/lib/rex/powershell/version.rb +1 -1
- metadata +2 -2
- metadata.gz.sig +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 52aa59edea1a94ba2fc19092005bab64aeac69ea
|
4
|
+
data.tar.gz: 7d565ada14c7580f8848dca04d4966dc2b666191
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: da9f7797acb625600d51a28044d700043d7a219c12f60a289c9b7c312cab5e6852169058bcc06e70fd450c379ad98196800a7c6690cdba579267dc19e175ebfa
|
7
|
+
data.tar.gz: 6d6b7ecc58698b0fcb39a765b15926dfca6dbfa33e398148faffb9d71a122079f24ed613c6821f26981f2802e74bf2edf3c2bac8631e2ad5c81f9ed682dbf6bf
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
Binary file
|
@@ -52,16 +52,16 @@ module Powershell
|
|
52
52
|
|
53
53
|
# Build the powershell expression
|
54
54
|
# Decode base64 encoded command and create a stream object
|
55
|
-
psh_expression = "$s=New-Object IO.MemoryStream(,"
|
56
|
-
psh_expression << "[Convert]::FromBase64String('#{encoded_stream}'));"
|
55
|
+
psh_expression = "$s=New-Object System.IO.MemoryStream(,"
|
56
|
+
psh_expression << "[System.Convert]::FromBase64String('#{encoded_stream}'));"
|
57
57
|
# Read & delete the first two bytes due to incompatibility with MS
|
58
58
|
psh_expression << '$s.ReadByte();'
|
59
59
|
psh_expression << '$s.ReadByte();'
|
60
60
|
# Uncompress and invoke the expression (execute)
|
61
|
-
psh_expression << 'IEX (New-Object IO.StreamReader('
|
62
|
-
psh_expression << 'New-Object IO.Compression.DeflateStream('
|
61
|
+
psh_expression << 'IEX (New-Object System.IO.StreamReader('
|
62
|
+
psh_expression << 'New-Object System.IO.Compression.DeflateStream('
|
63
63
|
psh_expression << '$s,'
|
64
|
-
psh_expression << '[IO.Compression.CompressionMode]::Decompress)'
|
64
|
+
psh_expression << '[System.IO.Compression.CompressionMode]::Decompress)'
|
65
65
|
psh_expression << ')).ReadToEnd();'
|
66
66
|
|
67
67
|
# If eof is set, add a marker to signify end of code output
|
@@ -103,15 +103,15 @@ module Powershell
|
|
103
103
|
|
104
104
|
# Build the powershell expression
|
105
105
|
# Create and execute script lock fed by the IO.StreamReader
|
106
|
-
psh_expression = '&([scriptblock]::create((New-Object IO.StreamReader('
|
106
|
+
psh_expression = '&([scriptblock]::create((New-Object System.IO.StreamReader('
|
107
107
|
# Feed StreamREader from a GzipStream
|
108
|
-
psh_expression << 'New-Object IO.Compression.GzipStream('
|
108
|
+
psh_expression << 'New-Object System.IO.Compression.GzipStream('
|
109
109
|
# GzipStream operates on the Memory Stream
|
110
|
-
psh_expression << '(New-Object IO.MemoryStream(,'
|
110
|
+
psh_expression << '(New-Object System.IO.MemoryStream(,'
|
111
111
|
# MemoryStream consists of base64 encoded compressed data
|
112
|
-
psh_expression << "[Convert]::FromBase64String('#{encoded_stream}')))"
|
112
|
+
psh_expression << "[System.Convert]::FromBase64String('#{encoded_stream}')))"
|
113
113
|
# Set the GzipStream to decompress its MemoryStream contents
|
114
|
-
psh_expression << ',[IO.Compression.CompressionMode]::Decompress)'
|
114
|
+
psh_expression << ',[System.IO.Compression.CompressionMode]::Decompress)'
|
115
115
|
# Read the decoded, decompressed result into scriptblock contents
|
116
116
|
psh_expression << ')).ReadToEnd()))'
|
117
117
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rex-powershell
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.81
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- David 'thelightcosine' Maloney
|
@@ -88,7 +88,7 @@ cert_chain:
|
|
88
88
|
G+Hmcg1v810agasPdoydE0RTVZgEOOMoQ07qu7JFXVWZ9ZQpHT7qJATWL/b2csFG
|
89
89
|
8mVuTXnyJOKRJA==
|
90
90
|
-----END CERTIFICATE-----
|
91
|
-
date: 2019-04-
|
91
|
+
date: 2019-04-22 00:00:00.000000000 Z
|
92
92
|
dependencies:
|
93
93
|
- !ruby/object:Gem::Dependency
|
94
94
|
name: bundler
|
metadata.gz.sig
CHANGED
@@ -1,2 +1,3 @@
|
|
1
|
-
|
2
|
-
�
|
1
|
+
��Q+��W]�.�5u@T|�jBߙ�2���� �Z���B{"�^f�>1̫i�]�c�y;ƈ0�]I�
|
2
|
+
�f��s9>,�}\?��L
|
3
|
+
��x��u×�O��М����2�+2Y�k]<3DӚ��y�$�`
|