rex-text 0.2.35 → 0.2.38
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/.github/workflows/verify.yml +4 -18
- data/lib/rex/text/rand.rb +16 -0
- data/lib/rex/text/version.rb +1 -1
- data/lib/rex/text/wrapped_table.rb +6 -7
- data.tar.gz.sig +0 -0
- metadata +2 -2
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bf931b9b53daa1391f3410fa721235e01375a64f8e7d06919af5f6e69f30b5c0
|
4
|
+
data.tar.gz: ca35cab4eeefe5ef8df4d17cfae63c5c58047b5a56daf402dcff34ce378d923c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: eea968a9e08f2f54b666ce99e0cd8767541eb9560d6c2d6f5cee01d005c1c92f72772be0ae9a4807bc1ec82e526d903f1f79df82108c9f742b5269a3d0516489
|
7
|
+
data.tar.gz: 78ac55937b82a2ef55fc4e926b6afd4c9726fbefa63c8699e954499da83f54ebc28443caa985d401d93902e1233e9406d332f06e26eddd80cd7320fb9b064caa
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
@@ -10,7 +10,7 @@ on:
|
|
10
10
|
|
11
11
|
jobs:
|
12
12
|
test:
|
13
|
-
runs-on: ubuntu-
|
13
|
+
runs-on: ubuntu-18.04
|
14
14
|
timeout-minutes: 40
|
15
15
|
|
16
16
|
strategy:
|
@@ -29,25 +29,11 @@ jobs:
|
|
29
29
|
- name: Checkout code
|
30
30
|
uses: actions/checkout@v2
|
31
31
|
|
32
|
-
-
|
32
|
+
- name: Setup Ruby
|
33
|
+
uses: ruby/setup-ruby@v1
|
33
34
|
with:
|
34
35
|
ruby-version: ${{ matrix.ruby }}
|
35
|
-
|
36
|
-
- name: Setup bundler
|
37
|
-
run: |
|
38
|
-
gem install bundler
|
39
|
-
|
40
|
-
- uses: actions/cache@v2
|
41
|
-
with:
|
42
|
-
path: vendor/bundle
|
43
|
-
key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }}
|
44
|
-
restore-keys: |
|
45
|
-
${{ runner.os }}-gems-
|
46
|
-
|
47
|
-
- name: Bundle install
|
48
|
-
run: |
|
49
|
-
bundle config path vendor/bundle
|
50
|
-
bundle install --jobs 4 --retry 3
|
36
|
+
bundler-cache: true
|
51
37
|
|
52
38
|
- name: ${{ matrix.test_cmd }}
|
53
39
|
run: |
|
data/lib/rex/text/rand.rb
CHANGED
@@ -92,6 +92,15 @@ module Rex
|
|
92
92
|
"tammy", "teresa", "theresa", "tina", "virginia", "wanda"
|
93
93
|
]
|
94
94
|
|
95
|
+
Func_Verb = [
|
96
|
+
"get", "set", "put", "describe", "acquire", "release", "initialize", "free",
|
97
|
+
"init", "find", "list", "create", "destroy"
|
98
|
+
]
|
99
|
+
|
100
|
+
Func_Subj = [
|
101
|
+
"file", "directory", "dir", "address", "addr", "process", "proc", "user",
|
102
|
+
"privileges", "priv", "attribute", "attr", "mutex", "handle", "type"
|
103
|
+
]
|
95
104
|
|
96
105
|
# Generates a random character.
|
97
106
|
def self.rand_char(bad, chars = AllChars)
|
@@ -278,5 +287,12 @@ module Rex
|
|
278
287
|
end
|
279
288
|
rand_base(len,'',*allowed_characters)
|
280
289
|
end
|
290
|
+
|
291
|
+
# Generate a random function name
|
292
|
+
def self.rand_func_name
|
293
|
+
verb = rand(9) > 4 ? Func_Verb.sample.capitalize : Func_Verb.sample
|
294
|
+
subj = rand(9) > 4 ? Func_Subj.sample.capitalize : Func_Subj.sample
|
295
|
+
verb + subj
|
296
|
+
end
|
281
297
|
end
|
282
298
|
end
|
data/lib/rex/text/version.rb
CHANGED
@@ -183,12 +183,11 @@ class WrappedTable
|
|
183
183
|
raise RuntimeError, 'Invalid number of columns!'
|
184
184
|
end
|
185
185
|
formatted_fields = fields.map.with_index { |field, idx|
|
186
|
-
|
187
|
-
field = format_table_field(field.to_s.strip, idx)
|
186
|
+
field = format_table_field(field, idx)
|
188
187
|
|
189
|
-
if (colprops[idx]['MaxWidth'] < display_width(field
|
188
|
+
if (colprops[idx]['MaxWidth'] < display_width(field))
|
190
189
|
old = colprops[idx]['MaxWidth']
|
191
|
-
colprops[idx]['MaxWidth'] = display_width(field
|
190
|
+
colprops[idx]['MaxWidth'] = display_width(field)
|
192
191
|
end
|
193
192
|
|
194
193
|
field
|
@@ -410,7 +409,7 @@ protected
|
|
410
409
|
values_as_chunks = values.each_with_index.map do |value, idx|
|
411
410
|
column_width = optimal_widths[idx]
|
412
411
|
value
|
413
|
-
.
|
412
|
+
.chars
|
414
413
|
.each_slice(column_width)
|
415
414
|
.map(&:join)
|
416
415
|
end
|
@@ -511,13 +510,13 @@ protected
|
|
511
510
|
end
|
512
511
|
|
513
512
|
def format_table_field(str, idx)
|
514
|
-
str_cp = str.
|
513
|
+
str_cp = str.to_s.encode('UTF-8', invalid: :replace, undef: :replace).strip
|
515
514
|
|
516
515
|
colprops[idx]['Formatters'].each do |f|
|
517
516
|
str_cp = f.format(str_cp)
|
518
517
|
end
|
519
518
|
|
520
|
-
str_cp
|
519
|
+
str_cp
|
521
520
|
end
|
522
521
|
|
523
522
|
def style_table_field(str, _idx)
|
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.38
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Metasploit Hackers
|
@@ -93,7 +93,7 @@ cert_chain:
|
|
93
93
|
EknWpNgVhohbot1lfVAMmIhdtOVaRVcQQixWPwprDj/ydB8ryDMDosIMcw+fkoXU
|
94
94
|
9GJsSaSRRYQ9UUkVL27b64okU8D48m8=
|
95
95
|
-----END CERTIFICATE-----
|
96
|
-
date:
|
96
|
+
date: 2022-06-29 00:00:00.000000000 Z
|
97
97
|
dependencies:
|
98
98
|
- !ruby/object:Gem::Dependency
|
99
99
|
name: rake
|
metadata.gz.sig
CHANGED
Binary file
|