librex 0.0.31 → 0.0.32

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.
Files changed (46) hide show
  1. data/README.markdown +1 -1
  2. data/lib/rex.rb +33 -40
  3. data/lib/rex/arch.rb +3 -2
  4. data/lib/rex/encoder/alpha2.rb +9 -11
  5. data/lib/rex/encoder/xor.rb +2 -5
  6. data/lib/rex/encoding/xor.rb +15 -14
  7. data/lib/rex/exploitation/cmdstager/debug_asm.rb +1 -1
  8. data/lib/rex/exploitation/cmdstager/debug_write.rb +1 -1
  9. data/lib/rex/exploitation/cmdstager/tftp.rb +1 -1
  10. data/lib/rex/exploitation/cmdstager/vbs.rb +1 -1
  11. data/lib/rex/io/stream.rb +3 -7
  12. data/lib/rex/logging.rb +2 -15
  13. data/lib/rex/logging/log_dispatcher.rb +1 -0
  14. data/lib/rex/logging/log_sink.rb +3 -0
  15. data/lib/rex/logging/sinks/flatfile.rb +0 -2
  16. data/lib/rex/parser/nessus_xml.rb +1 -1
  17. data/lib/rex/payloads.rb +1 -3
  18. data/lib/rex/payloads/win32.rb +2 -4
  19. data/lib/rex/payloads/win32/kernel.rb +6 -5
  20. data/lib/rex/peparsey.rb +6 -5
  21. data/lib/rex/pescan.rb +7 -6
  22. data/lib/rex/platforms.rb +1 -11
  23. data/lib/rex/proto.rb +6 -17
  24. data/lib/rex/proto/dcerpc.rb +6 -15
  25. data/lib/rex/proto/drda.rb +4 -9
  26. data/lib/rex/proto/http.rb +2 -15
  27. data/lib/rex/proto/http/packet.rb +0 -1
  28. data/lib/rex/proto/ntlm.rb +6 -12
  29. data/lib/rex/proto/ntlm/message.rb +0 -2
  30. data/lib/rex/proto/smb.rb +7 -15
  31. data/lib/rex/service_manager.rb +1 -0
  32. data/lib/rex/socket.rb +13 -17
  33. data/lib/rex/socket/comm.rb +0 -2
  34. data/lib/rex/socket/comm/local.rb +6 -2
  35. data/lib/rex/sync.rb +6 -6
  36. data/lib/rex/ui.rb +13 -13
  37. data/lib/rex/ui/text/input.rb +4 -4
  38. data/lib/rex/ui/text/output.rb +5 -4
  39. metadata +3 -10
  40. data/lib/rex/encoder.rb +0 -17
  41. data/lib/rex/encoders.rb +0 -11
  42. data/lib/rex/encoding.rb +0 -10
  43. data/lib/rex/io.rb +0 -16
  44. data/lib/rex/logging/sinks.rb +0 -16
  45. data/lib/rex/parser.rb +0 -23
  46. data/lib/rex/ui/text.rb +0 -17
@@ -3,7 +3,7 @@
3
3
  A non-official re-packaging of the Rex library as a gem for easy of usage of the Metasploit REX framework in a non Metasploit application. I received permission from HDM to create this package.
4
4
 
5
5
  Currently based on:
6
- SVN Revision: 12559
6
+ SVN Revision: 12612
7
7
 
8
8
  # Credits
9
9
  The Metasploit development team <http://www.metasploit.com>
data/lib/rex.rb CHANGED
@@ -40,60 +40,53 @@ end
40
40
  # Generic classes
41
41
  require 'rex/constants'
42
42
  require 'rex/exceptions'
43
+ require 'rex/transformer'
44
+ require 'rex/text'
45
+ require 'rex/time'
46
+ require 'rex/job_container'
47
+ require 'rex/file'
43
48
 
44
- module Rex
45
- # Generic modules
46
- autoload :File, 'rex/file'
47
- autoload :Text, 'rex/text'
48
- autoload :Job, 'rex/job_container'
49
- autoload :JobContainer, 'rex/job_container'
50
- autoload :Transformer, 'rex/transformer'
51
- autoload :ExtTime, 'rex/time'
49
+ # Thread safety and synchronization
50
+ require 'rex/sync'
52
51
 
53
- # Thread safety and synchronization
54
- autoload :ReadWriteLock, 'rex/sync/read_write_lock'
55
- autoload :ThreadSafe, 'rex/sync/thread_safe'
56
- autoload :Ref, 'rex/sync/ref'
57
- autoload :Sync, 'rex/sync/event'
52
+ # Thread factory
53
+ require 'rex/thread_factory'
58
54
 
59
- # Thread factory
60
- autoload :ThreadFactory, 'rex/thread_factory'
55
+ # Encoding
56
+ require 'rex/encoder/xor'
57
+ require 'rex/encoding/xor'
61
58
 
62
- # Encoding
63
- autoload :Encoder, 'rex/encoder'
64
- autoload :Encoders, 'rex/encoders'
65
- autoload :Encoding, 'rex/encoding'
59
+ # Architecture subsystem
60
+ require 'rex/arch'
66
61
 
67
- # Architecture subsystem
68
- autoload :Arch, 'rex/arch'
62
+ # Assembly
63
+ require 'rex/assembly/nasm'
69
64
 
70
- # Assembly
71
- autoload :Assembly, 'rex/assembly/nasm'
65
+ # Logging
66
+ require 'rex/logging/log_dispatcher'
72
67
 
73
- # Logging
74
- autoload :Logging, 'rex/logging'
68
+ # IO
69
+ require 'rex/io/stream'
70
+ require 'rex/io/stream_abstraction'
71
+ require 'rex/io/stream_server'
75
72
 
76
- # IO
77
- autoload :IO, 'rex/io'
73
+ # Sockets
74
+ require 'rex/socket'
78
75
 
79
- # Sockets
80
- autoload :Socket, 'rex/socket'
76
+ # Protocols
81
77
 
82
- # Platforms
83
- autoload :Platforms, 'rex/platforms'
78
+ require 'rex/proto'
84
79
 
85
- # Protocols
86
- autoload :Proto, 'rex/proto'
80
+ # Parsers
81
+ require 'rex/parser/arguments'
82
+ require 'rex/parser/ini'
87
83
 
88
- # Service handling
89
- autoload :Service, 'rex/service'
90
84
 
91
- # Parsers
92
- autoload :Parser, 'rex/parser'
85
+ # Compatibility
86
+ require 'rex/compat'
93
87
 
94
- # Compatibility
95
- autoload :Compat, 'rex/compat'
96
- end
88
+ # Platforms
89
+ require 'rex/platforms'
97
90
 
98
91
 
99
92
  # Overload the Kernel.sleep() function to be thread-safe
@@ -2,6 +2,7 @@ require 'rex/constants'
2
2
 
3
3
  module Rex
4
4
 
5
+
5
6
  ###
6
7
  #
7
8
  # This module provides generalized methods for performing operations that are
@@ -14,8 +15,8 @@ module Arch
14
15
  #
15
16
  # Architecture classes
16
17
  #
17
- autoload :X86, 'rex/arch/x86'
18
- autoload :Sparc, 'rex/arch/sparc'
18
+ require 'rex/arch/x86'
19
+ require 'rex/arch/sparc'
19
20
 
20
21
  #
21
22
  # This routine adjusts the stack pointer for a given architecture.
@@ -18,16 +18,14 @@
18
18
  module Rex
19
19
  module Encoder
20
20
  module Alpha2
21
+ end end end
21
22
 
22
- #
23
- # autoload the Alpha2 encoders
24
- #
25
- autoload :Generic, 'rex/encoder/alpha2/generic'
26
- autoload :AlphaMixed, 'rex/encoder/alpha2/alpha_mixed'
27
- autoload :AlphaUpper, 'rex/encoder/alpha2/alpha_upper'
28
- autoload :UnicodeMixed, 'rex/encoder/alpha2/unicode_mixed'
29
- autoload :UnicodeUpper, 'rex/encoder/alpha2/unicode_upper'
23
+ #
24
+ # include the Alpha2 encodings
25
+ #
30
26
 
31
- end
32
- end
33
- end
27
+ require 'rex/encoder/alpha2/generic'
28
+ require 'rex/encoder/alpha2/alpha_mixed'
29
+ require 'rex/encoder/alpha2/alpha_upper'
30
+ require 'rex/encoder/alpha2/unicode_mixed'
31
+ require 'rex/encoder/alpha2/unicode_upper'
@@ -10,9 +10,6 @@ module Encoder
10
10
  ###
11
11
  class Xor
12
12
 
13
- autoload :Dword, 'rex/encoder/xor/dword'
14
- autoload :DwordAdditive, 'rex/encoder/xor/dword_additive'
15
-
16
13
  attr_accessor :raw, :encoded, :badchars, :opts, :key, :fkey # :nodoc:
17
14
 
18
15
  #
@@ -68,5 +65,5 @@ class Xor
68
65
 
69
66
  end
70
67
 
71
- end
72
- end
68
+ end end
69
+
@@ -1,19 +1,20 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ #
4
+ # make sure the namespace is created
5
+ #
6
+
1
7
  module Rex
2
8
  module Encoding
3
9
  module Xor
10
+ end end end
4
11
 
5
- #
6
- # autoload the Xor encodings
7
- #
8
- autoload :Generic, 'rex/encoding/xor/generic'
9
- autoload :Byte, 'rex/encoding/xor/byte'
10
- autoload :Word, 'rex/encoding/xor/word'
11
- autoload :Dword, 'rex/encoding/xor/dword'
12
- autoload :DwordAdditive, 'rex/encoding/xor/dword_additive'
13
- autoload :Qword, 'rex/encoding/xor/qword'
14
-
15
- autoload :Exception, 'rex/encoding/xor/exceptions'
12
+ #
13
+ # include the Xor encodings
14
+ #
16
15
 
17
- end
18
- end
19
- end
16
+ require 'rex/encoding/xor/generic'
17
+ require 'rex/encoding/xor/byte'
18
+ require 'rex/encoding/xor/word'
19
+ require 'rex/encoding/xor/dword'
20
+ require 'rex/encoding/xor/qword'
@@ -1,5 +1,5 @@
1
1
  ##
2
- # $Id$
2
+ # $Id: debug_asm.rb 12595 2011-05-12 18:33:49Z jduck $
3
3
  ##
4
4
 
5
5
  require 'rex/text'
@@ -1,5 +1,5 @@
1
1
  ##
2
- # $Id$
2
+ # $Id: debug_write.rb 12595 2011-05-12 18:33:49Z jduck $
3
3
  ##
4
4
 
5
5
  require 'rex/text'
@@ -1,5 +1,5 @@
1
1
  ##
2
- # $Id: tftp.rb 10169 2010-08-27 17:23:47Z jduck $
2
+ # $Id: tftp.rb 12600 2011-05-12 20:03:55Z hdm $
3
3
  ##
4
4
 
5
5
  require 'rex/text'
@@ -1,5 +1,5 @@
1
1
  ##
2
- # $Id$
2
+ # $Id: vbs.rb 12595 2011-05-12 18:33:49Z jduck $
3
3
  ##
4
4
 
5
5
  require 'rex/text'
@@ -198,13 +198,9 @@ module Stream
198
198
  end
199
199
 
200
200
  bsize = (length == -1) ? def_block_size : length
201
-
202
- begin
203
- return read(bsize)
204
- rescue Exception
205
- end
206
-
207
- return ''
201
+ data = read(bsize)
202
+ raise EOFError if data.nil?
203
+ data
208
204
  end
209
205
 
210
206
  #
@@ -1,17 +1,4 @@
1
- ##
2
- # $Id: $
3
- #
4
- # maps autoload for logging classes
5
- ##
1
+ #!/usr/bin/env ruby
6
2
 
7
3
  require 'rex/constants' # for LEV_'s
8
-
9
- module Rex
10
- module Logging
11
- autoload :LogSink, 'rex/logging/log_sink'
12
- autoload :Sinks, 'rex/logging/sinks'
13
- end
14
- end
15
-
16
- # This defines a global so it must be loaded always
17
- require 'rex/logging/log_dispatcher'
4
+ require 'rex/logging/log_dispatcher'
@@ -1,4 +1,5 @@
1
1
  require 'rex/sync'
2
+ require 'rex/logging/log_sink'
2
3
 
3
4
  module Rex
4
5
  module Logging
@@ -37,3 +37,6 @@ end
37
37
 
38
38
  end
39
39
  end
40
+
41
+ require 'rex/logging/sinks/flatfile'
42
+ require 'rex/logging/sinks/stderr'
@@ -1,5 +1,3 @@
1
- require 'rex/logging'
2
-
3
1
  module Rex
4
2
  module Logging
5
3
  module Sinks
@@ -46,7 +46,7 @@ class NessusXMLStreamParser
46
46
  @bid = Array.new
47
47
  @xref = Array.new
48
48
  @x = Hash.new
49
- @x['nasl'] = attributes['pluginID']
49
+ @x['nasl'] = [attributes['pluginID'],attributes['pluginName']].join(" ")
50
50
  @x['port'] = attributes['port']
51
51
  @x['proto'] = attributes['protocol']
52
52
  @x['svc_name'] = attributes['svc_name']
@@ -1,3 +1 @@
1
- module Rex::Payloads
2
- autoload :Win32, 'rex/payloads/win32'
3
- end
1
+ require 'rex/payloads/win32'
@@ -1,4 +1,2 @@
1
- module Rex::Payloads::Win32
2
- autoload :Common, 'rex/payloads/win32/common'
3
- autoload :Kernel, 'rex/payloads/win32/kernel'
4
- end
1
+ require 'rex/payloads/win32/common'
2
+ require 'rex/payloads/win32/kernel'
@@ -1,12 +1,13 @@
1
1
  module Rex
2
2
  module Payloads
3
3
  module Win32
4
- module Kernel
5
4
 
6
- autoload :Common, 'rex/payloads/win32/kernel/common'
7
- autoload :Recovery, 'rex/payloads/win32/kernel/recovery'
8
- autoload :Stager, 'rex/payloads/win32/kernel/stager'
9
- autoload :Migration, 'rex/payloads/win32/kernel/migration'
5
+ require 'rex/payloads/win32/kernel/common'
6
+ require 'rex/payloads/win32/kernel/recovery'
7
+ require 'rex/payloads/win32/kernel/stager'
8
+ require 'rex/payloads/win32/kernel/migration'
9
+
10
+ module Kernel
10
11
 
11
12
  #
12
13
  # Constructs a kernel-mode payload using the supplied options. The options
@@ -1,11 +1,12 @@
1
1
  #!/usr/bin/env ruby
2
- #
3
- # $Id: peparsey.rb 12554 2011-05-06 18:47:10Z jduck $
4
- #
2
+
3
+ # $Id: peparsey.rb 12600 2011-05-12 20:03:55Z hdm $
5
4
 
6
5
  module Rex
7
6
  module PeParsey
8
- autoload :Pe, 'rex/peparsey/pe'
9
- autoload :PeMemDump, 'rex/peparsey/pe_memdump'
7
+
10
8
  end
11
9
  end
10
+
11
+ require 'rex/peparsey/pe'
12
+ require 'rex/peparsey/pe_memdump'
@@ -1,12 +1,13 @@
1
1
  #!/usr/bin/env ruby
2
- #
3
- # $Id: pescan.rb 12554 2011-05-06 18:47:10Z jduck $
4
- #
2
+
3
+ # $Id: pescan.rb 12600 2011-05-12 20:03:55Z hdm $
5
4
 
6
5
  module Rex
7
6
  module PeScan
8
- autoload :Analyze, 'rex/pescan/analyze'
9
- autoload :Scanner, 'rex/pescan/scanner'
10
- autoload :Search, 'rex/pescan/search'
7
+
11
8
  end
12
9
  end
10
+
11
+ require 'rex/pescan/analyze'
12
+ require 'rex/pescan/scanner'
13
+ require 'rex/pescan/search'
@@ -1,11 +1 @@
1
- ##
2
- # $Id: $
3
- #
4
- # This file maps Platforms for autoload
5
- ##
6
-
7
- module Rex
8
- module Platforms
9
- autoload :Windows, 'rex/platforms/windows'
10
- end
11
- end
1
+ require 'rex/platforms/windows'
@@ -1,24 +1,13 @@
1
- ##
2
- # $Id: proto.rb 12554 2011-05-06 18:47:10Z jduck $
3
- #
4
- # This file maps Proto items for autoload
5
- ##
1
+ require 'rex/proto/http'
2
+ require 'rex/proto/smb'
3
+ require 'rex/proto/ntlm'
4
+ require 'rex/proto/dcerpc'
5
+ require 'rex/proto/drda'
6
6
 
7
7
  module Rex
8
8
  module Proto
9
9
 
10
- autoload :Http, 'rex/proto/http'
11
- autoload :SMB, 'rex/proto/smb'
12
- autoload :NTLM, 'rex/proto/ntlm'
13
- autoload :DCERPC, 'rex/proto/dcerpc'
14
- autoload :DRDA, 'rex/proto/drda'
15
-
16
- autoload :SunRPC, 'rex/proto/sunrpc'
17
- autoload :DHCP, 'rex/proto/dhcp'
18
- autoload :TFTP, 'rex/proto/tftp'
19
- autoload :RFB, 'rex/proto/rfb'
20
-
21
- attr_accessor :alias
10
+ attr_accessor :alias
22
11
 
23
12
  end
24
13
  end
@@ -1,15 +1,6 @@
1
- module Rex
2
- module Proto
3
- module DCERPC
4
-
5
- autoload :Exceptions, 'rex/proto/dcerpc/exceptions'
6
- autoload :UUID, 'rex/proto/dcerpc/uuid'
7
- autoload :Response, 'rex/proto/dcerpc/response'
8
- autoload :Client, 'rex/proto/dcerpc/client'
9
- autoload :Packet, 'rex/proto/dcerpc/packet'
10
- autoload :Handle, 'rex/proto/dcerpc/handle'
11
- autoload :NDR, 'rex/proto/dcerpc/ndr'
12
-
13
- end
14
- end
15
- end
1
+ require 'rex/proto/dcerpc/uuid'
2
+ require 'rex/proto/dcerpc/response'
3
+ require 'rex/proto/dcerpc/client'
4
+ require 'rex/proto/dcerpc/packet'
5
+ require 'rex/proto/dcerpc/handle'
6
+ require 'rex/proto/dcerpc/ndr'
@@ -1,10 +1,5 @@
1
- module Rex
2
- module Proto
3
- module DRDA
4
- autoload :Constants, 'rex/proto/drda/constants'
5
- autoload :Utils, 'rex/proto/drda/utils'
6
- end
7
- end
8
- end
9
-
1
+ require 'rex/proto/drda/constants'
10
2
  require 'rex/proto/drda/packet'
3
+ require 'rex/proto/drda/utils'
4
+
5
+
@@ -1,18 +1,5 @@
1
- # These are required by all uses of Rex::Proto::Http
2
1
  require 'rex/proto/http/packet'
3
2
  require 'rex/proto/http/request'
4
3
  require 'rex/proto/http/response'
5
-
6
- # These are specific to use case
7
- module Rex
8
- module Proto
9
- module Http
10
-
11
- autoload :Client, 'rex/proto/http/client'
12
-
13
- autoload :Server, 'rex/proto/http/server'
14
- autoload :Handler, 'rex/proto/http/handler'
15
-
16
- end
17
- end
18
- end
4
+ require 'rex/proto/http/client'
5
+ require 'rex/proto/http/server'
@@ -1,5 +1,4 @@
1
1
  require 'rex/proto/http'
2
- require 'rex/text'
3
2
 
4
3
  module Rex
5
4
  module Proto
@@ -1,13 +1,7 @@
1
- module Rex
2
- module Proto
3
- module NTLM
4
- autoload :Constants, 'rex/proto/ntlm/constants'
5
- autoload :Exceptions, 'rex/proto/ntlm/exceptions'
1
+ require 'rex/proto/ntlm/constants'
2
+ require 'rex/proto/ntlm/exceptions'
3
+ require 'rex/proto/ntlm/crypt'
4
+ require 'rex/proto/ntlm/utils'
5
+ require 'rex/proto/ntlm/base'
6
+ require 'rex/proto/ntlm/message'
6
7
 
7
- autoload :Base, 'rex/proto/ntlm/base'
8
- autoload :Crypt, 'rex/proto/ntlm/crypt'
9
- autoload :Message, 'rex/proto/ntlm/message'
10
- autoload :Utils, 'rex/proto/ntlm/utils'
11
- end
12
- end
13
- end
@@ -45,8 +45,6 @@
45
45
 
46
46
  #this module defines the message class , useful for easily handling type 1/2/3 ntlm messages
47
47
 
48
- require 'rex/text'
49
-
50
48
  require 'rex/proto/ntlm/base'
51
49
  require 'rex/proto/ntlm/constants'
52
50
  require 'rex/proto/ntlm/crypt'
@@ -1,15 +1,7 @@
1
- module Rex
2
- module Proto
3
- module SMB
4
-
5
- autoload :Constants, 'rex/proto/smb/constants'
6
- autoload :Exceptions, 'rex/proto/smb/exceptions'
7
- autoload :Evasions, 'rex/proto/smb/evasions'
8
- autoload :Crypt, 'rex/proto/smb/crypt'
9
- autoload :Utils, 'rex/proto/smb/utils'
10
- autoload :Client, 'rex/proto/smb/client'
11
- autoload :SimpleClient, 'rex/proto/smb/simpleclient'
12
-
13
- end
14
- end
15
- end
1
+ require 'rex/proto/smb/constants'
2
+ require 'rex/proto/smb/exceptions'
3
+ require 'rex/proto/smb/evasions'
4
+ require 'rex/proto/smb/crypt'
5
+ require 'rex/proto/smb/utils'
6
+ require 'rex/proto/smb/client'
7
+ require 'rex/proto/smb/simpleclient'
@@ -1,5 +1,6 @@
1
1
  require 'singleton'
2
2
  require 'rex'
3
+ require 'rex/service'
3
4
 
4
5
  module Rex
5
6
 
@@ -12,23 +12,19 @@ module Rex
12
12
  ###
13
13
  module Socket
14
14
 
15
- # Plumbing / Aux
16
- autoload :Parameters, 'rex/socket/parameters'
17
- autoload :Comm, 'rex/socket/comm'
18
-
19
- # Underlying protocol-specific
20
- autoload :Ip, 'rex/socket/ip'
21
- autoload :Udp, 'rex/socket/udp'
22
- autoload :Tcp, 'rex/socket/tcp'
23
- autoload :TcpServer, 'rex/socket/tcp_server'
24
- autoload :SslTcp, 'rex/socket/ssl_tcp'
25
- autoload :SslTcpServer, 'rex/socket/ssl_tcp_server'
26
-
27
- # Utilities
28
- autoload :SwitchBoard, 'rex/socket/switch_board'
29
- autoload :SubnetWalker, 'rex/socket/subnet_walker'
30
- autoload :Range, 'rex/socket/range_walker'
31
- autoload :RangeWalker, 'rex/socket/range_walker'
15
+ module Comm
16
+ end
17
+
18
+ require 'rex/socket/parameters'
19
+ require 'rex/socket/tcp'
20
+ require 'rex/socket/tcp_server'
21
+
22
+ require 'rex/socket/comm'
23
+ require 'rex/socket/comm/local'
24
+
25
+ require 'rex/socket/switch_board'
26
+ require 'rex/socket/subnet_walker'
27
+ require 'rex/socket/range_walker'
32
28
 
33
29
  ##
34
30
  #
@@ -14,8 +14,6 @@ module Socket
14
14
  ###
15
15
  module Comm
16
16
 
17
- autoload :Local, 'rex/socket/comm/local'
18
-
19
17
  ###
20
18
  #
21
19
  # This mixin provides stubs for event notification handlers that can be
@@ -1,6 +1,10 @@
1
- require 'rex/compat'
2
- require 'rex/socket'
3
1
  require 'singleton'
2
+ require 'rex/socket'
3
+ require 'rex/socket/tcp'
4
+ require 'rex/socket/ssl_tcp'
5
+ require 'rex/socket/ssl_tcp_server'
6
+ require 'rex/socket/udp'
7
+ require 'rex/socket/ip'
4
8
  require 'timeout'
5
9
 
6
10
  ###
@@ -1,6 +1,6 @@
1
- module Rex
2
- autoload :ReadWriteLock, 'rex/sync/read_write_lock'
3
- autoload :ThreadSafe, 'rex/sync/thread_safe'
4
- autoload :Ref, 'rex/sync/ref'
5
- autoload :Sync, 'rex/sync/event'
6
- end
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'rex/sync/thread_safe'
4
+ require 'rex/sync/ref'
5
+ require 'rex/sync/read_write_lock'
6
+ require 'rex/sync/event'
@@ -3,19 +3,19 @@
3
3
  # wrappers of the rex library.
4
4
  #
5
5
 
6
- require 'rex'
6
+ # General classes
7
+ require 'rex/ui/output'
8
+ require 'rex/ui/progress_tracker'
7
9
 
8
- module Rex
9
- module Ui
10
- # General classes
11
- autoload :Output, 'rex/ui/output'
12
- autoload :ProgressTracker, 'rex/ui/progress_tracker'
10
+ # Text-based user interfaces
11
+ require 'rex/ui/text/input'
12
+ require 'rex/ui/text/shell'
13
+ require 'rex/ui/text/dispatcher_shell'
14
+ require 'rex/ui/text/irb_shell'
13
15
 
14
- # Text-based user interfaces
15
- autoload :Text, 'rex/ui/text'
16
+ require 'rex/ui/text/color'
17
+ require 'rex/ui/text/table'
16
18
 
17
- # Ui subscriber
18
- autoload :Subscriber, 'rex/ui/subscriber'
19
- autoload :Interactive, 'rex/ui/interactive'
20
- end
21
- end
19
+ # Ui subscriber
20
+ require 'rex/ui/subscriber'
21
+ require 'rex/ui/interactive'
@@ -13,10 +13,10 @@ module Text
13
13
  ###
14
14
  class Input
15
15
 
16
- autoload :Buffer, 'rex/ui/text/color'
17
- autoload :Stdio, 'rex/ui/text/input/stdio'
18
- autoload :Readline, 'rex/ui/text/input/readline'
19
- autoload :Socket, 'rex/ui/text/input/socket'
16
+ require 'rex/ui/text/input/stdio'
17
+ require 'rex/ui/text/input/readline'
18
+ require 'rex/ui/text/input/socket'
19
+ require 'rex/ui/text/color'
20
20
 
21
21
  include Rex::Ui::Text::Color
22
22
 
@@ -12,10 +12,11 @@ module Text
12
12
  ###
13
13
  class Output < Rex::Ui::Output
14
14
 
15
- autoload :Stdio, 'rex/ui/text/output/stdio'
16
- autoload :Socket, 'rex/ui/text/output/socket'
17
- autoload :Buffer, 'rex/ui/text/output/buffer'
18
- autoload :File, 'rex/ui/text/output/file'
15
+ require 'rex/ui/text/output/stdio'
16
+ require 'rex/ui/text/output/socket'
17
+ require 'rex/ui/text/output/buffer'
18
+ require 'rex/ui/text/output/file'
19
+ require 'rex/ui/text/color'
19
20
 
20
21
  include Rex::Ui::Text::Color
21
22
 
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: librex
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.0.31
5
+ version: 0.0.32
6
6
  platform: ruby
7
7
  authors:
8
8
  - Metasploit Development Team
@@ -11,11 +11,11 @@ autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
13
 
14
- date: 2011-05-07 00:00:00 -05:00
14
+ date: 2011-05-13 00:00:00 -05:00
15
15
  default_executable:
16
16
  dependencies: []
17
17
 
18
- description: Rex provides a variety of classes useful for security testing and exploit development. Based on SVN Revision 12559
18
+ description: Rex provides a variety of classes useful for security testing and exploit development. Based on SVN Revision 12612
19
19
  email:
20
20
  - hdm@metasploit.com
21
21
  - jacob.hammack@hammackj.com
@@ -60,11 +60,9 @@ files:
60
60
  - lib/rex/encoder/xor/dword.rb
61
61
  - lib/rex/encoder/xor/dword_additive.rb
62
62
  - lib/rex/encoder/xor.rb
63
- - lib/rex/encoder.rb
64
63
  - lib/rex/encoders/xor_dword.rb
65
64
  - lib/rex/encoders/xor_dword_additive.rb
66
65
  - lib/rex/encoders/xor_dword_additive.rb.ut.rb
67
- - lib/rex/encoders.rb
68
66
  - lib/rex/encoding/xor/byte.rb
69
67
  - lib/rex/encoding/xor/byte.rb.ut.rb
70
68
  - lib/rex/encoding/xor/dword.rb
@@ -79,7 +77,6 @@ files:
79
77
  - lib/rex/encoding/xor/word.rb.ut.rb
80
78
  - lib/rex/encoding/xor.rb
81
79
  - lib/rex/encoding/xor.rb.ts.rb
82
- - lib/rex/encoding.rb
83
80
  - lib/rex/exceptions.rb
84
81
  - lib/rex/exceptions.rb.ut.rb
85
82
  - lib/rex/exploitation/cmdstager/base.rb
@@ -113,14 +110,12 @@ files:
113
110
  - lib/rex/io/stream.rb
114
111
  - lib/rex/io/stream_abstraction.rb
115
112
  - lib/rex/io/stream_server.rb
116
- - lib/rex/io.rb
117
113
  - lib/rex/job_container.rb
118
114
  - lib/rex/LICENSE
119
115
  - lib/rex/logging/log_dispatcher.rb
120
116
  - lib/rex/logging/log_sink.rb
121
117
  - lib/rex/logging/sinks/flatfile.rb
122
118
  - lib/rex/logging/sinks/stderr.rb
123
- - lib/rex/logging/sinks.rb
124
119
  - lib/rex/logging.rb
125
120
  - lib/rex/machparsey/exceptions.rb
126
121
  - lib/rex/machparsey/mach.rb
@@ -166,7 +161,6 @@ files:
166
161
  - lib/rex/parser/nexpose_xml.rb
167
162
  - lib/rex/parser/nmap_xml.rb
168
163
  - lib/rex/parser/retina_xml.rb
169
- - lib/rex/parser.rb
170
164
  - lib/rex/payloads/win32/common.rb
171
165
  - lib/rex/payloads/win32/kernel/common.rb
172
166
  - lib/rex/payloads/win32/kernel/migration.rb
@@ -460,7 +454,6 @@ files:
460
454
  - lib/rex/ui/text/shell.rb
461
455
  - lib/rex/ui/text/table.rb
462
456
  - lib/rex/ui/text/table.rb.ut.rb
463
- - lib/rex/ui/text.rb
464
457
  - lib/rex/ui.rb
465
458
  - lib/rex/zip/archive.rb
466
459
  - lib/rex/zip/blocks.rb
@@ -1,17 +0,0 @@
1
- ##
2
- # $Id: encoder.rb 12554 2011-05-06 18:47:10Z jduck $
3
- #
4
- # This file maps encoders for autoload
5
- ##
6
-
7
- module Rex::Encoder
8
- # Encoder support code
9
- autoload :Xor, 'rex/encoder/xor'
10
- autoload :Alpha2, 'rex/encoder/alpha2'
11
- autoload :NonAlpha, 'rex/encoder/nonalpha'
12
- autoload :NonUpper, 'rex/encoder/nonupper'
13
-
14
- # Hrm? Is these in the wrong module?
15
- autoload :XDR, 'rex/encoder/xdr'
16
- autoload :NDR, 'rex/encoder/ndr'
17
- end
@@ -1,11 +0,0 @@
1
- ##
2
- # $Id: encoders.rb 12554 2011-05-06 18:47:10Z jduck $
3
- #
4
- # This file maps encoders for autoload
5
- ##
6
- require 'rex'
7
-
8
- module Rex::Encoders
9
- autoload :XorDword, 'rex/encoders/xor_dword'
10
- autoload :XorDwordAdditive, 'rex/encoders/xor_dword_additive'
11
- end
@@ -1,10 +0,0 @@
1
- ##
2
- # $Id: encoding.rb 12554 2011-05-06 18:47:10Z jduck $
3
- #
4
- # This file maps encodings for autoload
5
- ##
6
-
7
- module Rex::Encoding
8
- # Encoding support code
9
- autoload :Xor, 'rex/encoding/xor'
10
- end
@@ -1,16 +0,0 @@
1
- ##
2
- # $Id: io.rb 12554 2011-05-06 18:47:10Z jduck $
3
- #
4
- # This file simply provides an autoload interface for the children
5
- # of Rex::IO
6
- #
7
- ##
8
- module Rex::IO
9
- autoload :Stream, 'rex/io/stream'
10
- autoload :StreamAbstraction, 'rex/io/stream_abstraction'
11
- autoload :StreamServer, 'rex/io/stream_server'
12
-
13
- autoload :BidirectionalPipe, 'rex/io/bidirectional_pipe'
14
- autoload :DatagramAbstraction, 'rex/io/datagram_abstraction'
15
- autoload :RingBuffer, 'rex/io/ring_buffer'
16
- end
@@ -1,16 +0,0 @@
1
- ##
2
- # $Id: sinks.rb 12554 2011-05-06 18:47:10Z jduck $
3
- #
4
- # Map log sinks for autload
5
- ##
6
-
7
- module Rex
8
- module Logging
9
- module Sinks
10
-
11
- autoload :Flatfile, 'rex/logging/sinks/flatfile'
12
- autoload :Stderr, 'rex/logging/sinks/stderr'
13
-
14
- end
15
- end
16
- end
@@ -1,23 +0,0 @@
1
- ##
2
- # $Id: parser.rb 12554 2011-05-06 18:47:10Z jduck $
3
- #
4
- # This file maps parsers for autoload
5
- ##
6
-
7
- module Rex
8
- module Parser
9
- # General parsers
10
- autoload :Arguments, 'rex/parser/arguments'
11
- autoload :Ini, 'rex/parser/ini'
12
-
13
- # Data import parsers
14
- autoload :NmapXMLStreamParser, 'rex/parser/nmap_xml'
15
- autoload :NexposeXMLStreamParser, 'rex/parser/nexpose_xml'
16
- autoload :RetinaXMLStreamParser, 'rex/parser/retina_xml'
17
- autoload :NetSparkerXMLStreamParser, 'rex/parser/netsparker_xml'
18
- autoload :NessusXMLStreamParser, 'rex/parser/nessus_xml'
19
- autoload :IP360XMLStreamParser, 'rex/parser/ip360_xml'
20
- autoload :IP360ASPLXMLStreamParser, 'rex/parser/ip360_aspl_xml'
21
- autoload :AppleBackupManifestDB, 'rex/parser/apple_backup_manifestdb'
22
- end
23
- end
@@ -1,17 +0,0 @@
1
- module Rex
2
- module Ui
3
- module Text
4
- autoload :Input, 'rex/ui/text/input'
5
- autoload :Output, 'rex/ui/text/output'
6
- autoload :Color, 'rex/ui/text/color'
7
- autoload :Table, 'rex/ui/text/table'
8
-
9
- autoload :PseudoShell, 'rex/ui/text/shell'
10
- autoload :Shell, 'rex/ui/text/shell'
11
- autoload :DispatcherShell, 'rex/ui/text/dispatcher_shell'
12
- autoload :IrbShell, 'rex/ui/text/irb_shell'
13
-
14
- autoload :ProgressTracker, 'rex/ui/text/progress_tracker'
15
- end
16
- end
17
- end