rex-text 0.2.53 → 0.2.55
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data/lib/rex/text/hex.rb +3 -3
- data/lib/rex/text/lang.rb +12 -13
- data/lib/rex/text/version.rb +1 -1
- data.tar.gz.sig +0 -0
- metadata +25 -85
- metadata.gz.sig +0 -0
- data/.travis.yml +0 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b6e00ee9046e2a52f102878c9ea126bcabd3661792f19310ec690c0289c510dc
|
4
|
+
data.tar.gz: e64b49f60c7a15cd7388271edb509f33a378388fc525735b034c650b981ce04d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 82ce47b42310e3e198398cbfc980c086d37d9f1ef75ef3f0ddf5b70cdcca525d25aab581d4ed416864ac652b44e810c50f97cc65c476a1a4b2e3734a211ede9b
|
7
|
+
data.tar.gz: 314d8d29e0829444f34a958ae1ce6141586e00e30c3118e8aed1cb41e5ff73bd8db5e0513b2f069e29b36e2515ab9015dbad4820ddbccc45f4daf753af6e16d9
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data/lib/rex/text/hex.rb
CHANGED
@@ -171,8 +171,8 @@ module Rex
|
|
171
171
|
#
|
172
172
|
# General-case method to handle both "\xAA\xBB\xCC" format and 0xAA,0xBB,0xCC format
|
173
173
|
#
|
174
|
-
def self.hexify_general(str, char_prefix, col = DefaultWrap, line_start = '', line_end = '', buf_start = '', buf_end = '', between='')
|
175
|
-
encoded_char_length = 2 + char_prefix.length + between.length
|
174
|
+
def self.hexify_general(str, char_prefix, col = DefaultWrap, line_start = '', line_end = '', buf_start = '', buf_end = '', between='', char_suffix: '')
|
175
|
+
encoded_char_length = 2 + char_prefix.length + char_suffix.length + between.length
|
176
176
|
if col < line_start.length + encoded_char_length + line_end.length
|
177
177
|
# raise an exception
|
178
178
|
raise ArgumentError.new('insufficient column width')
|
@@ -188,7 +188,7 @@ module Rex
|
|
188
188
|
ret << "#{line_end}\n#{line_start}"
|
189
189
|
last_line_length = line_start.length
|
190
190
|
end
|
191
|
-
ret << char_prefix << char.unpack('H*')[0] << between
|
191
|
+
ret << char_prefix << char.unpack('H*')[0] << char_suffix << between
|
192
192
|
last_line_length += encoded_char_length
|
193
193
|
end
|
194
194
|
# Remove the last in-between characters, if required
|
data/lib/rex/text/lang.rb
CHANGED
@@ -48,17 +48,17 @@ module Rex
|
|
48
48
|
#
|
49
49
|
# Converts to a masm style array of bytes
|
50
50
|
#
|
51
|
-
def self.to_masm(str, wrap = DefaultWrap, name = "")
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
return
|
51
|
+
def self.to_masm(str, wrap = DefaultWrap, name = "buf")
|
52
|
+
result = hexify_general(str, "", wrap, "#{' ' * (name.length + 1)}DB ", '', "#{name} DB ", '', ',', char_suffix: 'h')
|
53
|
+
result.gsub!(",\n", "\n")
|
54
|
+
result
|
55
|
+
end
|
56
|
+
|
57
|
+
#
|
58
|
+
# Creates a masm style comment
|
59
|
+
#
|
60
|
+
def self.to_masm_comment(str, wrap = DefaultWrap)
|
61
|
+
return wordwrap(str, 0, wrap, '', '; ')
|
62
62
|
end
|
63
63
|
|
64
64
|
#
|
@@ -72,7 +72,6 @@ module Rex
|
|
72
72
|
# Converts to a nim style array of bytes
|
73
73
|
#
|
74
74
|
def self.to_nim(str, wrap = DefaultWrap, name = "buf")
|
75
|
-
raise ArgumentError.new('str can not be empty') if str.empty?
|
76
75
|
return numhexify(str, wrap, '', '', "var #{name}: array[#{str.length}, byte] = [\nbyte ", "]", ',')
|
77
76
|
end
|
78
77
|
|
@@ -89,7 +88,7 @@ module Rex
|
|
89
88
|
def self.to_rust(str, wrap = DefaultWrap, name = "buf")
|
90
89
|
return numhexify(str, wrap, '', '', "let #{name}: [u8; #{str.length}] = [", "];", ',')
|
91
90
|
end
|
92
|
-
|
91
|
+
|
93
92
|
#
|
94
93
|
# Creates a Rust style comment
|
95
94
|
#
|
data/lib/rex/text/version.rb
CHANGED
data.tar.gz.sig
CHANGED
Binary file
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rex-text
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.55
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Metasploit Hackers
|
@@ -10,90 +10,31 @@ bindir: exe
|
|
10
10
|
cert_chain:
|
11
11
|
- |
|
12
12
|
-----BEGIN CERTIFICATE-----
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
+
|
13
|
+
MIIERDCCAqygAwIBAgIBATANBgkqhkiG9w0BAQsFADAmMSQwIgYDVQQDDBttc2Zk
|
14
|
+
ZXYvREM9bWV0YXNwbG9pdC9EQz1jb20wHhcNMjMxMDMwMTYwNDI1WhcNMjUxMDI5
|
15
|
+
MTYwNDI1WjAmMSQwIgYDVQQDDBttc2ZkZXYvREM9bWV0YXNwbG9pdC9EQz1jb20w
|
16
|
+
ggGiMA0GCSqGSIb3DQEBAQUAA4IBjwAwggGKAoIBgQDZN/EKv+yVjwiKWvjAVhjF
|
17
|
+
aWNYI0E9bJ5d1qKd29omRYX9a+OOKBCu5+394fyF5RjwU4mYGr2iopX9ixRJrWXH
|
18
|
+
ojs70tEvV1CmvP9rhz7JKzQQoJOkinrz4d+StIylxVxVdgm7DeiB3ruTwvl7qKUv
|
19
|
+
piWzhrBFiVU6XI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|
93
|
-
EknWpNgVhohbot1lfVAMmIhdtOVaRVcQQixWPwprDj/ydB8ryDMDosIMcw+fkoXU
|
94
|
-
9GJsSaSRRYQ9UUkVL27b64okU8D48m8=
|
95
|
-
-----END CERTIFICATE-----
|
96
|
-
date: 2023-10-04 00:00:00.000000000 Z
|
37
|
+
date: 2023-11-08 00:00:00.000000000 Z
|
97
38
|
dependencies:
|
98
39
|
- !ruby/object:Gem::Dependency
|
99
40
|
name: rake
|
@@ -135,7 +76,6 @@ files:
|
|
135
76
|
- ".gitignore"
|
136
77
|
- ".rspec"
|
137
78
|
- ".ruby-version"
|
138
|
-
- ".travis.yml"
|
139
79
|
- CODE_OF_CONDUCT.md
|
140
80
|
- Gemfile
|
141
81
|
- LICENSE
|
metadata.gz.sig
CHANGED
Binary file
|