rex-powershell 0.1.76 → 0.1.77

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d80db88d42b0fd94ed98cd51c75f5fb60ac8acdf
4
- data.tar.gz: 836db80b5f1720386c7cc55965680b54bc92fb8c
3
+ metadata.gz: 766a5b1e5bd8a685cc30702d24ecc26aa4d2329e
4
+ data.tar.gz: 5b33cef8d8d141598fd0ae7c8c9e291f8d1a1eb3
5
5
  SHA512:
6
- metadata.gz: 394b71cc613c8ff3dee940f1261e4bed2aff4aefda0b26b94db2bb2efea5e0d743b9385f9e1a467e88f6533b681ef8f325caef462a9ba3382e34723fcdf02874
7
- data.tar.gz: c17e1e404b766e86e37c974d914a328d3d5d5f98934add9e0f0dc9e8eb9faeb2fc3d94fee8ae017227c6de00a9e205144f783df7cd0d2bc4fb241a77b28f9160
6
+ metadata.gz: 950d982a53b4bdc7a94524ec1649e4e3266b8e1aa44afc17a9b0f4591de724681cb0134002d331bdedcc1dc02fdd3e736b9fc3618538339bdcdf7cd560b75d9b
7
+ data.tar.gz: b0d10c2378eab44066315260fe9297e71a26b9dfbde24f8f6c07a50a5d97984077e38c731ff1161f41ea90dbf049c25f1a1b3ae8ed803694d02fb9198af56330
Binary file
data.tar.gz.sig CHANGED
@@ -1,3 +1 @@
1
- Pd�^��,hi �p��KsЂV��hU�~y{r�Cj� ��E3Q�&�(��Zo,�8�;� 6�4����2v��{�
2
- �[(��x��H��1��b�:X���!�-��}QX(3��Z|ᐼ�s�](���}�NA�o�p��w�k
3
- y_ -/��K��
1
+ ^}9w����4#�)�ꑗ�nTm1x(p@��6J6"x)s� �����'qfk���D'�x��"z��ij�/����f�&�p���3קP�?�Nj,��^+v��U�\�d;�s]��R�_0E4(h����u?����V
@@ -3,7 +3,7 @@
3
3
  module Rex
4
4
  module Powershell
5
5
  ##
6
- # Convenience methods for generating powershell code in Ruby
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
  #
@@ -1,5 +1,5 @@
1
1
  module Rex
2
2
  module Powershell
3
- VERSION = "0.1.76"
3
+ VERSION = "0.1.77"
4
4
  end
5
5
  end
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.76
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-09-23 00:00:00.000000000 Z
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