Skip to content

Commit 4c5fd78

Browse files
committed
Land rapid7#7005, rm the crap out of lib/rex
And stuff the code into gems!
2 parents 9f280d7 + 18f6d21 commit 4c5fd78

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+35
-6269
lines changed

Gemfile.lock

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,11 @@ PATH
2828
rb-readline-r7
2929
recog
3030
redcarpet
31+
rex-powershell
32+
rex-random_identifier
33+
rex-registry
34+
rex-text
35+
rex-zip
3136
robots
3237
rubyzip
3338
sqlite3
@@ -204,6 +209,15 @@ GEM
204209
recog (2.0.21)
205210
nokogiri
206211
redcarpet (3.3.4)
212+
rex-powershell (0.1.0)
213+
rex-random_identifier
214+
rex-text
215+
rex-random_identifier (0.1.0)
216+
rex-text
217+
rex-registry (0.1.0)
218+
rex-text (0.1.1)
219+
rex-zip (0.1.0)
220+
rex-text
207221
rkelly-remix (0.0.6)
208222
robots (0.10.1)
209223
rspec-core (3.4.4)
@@ -242,7 +256,7 @@ GEM
242256
timecop (0.8.1)
243257
tzinfo (1.2.2)
244258
thread_safe (~> 0.1)
245-
tzinfo-data (1.2016.4)
259+
tzinfo-data (1.2016.5)
246260
tzinfo (>= 1.0.0)
247261
xpath (2.0.0)
248262
nokogiri (~> 1.3)

lib/msf/base/simple/buffer.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ def self.transform(buf, fmt = "ruby", var_name = 'buf')
4848
when 'java'
4949
buf = Rex::Text.to_java(buf, var_name)
5050
when 'powershell', 'ps1'
51-
buf = Rex::Text.to_powershell(buf, var_name)
51+
buf = Rex::Powershell.to_powershell(buf, var_name)
5252
when 'vbscript'
5353
buf = Rex::Text.to_vbscript(buf, var_name)
5454
when 'vbapplication'

lib/msf/util/exe.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ class EXE
1313
require 'rex'
1414
require 'rex/peparsey'
1515
require 'rex/pescan'
16-
require 'rex/random_identifier_generator'
16+
require 'rex/random_identifier'
1717
require 'rex/zip'
1818
require 'rex/powershell'
1919
require 'metasm'
@@ -1239,7 +1239,7 @@ def self.to_powershell_vba(framework, arch, code)
12391239
method: 'reflection')
12401240

12411241
# Intialize rig and value names
1242-
rig = Rex::RandomIdentifierGenerator.new()
1242+
rig = Rex::RandomIdentifier::Generator.new()
12431243
rig.init_var(:sub_auto_open)
12441244
rig.init_var(:var_powershell)
12451245

@@ -1330,7 +1330,7 @@ def self.to_exe_aspx(exes = '', opts = {})
13301330

13311331
def self.to_mem_aspx(framework, code, exeopts = {})
13321332
# Intialize rig and value names
1333-
rig = Rex::RandomIdentifierGenerator.new()
1333+
rig = Rex::RandomIdentifier::Generator.new()
13341334
rig.init_var(:var_funcAddr)
13351335
rig.init_var(:var_hThread)
13361336
rig.init_var(:var_pInfo)
@@ -1393,7 +1393,7 @@ def self.to_powershell_hta(framework, arch, code)
13931393
method: 'reflection')
13941394

13951395
# Intialize rig and value names
1396-
rig = Rex::RandomIdentifierGenerator.new()
1396+
rig = Rex::RandomIdentifier::Generator.new()
13971397
rig.init_var(:var_shell)
13981398
rig.init_var(:var_fso)
13991399

lib/rex.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ module Rex
4242
require 'rex/constants'
4343
require 'rex/exceptions'
4444
require 'rex/transformer'
45-
require 'rex/random_identifier_generator'
45+
require 'rex/random_identifier'
4646
require 'rex/text'
4747
require 'rex/time'
4848
require 'rex/job_container'

lib/rex/powershell.rb

Lines changed: 0 additions & 62 deletions
This file was deleted.

0 commit comments

Comments
 (0)