rex-text 0.2.28 → 0.2.33
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.tar.gz.sig +0 -0
- data/.github/workflows/verify.yml +57 -0
- data/.travis.yml +1 -5
- data/lib/rex/text/table.rb +15 -4
- data/lib/rex/text/unicode.rb +1 -1
- data/lib/rex/text/version.rb +1 -1
- data/lib/rex/text/wrapped_table.rb +2 -2
- data/rex-text.gemspec +3 -4
- metadata +22 -35
- 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: 3121a348aed99e006e8413ec63eadbb4de00ed5a8be4c0b11446757d414aa99e
|
4
|
+
data.tar.gz: 33de5bb9deb6958ce55e64a089613380ec700924e010659fdb1b3292c8917cb7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bce961c3e20f2e646101565c44c3b31fa8bc636e474cc9f07e24b26bd9fbf3a6d7fe14a03a92bce97ef8afc15440f575d22d625ba5262127af8f0f7c9bf4aa33
|
7
|
+
data.tar.gz: c4804270646f5d5bca45d0f029295b0fbf25e13b486af66a0f69563d8007029cdf892733a207a225a8accf5744ae36fc01ded65fe304c17548bfa7cdd6bc4763
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
Binary file
|
@@ -0,0 +1,57 @@
|
|
1
|
+
name: Verify
|
2
|
+
|
3
|
+
on:
|
4
|
+
push:
|
5
|
+
branches:
|
6
|
+
- '*'
|
7
|
+
pull_request:
|
8
|
+
branches:
|
9
|
+
- '*'
|
10
|
+
|
11
|
+
jobs:
|
12
|
+
test:
|
13
|
+
runs-on: ubuntu-16.04
|
14
|
+
timeout-minutes: 40
|
15
|
+
|
16
|
+
strategy:
|
17
|
+
fail-fast: true
|
18
|
+
matrix:
|
19
|
+
ruby:
|
20
|
+
- 2.7
|
21
|
+
test_cmd:
|
22
|
+
- bundle exec rspec
|
23
|
+
|
24
|
+
env:
|
25
|
+
RAILS_ENV: test
|
26
|
+
|
27
|
+
name: Ruby ${{ matrix.ruby }} - ${{ matrix.test_cmd }}
|
28
|
+
steps:
|
29
|
+
- name: Checkout code
|
30
|
+
uses: actions/checkout@v2
|
31
|
+
|
32
|
+
- uses: actions/setup-ruby@v1
|
33
|
+
with:
|
34
|
+
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
|
51
|
+
|
52
|
+
- name: ${{ matrix.test_cmd }}
|
53
|
+
run: |
|
54
|
+
echo "${CMD}"
|
55
|
+
bash -c "${CMD}"
|
56
|
+
env:
|
57
|
+
CMD: ${{ matrix.test_cmd }}
|
data/.travis.yml
CHANGED
data/lib/rex/text/table.rb
CHANGED
@@ -21,15 +21,22 @@ class Table
|
|
21
21
|
# To enforce all tables to be wrapped to the terminal's current width, call `Table.wrap_tables!`
|
22
22
|
# before invoking `Table.new` as normal.
|
23
23
|
def self.new(*args, &block)
|
24
|
-
if
|
25
|
-
table_options = args
|
24
|
+
if wrap_table?(args)
|
25
|
+
table_options = args.first
|
26
26
|
return ::Rex::Text::WrappedTable.new(table_options)
|
27
27
|
end
|
28
28
|
return super(*args, &block)
|
29
29
|
end
|
30
30
|
|
31
|
-
def self.
|
32
|
-
|
31
|
+
def self.wrap_table?(args)
|
32
|
+
return false unless wrapped_tables?
|
33
|
+
|
34
|
+
table_options = args.first
|
35
|
+
if table_options&.key?('WordWrap')
|
36
|
+
return table_options['WordWrap']
|
37
|
+
end
|
38
|
+
|
39
|
+
wrapped_tables?
|
33
40
|
end
|
34
41
|
|
35
42
|
def self.wrap_tables!
|
@@ -40,6 +47,10 @@ class Table
|
|
40
47
|
@@wrapped_tables_enabled = false
|
41
48
|
end
|
42
49
|
|
50
|
+
def self.wrapped_tables?
|
51
|
+
@@wrapped_tables_enabled ||= false
|
52
|
+
end
|
53
|
+
|
43
54
|
#
|
44
55
|
# Initializes a text table instance using the supplied properties. The
|
45
56
|
# Table class supports the following hash attributes:
|
data/lib/rex/text/unicode.rb
CHANGED
@@ -220,7 +220,7 @@ module Rex
|
|
220
220
|
# @return [String] a UTF-8 equivalent
|
221
221
|
# @note This method will discard invalid characters
|
222
222
|
def self.to_utf8(str)
|
223
|
-
str.encode('utf-8', { :invalid => :replace, :undef => :replace, :replace => '' })
|
223
|
+
str.encode('utf-8', **{ :invalid => :replace, :undef => :replace, :replace => '' })
|
224
224
|
end
|
225
225
|
|
226
226
|
#
|
data/lib/rex/text/version.rb
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
# -*- coding: binary -*-
|
2
2
|
require 'ipaddr'
|
3
3
|
require 'io/console'
|
4
|
+
require 'bigdecimal'
|
4
5
|
|
5
6
|
module Rex
|
6
7
|
module Text
|
@@ -70,8 +71,7 @@ class WrappedTable
|
|
70
71
|
# updated below if we got a "Rows" option
|
71
72
|
self.rows = []
|
72
73
|
|
73
|
-
|
74
|
-
self.width = opts['Width'] || ::IO.console.winsize[1]
|
74
|
+
self.width = opts['Width'] || ::IO.console&.winsize&.[](1) || ::BigDecimal::INFINITY
|
75
75
|
self.indent = opts['Indent'] || 0
|
76
76
|
self.cellpad = opts['CellPad'] || 2
|
77
77
|
self.prefix = opts['Prefix'] || ''
|
data/rex-text.gemspec
CHANGED
@@ -6,8 +6,8 @@ require 'rex/text/version'
|
|
6
6
|
Gem::Specification.new do |spec|
|
7
7
|
spec.name = "rex-text"
|
8
8
|
spec.version = Rex::Text::VERSION
|
9
|
-
spec.authors = [
|
10
|
-
spec.email = [
|
9
|
+
spec.authors = ['Metasploit Hackers']
|
10
|
+
spec.email = ['msfdev@metasploit.com']
|
11
11
|
|
12
12
|
spec.summary = %q{Provides Text Manipulation Methods for Exploitation}
|
13
13
|
spec.description = %q{This Gem contains all of the Ruby Exploitation(Rex) methods for text manipulation and generation}
|
@@ -18,9 +18,8 @@ Gem::Specification.new do |spec|
|
|
18
18
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
19
19
|
spec.require_paths = ["lib"]
|
20
20
|
|
21
|
-
spec.required_ruby_version = '>= 2.
|
21
|
+
spec.required_ruby_version = '>= 2.4.0'
|
22
22
|
|
23
|
-
spec.add_development_dependency "bundler"
|
24
23
|
spec.add_development_dependency "rake"
|
25
24
|
spec.add_development_dependency "rspec"
|
26
25
|
end
|
metadata
CHANGED
@@ -1,10 +1,10 @@
|
|
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.33
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
|
-
-
|
7
|
+
- Metasploit Hackers
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain:
|
@@ -64,20 +64,20 @@ cert_chain:
|
|
64
64
|
-----END CERTIFICATE-----
|
65
65
|
- |
|
66
66
|
-----BEGIN CERTIFICATE-----
|
67
|
-
|
67
|
+
MIIFIzCCBAugAwIBAgIQCMePMbkSxvnPeJhYXIfaxzANBgkqhkiG9w0BAQsFADBy
|
68
68
|
MQswCQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3
|
69
69
|
d3cuZGlnaWNlcnQuY29tMTEwLwYDVQQDEyhEaWdpQ2VydCBTSEEyIEFzc3VyZWQg
|
70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vbS9zaGEyLWFzc3VyZWQtY3MtZzEuY3Js
|
@@ -86,29 +86,15 @@ cert_chain:
|
|
86
86
|
JAYIKwYBBQUHMAGGGGh0dHA6Ly9vY3NwLmRpZ2ljZXJ0LmNvbTBOBggrBgEFBQcw
|
87
87
|
AoZCaHR0cDovL2NhY2VydHMuZGlnaWNlcnQuY29tL0RpZ2lDZXJ0U0hBMkFzc3Vy
|
88
88
|
ZWRJRENvZGVTaWduaW5nQ0EuY3J0MAwGA1UdEwEB/wQCMAAwDQYJKoZIhvcNAQEL
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
89
|
+
BQADggEBAN+GL5/myPWg7oH4mVrG7/OhXF1MoYQF0ddaNiqaweEHMuKJBQCVZRbL
|
90
|
+
37HojoKXXv2yyRJBCeTB+ojrxX+5PdLVZa0ss7toWzJ2A1poPXZ1eZvm5xeFD32z
|
91
|
+
YQaTmmNWNI3PCDTyJ2PXUc+bDiNNwcZ7yc5o78UNRvp9Jxghya17Q76c9Ov9wvnv
|
92
|
+
dxxQKWGOQy0m4fBrkyjAyH9Djjn81RbQrqYgPuhd5nD0HjN3VUQLhQbIJrk9TVs0
|
93
|
+
EknWpNgVhohbot1lfVAMmIhdtOVaRVcQQixWPwprDj/ydB8ryDMDosIMcw+fkoXU
|
94
|
+
9GJsSaSRRYQ9UUkVL27b64okU8D48m8=
|
95
95
|
-----END CERTIFICATE-----
|
96
|
-
date:
|
96
|
+
date: 2021-02-24 00:00:00.000000000 Z
|
97
97
|
dependencies:
|
98
|
-
- !ruby/object:Gem::Dependency
|
99
|
-
name: bundler
|
100
|
-
requirement: !ruby/object:Gem::Requirement
|
101
|
-
requirements:
|
102
|
-
- - ">="
|
103
|
-
- !ruby/object:Gem::Version
|
104
|
-
version: '0'
|
105
|
-
type: :development
|
106
|
-
prerelease: false
|
107
|
-
version_requirements: !ruby/object:Gem::Requirement
|
108
|
-
requirements:
|
109
|
-
- - ">="
|
110
|
-
- !ruby/object:Gem::Version
|
111
|
-
version: '0'
|
112
98
|
- !ruby/object:Gem::Dependency
|
113
99
|
name: rake
|
114
100
|
requirement: !ruby/object:Gem::Requirement
|
@@ -140,11 +126,12 @@ dependencies:
|
|
140
126
|
description: This Gem contains all of the Ruby Exploitation(Rex) methods for text
|
141
127
|
manipulation and generation
|
142
128
|
email:
|
143
|
-
-
|
129
|
+
- msfdev@metasploit.com
|
144
130
|
executables: []
|
145
131
|
extensions: []
|
146
132
|
extra_rdoc_files: []
|
147
133
|
files:
|
134
|
+
- ".github/workflows/verify.yml"
|
148
135
|
- ".gitignore"
|
149
136
|
- ".rspec"
|
150
137
|
- ".ruby-version"
|
@@ -191,7 +178,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
191
178
|
requirements:
|
192
179
|
- - ">="
|
193
180
|
- !ruby/object:Gem::Version
|
194
|
-
version: 2.
|
181
|
+
version: 2.4.0
|
195
182
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
196
183
|
requirements:
|
197
184
|
- - ">="
|
metadata.gz.sig
CHANGED
Binary file
|