rex-powershell 0.1.76 → 0.1.77
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 +1 -3
- data/lib/rex/powershell/psh_methods.rb +13 -1
- data/lib/rex/powershell/version.rb +1 -1
- metadata +2 -2
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 766a5b1e5bd8a685cc30702d24ecc26aa4d2329e
|
|
4
|
+
data.tar.gz: 5b33cef8d8d141598fd0ae7c8c9e291f8d1a1eb3
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 950d982a53b4bdc7a94524ec1649e4e3266b8e1aa44afc17a9b0f4591de724681cb0134002d331bdedcc1dc02fdd3e736b9fc3618538339bdcdf7cd560b75d9b
|
|
7
|
+
data.tar.gz: b0d10c2378eab44066315260fe9297e71a26b9dfbde24f8f6c07a50a5d97984077e38c731ff1161f41ea90dbf049c25f1a1b3ae8ed803694d02fb9198af56330
|
checksums.yaml.gz.sig
CHANGED
|
Binary file
|
data.tar.gz.sig
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
module Rex
|
|
4
4
|
module Powershell
|
|
5
5
|
##
|
|
6
|
-
# Convenience methods for generating
|
|
6
|
+
# Convenience methods for generating Powershell code in Ruby
|
|
7
7
|
##
|
|
8
8
|
|
|
9
9
|
module PshMethods
|
|
@@ -19,6 +19,18 @@ module Powershell
|
|
|
19
19
|
%Q^(new-object System.Net.WebClient).DownloadFile('#{src}', '#{target}')^
|
|
20
20
|
end
|
|
21
21
|
|
|
22
|
+
#
|
|
23
|
+
# Download file via .NET WebClient and execute it afterwards
|
|
24
|
+
#
|
|
25
|
+
# @param src [String] URL to the file
|
|
26
|
+
# @param target [String] Location to save the file
|
|
27
|
+
#
|
|
28
|
+
# @return [String] Powershell code to download a file
|
|
29
|
+
def self.download_run(src, target)
|
|
30
|
+
target ||= '$pwd\\' << src.split('/').last
|
|
31
|
+
%Q^$z="#{target}"; (new-object System.Net.WebClient).DownloadFile('#{src}', $z); invoke-item $z^
|
|
32
|
+
end
|
|
33
|
+
|
|
22
34
|
#
|
|
23
35
|
# Uninstall app, or anything named like app
|
|
24
36
|
#
|
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.77
|
|
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: 2017-
|
|
91
|
+
date: 2017-10-03 00:00:00.000000000 Z
|
|
92
92
|
dependencies:
|
|
93
93
|
- !ruby/object:Gem::Dependency
|
|
94
94
|
name: bundler
|
metadata.gz.sig
CHANGED
|
Binary file
|