rabid 0.0.5 → 0.0.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/LICENSE.txt +2 -1
- data/bin/rabid +2 -10
- data/lib/bigipcookie.rb +13 -11
- data/lib/bigipcookie/version.rb +1 -1
- metadata +22 -74
- data/.gitignore +0 -8
- data/.rubocop.yml +0 -22
- data/.yardopts +0 -4
- data/.yardopts-dev +0 -6
- data/Gemfile +0 -6
- data/Gemfile.lock +0 -58
- data/README.md +0 -32
- data/Rakefile +0 -10
- data/bin/rabid_setup +0 -6
- data/docs/.nojekyll +0 -0
- data/docs/About.md +0 -13
- data/docs/CHANGELOG.md +0 -23
- data/docs/README.md +0 -23
- data/docs/_coverpage.md +0 -14
- data/docs/_media/logo.png +0 -0
- data/docs/_navbar.md +0 -2
- data/docs/_sidebar.md +0 -15
- data/docs/index.html +0 -31
- data/docs/pages/demo.md +0 -3
- data/docs/pages/documentation.md +0 -34
- data/docs/pages/install.md +0 -90
- data/docs/pages/publishing.md +0 -39
- data/docs/pages/quick-start.md +0 -30
- data/docs/pages/usage.md +0 -54
- data/docs/vendor/docsify.js +0 -1
- data/docs/vendor/plugins/emoji.min.js +0 -1
- data/docs/vendor/plugins/search.min.js +0 -1
- data/docs/vendor/prismjs/components/prism-ruby.min.js +0 -1
- data/docs/vendor/themes/vue.css +0 -1
- data/docs/why.md +0 -49
- data/docs/yard/BigIPCookie.html +0 -159
- data/docs/yard/BigIPCookie/Decode.html +0 -782
- data/docs/yard/Version.html +0 -126
- data/docs/yard/_index.html +0 -138
- data/docs/yard/class_list.html +0 -51
- data/docs/yard/css/common.css +0 -1
- data/docs/yard/css/full_list.css +0 -58
- data/docs/yard/css/style.css +0 -496
- data/docs/yard/file.LICENSE.html +0 -70
- data/docs/yard/file.README.html +0 -105
- data/docs/yard/file_list.html +0 -61
- data/docs/yard/frames.html +0 -17
- data/docs/yard/index.html +0 -105
- data/docs/yard/js/app.js +0 -303
- data/docs/yard/js/full_list.js +0 -216
- data/docs/yard/js/jquery.js +0 -4
- data/docs/yard/method_list.html +0 -99
- data/docs/yard/top-level-namespace.html +0 -112
- data/package-lock.json +0 -154
- data/test/test_bigipcookie.rb +0 -86
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a5699f2c4c79f71d44c6e7cd7dc3f89bb424bbcf7069293157ac0555d7270519
|
4
|
+
data.tar.gz: 7ec606ba5cd1e482edd19d32d519680137c3817197ae64cd67286b586cb8e721
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8b062568f80e4d673e4bf99b20c9366cbd77bb0f1196897fe7d81cf6238a30332a32a63acfd2192ffdcaa2250c08cb02520445daf6065ad6af49a7acd7695f0a
|
7
|
+
data.tar.gz: 6ddee9719e5e74ca28a7188c5d68c60e44c7783879742fe1089dc7ea72a010b165e3055683f1baf135b9ecb32db4f63293147a1cd02a2f639a475ec5af131743
|
data/LICENSE.txt
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
The MIT License (MIT)
|
2
2
|
|
3
|
-
Copyright (c)
|
3
|
+
Copyright (c) 2020-2020 Alexandre ZANNI
|
4
|
+
Copyright (c) 2019-2020 Alexandre ZANNI at Orange Cyberdefense
|
4
5
|
|
5
6
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
7
|
of this software and associated documentation files (the "Software"), to deal
|
data/bin/rabid
CHANGED
@@ -35,6 +35,7 @@ DOCOPT
|
|
35
35
|
|
36
36
|
begin
|
37
37
|
args = Docopt.docopt(doc, version: BigIPCookie::VERSION)
|
38
|
+
Paint.mode = 0 if args['--no-color']
|
38
39
|
pp args if args['--debug']
|
39
40
|
# use case 1, using the tool
|
40
41
|
if args['<raw_cookie>']
|
@@ -43,16 +44,7 @@ begin
|
|
43
44
|
opts[:ipv6compression] = 0 if args['--ipv6-long-format']
|
44
45
|
bip.auto_decode(opts)
|
45
46
|
# Display
|
46
|
-
if args['--
|
47
|
-
if args['--short']
|
48
|
-
puts bip.decoded_cookie
|
49
|
-
else
|
50
|
-
puts "Pool name: #{bip.pool_name}"
|
51
|
-
puts "Cookie type: #{bip.cookie_type}"
|
52
|
-
puts "Raw cookie: #{bip.raw_cookie}"
|
53
|
-
puts "Decoded cookie: #{bip.decoded_cookie}"
|
54
|
-
end
|
55
|
-
elsif args['--short']
|
47
|
+
if args['--short']
|
56
48
|
puts Paint[bip.decoded_cookie, :green]
|
57
49
|
else
|
58
50
|
puts Paint['Pool name:', :white, :bold] + ' ' + bip.pool_name
|
data/lib/bigipcookie.rb
CHANGED
@@ -85,16 +85,17 @@ class BigIPCookie
|
|
85
85
|
opts[:reverse] = 0
|
86
86
|
end
|
87
87
|
|
88
|
-
|
88
|
+
case opts[:ipversion]
|
89
|
+
when 4
|
89
90
|
opts[:joinchar] = '.'
|
90
91
|
opts[:scanby] = 2
|
91
|
-
|
92
|
+
when 6
|
92
93
|
opts[:joinchar] = ':'
|
93
94
|
opts[:scanby] = 4
|
94
95
|
end
|
95
96
|
|
96
97
|
ip = format('%02x', ip) if opts[:ip2hex] == 1 # ip to hex
|
97
|
-
ip = '0' + ip if ip.size
|
98
|
+
ip = '0' + ip if ip.size.odd? # prepend a 0 when we have an odd number
|
98
99
|
ip = ip.scan(/.{#{opts[:scanby]}}/) # split by n
|
99
100
|
ip.reverse! if opts[:reverse] == 1 # reverse array
|
100
101
|
ip = ip.map { |i| i.to_i(16) } if opts[:hex2ip] == 1 # hex to ip
|
@@ -168,7 +169,7 @@ class BigIPCookie
|
|
168
169
|
# Return that the cookie is encrypted
|
169
170
|
# @param cookie [String] raw cookie value
|
170
171
|
# @return [String] Encrypted cookie detection message
|
171
|
-
def encrypted(
|
172
|
+
def encrypted(_cookie)
|
172
173
|
return 'Unknown:Encrypted'
|
173
174
|
end
|
174
175
|
|
@@ -190,7 +191,7 @@ class BigIPCookie
|
|
190
191
|
return 601 if /rd([0-9]+)o([0-9a-zA-Z]{32})o([0-9]{1,5})/.match?(cookie)
|
191
192
|
|
192
193
|
## Encrypted
|
193
|
-
return 999 if
|
194
|
+
return 999 if %r{!(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?}.match?(cookie)
|
194
195
|
|
195
196
|
raise 'Unrecognized cookie'
|
196
197
|
end
|
@@ -201,19 +202,20 @@ class BigIPCookie
|
|
201
202
|
# @return [String] the decoded cookie value
|
202
203
|
def decode_cookie(cookie, opts = {})
|
203
204
|
number = detect_cookie_type(cookie)
|
204
|
-
|
205
|
+
case number
|
206
|
+
when 400
|
205
207
|
@cookie_type = 'IPv4 pool members'
|
206
208
|
ipv4_pm(cookie)
|
207
|
-
|
209
|
+
when 401
|
208
210
|
@cookie_type = 'IPv4 pool members in non-default route domains'
|
209
211
|
ipv4_pm_ndrd(cookie)
|
210
|
-
|
212
|
+
when 600
|
211
213
|
@cookie_type = 'IPv6 pool members'
|
212
214
|
ipv6_pm(cookie, opts)
|
213
|
-
|
215
|
+
when 601
|
214
216
|
@cookie_type = 'IPv6 pool members in non-default route domains'
|
215
217
|
ipv6_pm_ndrd(cookie, opts)
|
216
|
-
|
218
|
+
when 999
|
217
219
|
@cookie_type = 'Encrypted'
|
218
220
|
encrypted(cookie)
|
219
221
|
else
|
@@ -235,7 +237,7 @@ class BigIPCookie
|
|
235
237
|
# @note
|
236
238
|
# .yardopts-dev must be used to get {decode_ip} documentation
|
237
239
|
def auto_decode(opts = {})
|
238
|
-
if
|
240
|
+
if /=/.match?(@raw_cookie) # if there is a key
|
239
241
|
if /^BIGipServer/.match?(@raw_cookie) # if default cookie name
|
240
242
|
pool_name = retrieve_pool_name
|
241
243
|
cookie_value = /^BIGipServer.*?=(.+)/.match(@raw_cookie).captures[0]
|
data/lib/bigipcookie/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rabid
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alexandre ZANNI
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-07-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: docopt
|
@@ -30,42 +30,42 @@ dependencies:
|
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '2.
|
33
|
+
version: '2.2'
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: '2.
|
40
|
+
version: '2.2'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: bundler
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
45
|
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: '2.
|
47
|
+
version: '2.1'
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: '2.
|
54
|
+
version: '2.1'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: commonmarker
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
59
|
- - "~>"
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: '0.
|
61
|
+
version: '0.21'
|
62
62
|
type: :development
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
66
|
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version: '0.
|
68
|
+
version: '0.21'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: github-markup
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
@@ -128,14 +128,14 @@ dependencies:
|
|
128
128
|
requirements:
|
129
129
|
- - "~>"
|
130
130
|
- !ruby/object:Gem::Version
|
131
|
-
version: '0.
|
131
|
+
version: '0.80'
|
132
132
|
type: :development
|
133
133
|
prerelease: false
|
134
134
|
version_requirements: !ruby/object:Gem::Requirement
|
135
135
|
requirements:
|
136
136
|
- - "~>"
|
137
137
|
- !ruby/object:Gem::Version
|
138
|
-
version: '0.
|
138
|
+
version: '0.80'
|
139
139
|
- !ruby/object:Gem::Dependency
|
140
140
|
name: yard
|
141
141
|
requirement: !ruby/object:Gem::Requirement
|
@@ -155,76 +155,25 @@ email: alexandre.zanni@engineer.com
|
|
155
155
|
executables:
|
156
156
|
- rabid
|
157
157
|
- rabid_console
|
158
|
-
- rabid_setup
|
159
158
|
extensions: []
|
160
159
|
extra_rdoc_files: []
|
161
160
|
files:
|
162
|
-
- ".gitignore"
|
163
|
-
- ".rubocop.yml"
|
164
|
-
- ".yardopts"
|
165
|
-
- ".yardopts-dev"
|
166
|
-
- Gemfile
|
167
|
-
- Gemfile.lock
|
168
161
|
- LICENSE.txt
|
169
|
-
- README.md
|
170
|
-
- Rakefile
|
171
162
|
- bin/rabid
|
172
163
|
- bin/rabid_console
|
173
|
-
- bin/rabid_setup
|
174
|
-
- docs/.nojekyll
|
175
|
-
- docs/About.md
|
176
|
-
- docs/CHANGELOG.md
|
177
|
-
- docs/README.md
|
178
|
-
- docs/_coverpage.md
|
179
|
-
- docs/_media/logo.png
|
180
|
-
- docs/_navbar.md
|
181
|
-
- docs/_sidebar.md
|
182
|
-
- docs/index.html
|
183
|
-
- docs/pages/demo.md
|
184
|
-
- docs/pages/documentation.md
|
185
|
-
- docs/pages/install.md
|
186
|
-
- docs/pages/publishing.md
|
187
|
-
- docs/pages/quick-start.md
|
188
|
-
- docs/pages/usage.md
|
189
|
-
- docs/vendor/docsify.js
|
190
|
-
- docs/vendor/plugins/emoji.min.js
|
191
|
-
- docs/vendor/plugins/search.min.js
|
192
|
-
- docs/vendor/prismjs/components/prism-ruby.min.js
|
193
|
-
- docs/vendor/themes/vue.css
|
194
|
-
- docs/why.md
|
195
|
-
- docs/yard/BigIPCookie.html
|
196
|
-
- docs/yard/BigIPCookie/Decode.html
|
197
|
-
- docs/yard/Version.html
|
198
|
-
- docs/yard/_index.html
|
199
|
-
- docs/yard/class_list.html
|
200
|
-
- docs/yard/css/common.css
|
201
|
-
- docs/yard/css/full_list.css
|
202
|
-
- docs/yard/css/style.css
|
203
|
-
- docs/yard/file.LICENSE.html
|
204
|
-
- docs/yard/file.README.html
|
205
|
-
- docs/yard/file_list.html
|
206
|
-
- docs/yard/frames.html
|
207
|
-
- docs/yard/index.html
|
208
|
-
- docs/yard/js/app.js
|
209
|
-
- docs/yard/js/full_list.js
|
210
|
-
- docs/yard/js/jquery.js
|
211
|
-
- docs/yard/method_list.html
|
212
|
-
- docs/yard/top-level-namespace.html
|
213
164
|
- lib/bigipcookie.rb
|
214
165
|
- lib/bigipcookie/version.rb
|
215
|
-
|
216
|
-
- test/test_bigipcookie.rb
|
217
|
-
homepage: https://orange-cyberdefense.github.io/rabid/
|
166
|
+
homepage: https://noraj.github.io/rabid/
|
218
167
|
licenses:
|
219
168
|
- MIT
|
220
169
|
metadata:
|
221
170
|
yard.run: yard
|
222
|
-
bug_tracker_uri: https://github.com/
|
223
|
-
changelog_uri: https://github.com/
|
224
|
-
documentation_uri: https://
|
225
|
-
homepage_uri: https://
|
226
|
-
source_code_uri: https://github.com/
|
227
|
-
post_install_message:
|
171
|
+
bug_tracker_uri: https://github.com/noraj/rabid/issues
|
172
|
+
changelog_uri: https://github.com/noraj/rabid/blob/master/docs/CHANGELOG.md
|
173
|
+
documentation_uri: https://noraj.github.io/rabid/
|
174
|
+
homepage_uri: https://noraj.github.io/rabid/
|
175
|
+
source_code_uri: https://github.com/noraj/rabid/
|
176
|
+
post_install_message:
|
228
177
|
rdoc_options: []
|
229
178
|
require_paths:
|
230
179
|
- lib
|
@@ -232,16 +181,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
232
181
|
requirements:
|
233
182
|
- - "~>"
|
234
183
|
- !ruby/object:Gem::Version
|
235
|
-
version: '2.
|
184
|
+
version: '2.7'
|
236
185
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
237
186
|
requirements:
|
238
187
|
- - ">="
|
239
188
|
- !ruby/object:Gem::Version
|
240
189
|
version: '0'
|
241
190
|
requirements: []
|
242
|
-
rubygems_version: 3.
|
243
|
-
signing_key:
|
191
|
+
rubygems_version: 3.1.2
|
192
|
+
signing_key:
|
244
193
|
specification_version: 4
|
245
194
|
summary: RApid Big IP Decoder
|
246
|
-
test_files:
|
247
|
-
- test/test_bigipcookie.rb
|
195
|
+
test_files: []
|
data/.gitignore
DELETED
data/.rubocop.yml
DELETED
@@ -1,22 +0,0 @@
|
|
1
|
-
# Metrics
|
2
|
-
AllCops:
|
3
|
-
TargetRubyVersion: 2.4
|
4
|
-
|
5
|
-
Layout/AlignHash:
|
6
|
-
Include:
|
7
|
-
- 'lib/**/*.rb'
|
8
|
-
Metrics/AbcSize:
|
9
|
-
Enabled: false
|
10
|
-
Metrics/ClassLength:
|
11
|
-
Max: 200
|
12
|
-
Metrics/CyclomaticComplexity:
|
13
|
-
Enabled: false
|
14
|
-
Metrics/LineLength:
|
15
|
-
Include:
|
16
|
-
- 'lib/**/*.rb'
|
17
|
-
Metrics/MethodLength:
|
18
|
-
Max: 25
|
19
|
-
Metrics/PerceivedComplexity:
|
20
|
-
Max: 10
|
21
|
-
Style/RedundantReturn:
|
22
|
-
Enabled: false
|
data/.yardopts
DELETED
data/.yardopts-dev
DELETED
data/Gemfile
DELETED
data/Gemfile.lock
DELETED
@@ -1,58 +0,0 @@
|
|
1
|
-
PATH
|
2
|
-
remote: .
|
3
|
-
specs:
|
4
|
-
rabid (0.0.5)
|
5
|
-
docopt (~> 0.6)
|
6
|
-
paint (~> 2.1)
|
7
|
-
|
8
|
-
GEM
|
9
|
-
remote: https://rubygems.org/
|
10
|
-
specs:
|
11
|
-
ast (2.4.0)
|
12
|
-
commonmarker (0.21.0)
|
13
|
-
ruby-enum (~> 0.5)
|
14
|
-
concurrent-ruby (1.1.5)
|
15
|
-
docopt (0.6.1)
|
16
|
-
github-markup (3.0.4)
|
17
|
-
i18n (1.8.2)
|
18
|
-
concurrent-ruby (~> 1.0)
|
19
|
-
jaro_winkler (1.5.4)
|
20
|
-
minitest (5.14.0)
|
21
|
-
paint (2.1.0)
|
22
|
-
parallel (1.19.1)
|
23
|
-
parser (2.7.0.2)
|
24
|
-
ast (~> 2.4.0)
|
25
|
-
rainbow (3.0.0)
|
26
|
-
rake (13.0.1)
|
27
|
-
redcarpet (3.5.0)
|
28
|
-
rexml (3.2.4)
|
29
|
-
rubocop (0.80.0)
|
30
|
-
jaro_winkler (~> 1.5.1)
|
31
|
-
parallel (~> 1.10)
|
32
|
-
parser (>= 2.7.0.1)
|
33
|
-
rainbow (>= 2.2.2, < 4.0)
|
34
|
-
rexml
|
35
|
-
ruby-progressbar (~> 1.7)
|
36
|
-
unicode-display_width (>= 1.4.0, < 1.7)
|
37
|
-
ruby-enum (0.7.2)
|
38
|
-
i18n
|
39
|
-
ruby-progressbar (1.10.1)
|
40
|
-
unicode-display_width (1.6.1)
|
41
|
-
yard (0.9.24)
|
42
|
-
|
43
|
-
PLATFORMS
|
44
|
-
ruby
|
45
|
-
|
46
|
-
DEPENDENCIES
|
47
|
-
bundler (~> 2.0)
|
48
|
-
commonmarker (~> 0.20)
|
49
|
-
github-markup (~> 3.0)
|
50
|
-
minitest (~> 5.11)
|
51
|
-
rabid!
|
52
|
-
rake (~> 13.0)
|
53
|
-
redcarpet (~> 3.4)
|
54
|
-
rubocop (~> 0.63)
|
55
|
-
yard (~> 0.9)
|
56
|
-
|
57
|
-
BUNDLED WITH
|
58
|
-
2.1.4
|
data/README.md
DELETED
@@ -1,32 +0,0 @@
|
|
1
|
-
# RABID
|
2
|
-
|
3
|
-
[![Gem Version](https://badge.fury.io/rb/rabid.svg)](https://badge.fury.io/rb/rabid)
|
4
|
-
![GitHub tag (latest SemVer)](https://img.shields.io/github/tag/Orange-Cyberdefense/rabid)
|
5
|
-
[![GitHub forks](https://img.shields.io/github/forks/Orange-Cyberdefense/rabid)](https://github.com/Orange-Cyberdefense/rabid/network)
|
6
|
-
[![GitHub stars](https://img.shields.io/github/stars/Orange-Cyberdefense/rabid)](https://github.com/Orange-Cyberdefense/rabid/stargazers)
|
7
|
-
[![GitHub license](https://img.shields.io/github/license/Orange-Cyberdefense/rabid)](https://github.com/Orange-Cyberdefense/rabid/blob/master/LICENSE.txt)
|
8
|
-
[![Rawsec's CyberSecurity Inventory](https://inventory.rawsec.ml/img/badges/Rawsec-inventoried-FF5050_flat.svg)](https://inventory.rawsec.ml/tools.html#Rabid)
|
9
|
-
|
10
|
-
[![Packaging status](https://repology.org/badge/vertical-allrepos/rabid.svg)](https://repology.org/project/rabid/versions)
|
11
|
-
|
12
|
-
![](https://orange-cyberdefense.github.io/rabid/_media/logo.png)
|
13
|
-
|
14
|
-
> **RA**pid **B**ig **I**P **D**ecoder
|
15
|
-
|
16
|
-
## What it is
|
17
|
-
|
18
|
-
A CLI tool and library allowing to simply decode all kind of BigIP cookies.
|
19
|
-
|
20
|
-
## Features
|
21
|
-
|
22
|
-
- Support all 4 cookie formats
|
23
|
-
- CLI tool & library
|
24
|
-
- Hackable
|
25
|
-
|
26
|
-
## References
|
27
|
-
|
28
|
-
Homepage / Documentation: https://orange-cyberdefense.github.io/rabid/
|
29
|
-
|
30
|
-
## Author
|
31
|
-
|
32
|
-
Made by Alexandre ZANNI ([@noraj](https://github.com/noraj)), pentester from Orange Cyberdefense.
|