rex-text 0.1.2 → 0.2.0
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.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +1 -1
- data.tar.gz.sig +2 -2
- data/lib/rex/text/table.rb +3 -2
- data/lib/rex/text/version.rb +1 -1
- metadata +2 -2
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: fac6885e671b050ccbdf774302465ff811fbc570
|
|
4
|
+
data.tar.gz: 5c2e95fcbe12e42aeb4d6bc992fdc76c942e157a
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: c0a5db90d2bf08b2764ea395e356183d9f0cf841ad21362564d7d53c00bed7843798f056cc662ca3810d6f54ffdd1870caab2505988a16e7cb932effbc4704e2
|
|
7
|
+
data.tar.gz: a404a8c91eafda2db0b59ad20e3cce8fd281225af988ab460ea046dc189eb065669d043fdf12fcfd48fee34bb1188bb645f9239fe99846fee99b33fc35e07174
|
checksums.yaml.gz.sig
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
oK���aA�+���a�6:�JG�uh;�/�6��v3r�}�gMJ'����9)s��o*Q�z�lyHA��)�"z8cZ�ZuP
|
data.tar.gz.sig
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
F�K���.Q�����0�����D �e�)yl1�<�l�`X����"�e��t�t7
|
|
2
|
+
��-XFL{���
|
data/lib/rex/text/table.rb
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
# -*- coding: binary -*-
|
|
2
|
+
require 'ipaddr'
|
|
2
3
|
|
|
3
4
|
module Rex
|
|
4
5
|
module Text
|
|
@@ -196,14 +197,14 @@ class Table
|
|
|
196
197
|
cmp = -1
|
|
197
198
|
elsif b[index].nil?
|
|
198
199
|
cmp = 1
|
|
199
|
-
elsif valid_ip?(a[index]) and valid_ip?(b[index])
|
|
200
|
-
cmp = IPAddr.new(a[index]) <=> IPAddr.new(b[index])
|
|
201
200
|
elsif a[index] =~ /^[0-9]+$/ and b[index] =~ /^[0-9]+$/
|
|
202
201
|
cmp = a[index].to_i <=> b[index].to_i
|
|
203
202
|
elsif a[index].kind_of?(IPAddr) && a[index].kind_of?(IPAddr) && a[index].ipv6? && b[index].ipv4?
|
|
204
203
|
cmp = 1
|
|
205
204
|
elsif a[index].kind_of?(IPAddr) && b[index].kind_of?(IPAddr) && a[index].ipv4? && b[index].ipv6?
|
|
206
205
|
cmp = -1
|
|
206
|
+
elsif !(a[index].kind_of?(IPAddr) || b[index].kind_of?(IPAddr)) && (valid_ip?(a[index]) && valid_ip?(b[index]))
|
|
207
|
+
cmp = IPAddr.new(a[index]) <=> IPAddr.new(b[index])
|
|
207
208
|
else
|
|
208
209
|
cmp = a[index] <=> b[index] # assumes otherwise comparable.
|
|
209
210
|
end
|
data/lib/rex/text/version.rb
CHANGED
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.
|
|
4
|
+
version: 0.2.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- David 'thelightcosine' Maloney
|
|
@@ -85,7 +85,7 @@ cert_chain:
|
|
|
85
85
|
2SpuQH+SWteq3NXkAmFEEqvLJQ4sbptZt8OP8ghL3pVAvZNFmww/YVszSkShSzcg
|
|
86
86
|
QdihYCSEL2drS2cFd50jBeq71sxUtxbv82DUa2b+
|
|
87
87
|
-----END CERTIFICATE-----
|
|
88
|
-
date: 2016-08-
|
|
88
|
+
date: 2016-08-11 00:00:00.000000000 Z
|
|
89
89
|
dependencies:
|
|
90
90
|
- !ruby/object:Gem::Dependency
|
|
91
91
|
name: bundler
|
metadata.gz.sig
CHANGED
|
Binary file
|