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.
- data/README.markdown +1 -1
- data/lib/rex.rb +33 -40
- data/lib/rex/arch.rb +3 -2
- data/lib/rex/encoder/alpha2.rb +9 -11
- data/lib/rex/encoder/xor.rb +2 -5
- data/lib/rex/encoding/xor.rb +15 -14
- data/lib/rex/exploitation/cmdstager/debug_asm.rb +1 -1
- data/lib/rex/exploitation/cmdstager/debug_write.rb +1 -1
- data/lib/rex/exploitation/cmdstager/tftp.rb +1 -1
- data/lib/rex/exploitation/cmdstager/vbs.rb +1 -1
- data/lib/rex/io/stream.rb +3 -7
- data/lib/rex/logging.rb +2 -15
- data/lib/rex/logging/log_dispatcher.rb +1 -0
- data/lib/rex/logging/log_sink.rb +3 -0
- data/lib/rex/logging/sinks/flatfile.rb +0 -2
- data/lib/rex/parser/nessus_xml.rb +1 -1
- data/lib/rex/payloads.rb +1 -3
- data/lib/rex/payloads/win32.rb +2 -4
- data/lib/rex/payloads/win32/kernel.rb +6 -5
- data/lib/rex/peparsey.rb +6 -5
- data/lib/rex/pescan.rb +7 -6
- data/lib/rex/platforms.rb +1 -11
- data/lib/rex/proto.rb +6 -17
- data/lib/rex/proto/dcerpc.rb +6 -15
- data/lib/rex/proto/drda.rb +4 -9
- data/lib/rex/proto/http.rb +2 -15
- data/lib/rex/proto/http/packet.rb +0 -1
- data/lib/rex/proto/ntlm.rb +6 -12
- data/lib/rex/proto/ntlm/message.rb +0 -2
- data/lib/rex/proto/smb.rb +7 -15
- data/lib/rex/service_manager.rb +1 -0
- data/lib/rex/socket.rb +13 -17
- data/lib/rex/socket/comm.rb +0 -2
- data/lib/rex/socket/comm/local.rb +6 -2
- data/lib/rex/sync.rb +6 -6
- data/lib/rex/ui.rb +13 -13
- data/lib/rex/ui/text/input.rb +4 -4
- data/lib/rex/ui/text/output.rb +5 -4
- metadata +3 -10
- data/lib/rex/encoder.rb +0 -17
- data/lib/rex/encoders.rb +0 -11
- data/lib/rex/encoding.rb +0 -10
- data/lib/rex/io.rb +0 -16
- data/lib/rex/logging/sinks.rb +0 -16
- data/lib/rex/parser.rb +0 -23
- data/lib/rex/ui/text.rb +0 -17
data/README.markdown
CHANGED
@@ -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:
|
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
|
-
|
45
|
-
|
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
|
-
|
54
|
-
|
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
|
-
|
60
|
-
|
55
|
+
# Encoding
|
56
|
+
require 'rex/encoder/xor'
|
57
|
+
require 'rex/encoding/xor'
|
61
58
|
|
62
|
-
|
63
|
-
|
64
|
-
autoload :Encoders, 'rex/encoders'
|
65
|
-
autoload :Encoding, 'rex/encoding'
|
59
|
+
# Architecture subsystem
|
60
|
+
require 'rex/arch'
|
66
61
|
|
67
|
-
|
68
|
-
|
62
|
+
# Assembly
|
63
|
+
require 'rex/assembly/nasm'
|
69
64
|
|
70
|
-
|
71
|
-
|
65
|
+
# Logging
|
66
|
+
require 'rex/logging/log_dispatcher'
|
72
67
|
|
73
|
-
|
74
|
-
|
68
|
+
# IO
|
69
|
+
require 'rex/io/stream'
|
70
|
+
require 'rex/io/stream_abstraction'
|
71
|
+
require 'rex/io/stream_server'
|
75
72
|
|
76
|
-
|
77
|
-
|
73
|
+
# Sockets
|
74
|
+
require 'rex/socket'
|
78
75
|
|
79
|
-
|
80
|
-
autoload :Socket, 'rex/socket'
|
76
|
+
# Protocols
|
81
77
|
|
82
|
-
|
83
|
-
autoload :Platforms, 'rex/platforms'
|
78
|
+
require 'rex/proto'
|
84
79
|
|
85
|
-
|
86
|
-
|
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
|
-
|
92
|
-
|
85
|
+
# Compatibility
|
86
|
+
require 'rex/compat'
|
93
87
|
|
94
|
-
|
95
|
-
|
96
|
-
end
|
88
|
+
# Platforms
|
89
|
+
require 'rex/platforms'
|
97
90
|
|
98
91
|
|
99
92
|
# Overload the Kernel.sleep() function to be thread-safe
|
data/lib/rex/arch.rb
CHANGED
@@ -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
|
-
|
18
|
-
|
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.
|
data/lib/rex/encoder/alpha2.rb
CHANGED
@@ -18,16 +18,14 @@
|
|
18
18
|
module Rex
|
19
19
|
module Encoder
|
20
20
|
module Alpha2
|
21
|
+
end end end
|
21
22
|
|
22
|
-
|
23
|
-
|
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
|
-
|
32
|
-
|
33
|
-
|
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'
|
data/lib/rex/encoder/xor.rb
CHANGED
@@ -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
|
-
|
68
|
+
end end
|
69
|
+
|
data/lib/rex/encoding/xor.rb
CHANGED
@@ -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
|
-
|
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
|
-
|
18
|
-
|
19
|
-
|
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'
|
data/lib/rex/io/stream.rb
CHANGED
@@ -198,13 +198,9 @@ module Stream
|
|
198
198
|
end
|
199
199
|
|
200
200
|
bsize = (length == -1) ? def_block_size : length
|
201
|
-
|
202
|
-
|
203
|
-
|
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
|
#
|
data/lib/rex/logging.rb
CHANGED
@@ -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'
|
data/lib/rex/logging/log_sink.rb
CHANGED
@@ -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']
|
data/lib/rex/payloads.rb
CHANGED
data/lib/rex/payloads/win32.rb
CHANGED
@@ -1,12 +1,13 @@
|
|
1
1
|
module Rex
|
2
2
|
module Payloads
|
3
3
|
module Win32
|
4
|
-
module Kernel
|
5
4
|
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
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
|
data/lib/rex/peparsey.rb
CHANGED
@@ -1,11 +1,12 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
|
-
|
3
|
-
# $Id: peparsey.rb
|
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
|
-
|
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'
|
data/lib/rex/pescan.rb
CHANGED
@@ -1,12 +1,13 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
|
-
|
3
|
-
# $Id: pescan.rb
|
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
|
-
|
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'
|
data/lib/rex/platforms.rb
CHANGED
data/lib/rex/proto.rb
CHANGED
@@ -1,24 +1,13 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
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
|
-
|
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
|
data/lib/rex/proto/dcerpc.rb
CHANGED
@@ -1,15 +1,6 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
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'
|
data/lib/rex/proto/drda.rb
CHANGED
@@ -1,10 +1,5 @@
|
|
1
|
-
|
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
|
+
|
data/lib/rex/proto/http.rb
CHANGED
@@ -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
|
-
|
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'
|
data/lib/rex/proto/ntlm.rb
CHANGED
@@ -1,13 +1,7 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
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
|
data/lib/rex/proto/smb.rb
CHANGED
@@ -1,15 +1,7 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
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'
|
data/lib/rex/service_manager.rb
CHANGED
data/lib/rex/socket.rb
CHANGED
@@ -12,23 +12,19 @@ module Rex
|
|
12
12
|
###
|
13
13
|
module Socket
|
14
14
|
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
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
|
#
|
data/lib/rex/socket/comm.rb
CHANGED
@@ -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
|
###
|
data/lib/rex/sync.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
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'
|
data/lib/rex/ui.rb
CHANGED
@@ -3,19 +3,19 @@
|
|
3
3
|
# wrappers of the rex library.
|
4
4
|
#
|
5
5
|
|
6
|
-
|
6
|
+
# General classes
|
7
|
+
require 'rex/ui/output'
|
8
|
+
require 'rex/ui/progress_tracker'
|
7
9
|
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
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
|
-
|
15
|
-
|
16
|
+
require 'rex/ui/text/color'
|
17
|
+
require 'rex/ui/text/table'
|
16
18
|
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
end
|
21
|
-
end
|
19
|
+
# Ui subscriber
|
20
|
+
require 'rex/ui/subscriber'
|
21
|
+
require 'rex/ui/interactive'
|
data/lib/rex/ui/text/input.rb
CHANGED
@@ -13,10 +13,10 @@ module Text
|
|
13
13
|
###
|
14
14
|
class Input
|
15
15
|
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
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
|
|
data/lib/rex/ui/text/output.rb
CHANGED
@@ -12,10 +12,11 @@ module Text
|
|
12
12
|
###
|
13
13
|
class Output < Rex::Ui::Output
|
14
14
|
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
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.
|
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-
|
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
|
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
|
data/lib/rex/encoder.rb
DELETED
@@ -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
|
data/lib/rex/encoders.rb
DELETED
@@ -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
|
data/lib/rex/encoding.rb
DELETED
data/lib/rex/io.rb
DELETED
@@ -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
|
data/lib/rex/logging/sinks.rb
DELETED
@@ -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
|
data/lib/rex/parser.rb
DELETED
@@ -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
|
data/lib/rex/ui/text.rb
DELETED
@@ -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
|