librex 0.0.42 → 0.0.43
Sign up to get free protection for your applications and to get access to all the features.
- data/README.markdown +1 -1
- data/lib/rex/compat.rb +10 -0
- data/lib/rex/post/meterpreter/channels/pools/file.rb +1 -1
- data/lib/rex/post/meterpreter/extensions/stdapi/fs/dir.rb +20 -18
- data/lib/rex/post/meterpreter/extensions/stdapi/fs/file.rb +11 -22
- data/lib/rex/post/meterpreter/extensions/stdapi/fs/file_stat.rb +2 -1
- data/lib/rex/post/meterpreter/extensions/stdapi/railgun.rb.ts.rb +4 -0
- data/lib/rex/post/meterpreter/extensions/stdapi/railgun/api_constants.rb +27 -0
- data/lib/rex/post/meterpreter/extensions/stdapi/railgun/api_constants.rb.ut.rb +7 -0
- data/lib/rex/post/meterpreter/extensions/stdapi/railgun/def/def_advapi32.rb +498 -242
- data/lib/rex/post/meterpreter/extensions/stdapi/railgun/def/def_iphlpapi.rb +18 -18
- data/lib/rex/post/meterpreter/extensions/stdapi/railgun/def/def_kernel32.rb +695 -694
- data/lib/rex/post/meterpreter/extensions/stdapi/railgun/def/def_netapi32.rb +6 -5
- data/lib/rex/post/meterpreter/extensions/stdapi/railgun/def/def_ntdll.rb +24 -24
- data/lib/rex/post/meterpreter/extensions/stdapi/railgun/def/def_shell32.rb +5 -4
- data/lib/rex/post/meterpreter/extensions/stdapi/railgun/def/def_user32.rb +551 -551
- data/lib/rex/post/meterpreter/extensions/stdapi/railgun/def/def_ws2_32.rb +93 -93
- data/lib/rex/post/meterpreter/extensions/stdapi/railgun/dll.rb +56 -42
- data/lib/rex/post/meterpreter/extensions/stdapi/railgun/dll.rb.ut.rb +4 -4
- data/lib/rex/post/meterpreter/extensions/stdapi/railgun/dll_helper.rb.ut.rb +5 -5
- data/lib/rex/post/meterpreter/extensions/stdapi/railgun/dll_wrapper.rb +26 -0
- data/lib/rex/post/meterpreter/extensions/stdapi/railgun/dll_wrapper.rb.ut.rb +63 -0
- data/lib/rex/post/meterpreter/extensions/stdapi/railgun/multicall.rb +4 -4
- data/lib/rex/post/meterpreter/extensions/stdapi/railgun/railgun.rb +151 -96
- data/lib/rex/post/meterpreter/extensions/stdapi/railgun/railgun.rb.ut.rb +80 -5
- data/lib/rex/post/meterpreter/extensions/stdapi/sys/config.rb +3 -3
- data/lib/rex/post/meterpreter/extensions/stdapi/sys/process.rb +11 -11
- data/lib/rex/post/meterpreter/extensions/stdapi/sys/registry.rb +3 -3
- data/lib/rex/post/meterpreter/packet.rb +12 -11
- data/lib/rex/proto/dhcp/server.rb +36 -42
- data/lib/rex/socket/range_walker.rb +1 -1
- data/lib/rex/text.rb +18 -1
- data/lib/rex/ui/text/table.rb +1 -1
- metadata +5 -3
data/lib/rex/text.rb
CHANGED
@@ -35,6 +35,7 @@ module Text
|
|
35
35
|
Alpha = UpperAlpha + LowerAlpha
|
36
36
|
AlphaNumeric = Alpha + Numerals
|
37
37
|
HighAscii = [*(0x80 .. 0xff)].pack("C*")
|
38
|
+
LowAscii = [*(0x00 .. 0x1f)].pack("C*")
|
38
39
|
DefaultWrap = 60
|
39
40
|
AllChars = [*(0x00 .. 0xff)].pack("C*")
|
40
41
|
|
@@ -1122,7 +1123,23 @@ module Text
|
|
1122
1123
|
def self.pack_int64le(val)
|
1123
1124
|
[val & 0x00000000ffffffff, val >> 32].pack("V2")
|
1124
1125
|
end
|
1125
|
-
|
1126
|
+
|
1127
|
+
|
1128
|
+
#
|
1129
|
+
# A custom unicode filter for dealing with multi-byte strings on a 8-bit console
|
1130
|
+
# Punycode would have been more "standard", but it requires valid Unicode chars
|
1131
|
+
#
|
1132
|
+
def self.unicode_filter_encode(str)
|
1133
|
+
if (str.unpack("C*") & ( LowAscii + HighAscii + "\x7f" ).unpack("C*")).length > 0
|
1134
|
+
str = "$U$" + str.unpack("C*").select{|c| c < 0x7f and c > 0x1f and c != 0x2d}.pack("C*") + "-0x" + str.unpack("H*")[0]
|
1135
|
+
else
|
1136
|
+
str
|
1137
|
+
end
|
1138
|
+
end
|
1139
|
+
|
1140
|
+
def self.unicode_filter_decode(str)
|
1141
|
+
str.gsub( /\$U\$([\x20-\x2c\x2e-\x7E]*)\-0x([A-Fa-f0-9]+)/ ){|m| [$2].pack("H*") }
|
1142
|
+
end
|
1126
1143
|
|
1127
1144
|
protected
|
1128
1145
|
|
data/lib/rex/ui/text/table.rb
CHANGED
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.43
|
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-07-
|
14
|
+
date: 2011-07-19 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 13247
|
19
19
|
email:
|
20
20
|
- hdm@metasploit.com
|
21
21
|
- jacob.hammack@hammackj.com
|
@@ -253,6 +253,8 @@ files:
|
|
253
253
|
- lib/rex/post/meterpreter/extensions/stdapi/railgun/dll_function.rb.ut.rb
|
254
254
|
- lib/rex/post/meterpreter/extensions/stdapi/railgun/dll_helper.rb
|
255
255
|
- lib/rex/post/meterpreter/extensions/stdapi/railgun/dll_helper.rb.ut.rb
|
256
|
+
- lib/rex/post/meterpreter/extensions/stdapi/railgun/dll_wrapper.rb
|
257
|
+
- lib/rex/post/meterpreter/extensions/stdapi/railgun/dll_wrapper.rb.ut.rb
|
256
258
|
- lib/rex/post/meterpreter/extensions/stdapi/railgun/mock_magic.rb
|
257
259
|
- lib/rex/post/meterpreter/extensions/stdapi/railgun/multicall.rb
|
258
260
|
- lib/rex/post/meterpreter/extensions/stdapi/railgun/railgun.rb
|