dap 0.1.23 → 0.1.24
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
- data/CONTRIBUTING.md +1 -1
- data/README.md +1 -1
- data/lib/dap/filter/gquic.rb +5 -3
- data/lib/dap/version.rb +1 -1
- data/spec/dap/filter/gquic_filter_spec.rb +23 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: '0480b56123e964ee478eabdc10cb36ca9058a96a'
|
4
|
+
data.tar.gz: 02e2db3f819c59e9fd788d1b94a3e393c911757b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 217ad924d85b8c6c96c1a2b24e58f1858f838fd52d4df2552fadf672a08995dac8648a9efeed46a0d4b5c5cee93493388c33a0fc2bc4703fbd163ed51ee546f4
|
7
|
+
data.tar.gz: 54608828054846803c7c2f803e86578d79bb8c4749d2e16384874d2e053a91baabb977d41930d5725858536297dd6fa114d69e13d55a5422d8ec4e1721537a03
|
data/CONTRIBUTING.md
CHANGED
@@ -141,4 +141,4 @@ When a new version of dap is to be released, you _must_ follow the instructions
|
|
141
141
|
|
142
142
|
## Misc tips on building dap
|
143
143
|
|
144
|
-
Ruby often comes prepackaged on linux/mac os systems. Although the README already mentions using rbenv
|
144
|
+
Ruby often comes prepackaged on linux/mac os systems. Although the README already mentions using `rbenv`, it useful to make sure your envoiroment is actually using `rbenv` before running any ruby commands such as `gem`, `bundle`, `ruby` or `dap` itself utilizing the `which` command to confirm that the their paths indicate they came from `rbenv`.
|
data/README.md
CHANGED
@@ -46,7 +46,7 @@ gem install dap
|
|
46
46
|
In its simplest form, DAP takes input, applies zero or more filters which modify the input, and then outputs the result. The input, filters and output are separated by plus signs (`+`). As seen from `dap -h`:
|
47
47
|
|
48
48
|
```
|
49
|
-
|
49
|
+
Usage: dap [input] + [filter] + [output]
|
50
50
|
--inputs
|
51
51
|
--outputs
|
52
52
|
--filters
|
data/lib/dap/filter/gquic.rb
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
# Documentation on what the different gquic values are
|
2
|
+
# https://github.com/quicwg/base-drafts/wiki/QUIC-Versions
|
1
3
|
module Dap
|
2
4
|
module Filter
|
3
5
|
|
@@ -22,9 +24,9 @@ module Dap
|
|
22
24
|
step = 4
|
23
25
|
while i < data.length
|
24
26
|
version = data[i..i+4-1]
|
25
|
-
# Versions start with the letter Q
|
26
|
-
if
|
27
|
-
|
27
|
+
# Versions start with the letter Q followed by number e.g. 001 - 043
|
28
|
+
if version =~ /^Q\d{3}$/
|
29
|
+
versions.push(version)
|
28
30
|
end
|
29
31
|
i = i + step
|
30
32
|
end
|
data/lib/dap/version.rb
CHANGED
@@ -5,13 +5,27 @@ describe Dap::Filter::FilterDecodeGquicVersionsResult do
|
|
5
5
|
|
6
6
|
let(:filter) { described_class.new(['data']) }
|
7
7
|
|
8
|
-
context 'testing gquic valid input' do
|
8
|
+
context 'testing gquic valid input base64 encoded output from the real world' do
|
9
9
|
let(:decode) { filter.decode(Base64.decode64("DQAAAAECAwQFUTA0NFEwNDNRMDM5UTAzNQ=="))}
|
10
10
|
it 'returns an hash w/ versions as list of versions' do
|
11
11
|
expect(decode).to eq({"versions"=> ["Q044","Q043","Q039","Q035"]})
|
12
12
|
end
|
13
13
|
end
|
14
14
|
|
15
|
+
context 'testing gquic valid input artifical example' do
|
16
|
+
let(:decode) { filter.decode("aaaaaaaaaQ044Q043Q039Q035")}
|
17
|
+
it 'returns an hash w/ versions as list of versions' do
|
18
|
+
expect(decode).to eq({"versions"=> ["Q044","Q043","Q039","Q035"]})
|
19
|
+
end
|
20
|
+
end
|
21
|
+
|
22
|
+
context 'testing gquic valid versions with invalid versions' do
|
23
|
+
let(:decode) { filter.decode("aaaaaaaaaQ044R043R039Q035")}
|
24
|
+
it 'returns an hash w/ versions as list of versions' do
|
25
|
+
expect(decode).to eq({"versions"=> ["Q044", "Q035"]})
|
26
|
+
end
|
27
|
+
end
|
28
|
+
|
15
29
|
context 'testing valid string but not gquic versions' do
|
16
30
|
let(:decode) { filter.decode("H044R043E039L035") }
|
17
31
|
it 'returns nil' do
|
@@ -19,6 +33,14 @@ describe Dap::Filter::FilterDecodeGquicVersionsResult do
|
|
19
33
|
end
|
20
34
|
end
|
21
35
|
|
36
|
+
# do not want ["Qy6j","Qrta","Ql3T","QkKf","QTUB"]
|
37
|
+
context 'testing valid string with Q in it but not gquic versions ' do
|
38
|
+
let(:decode) { filter.decode("aaaaaaaaaQy6jQrtaQl3TQkKfQTUB") }
|
39
|
+
it 'returns nil' do
|
40
|
+
expect(decode).to eq(nil)
|
41
|
+
end
|
42
|
+
end
|
43
|
+
|
22
44
|
context 'testing gquic empty string input' do
|
23
45
|
let(:decode) { filter.decode("") }
|
24
46
|
it 'returns nil' do
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dap
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.24
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Rapid7 Research
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2019-01-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec
|
@@ -255,7 +255,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
255
255
|
version: '0'
|
256
256
|
requirements: []
|
257
257
|
rubyforge_project:
|
258
|
-
rubygems_version: 2.
|
258
|
+
rubygems_version: 2.5.2
|
259
259
|
signing_key:
|
260
260
|
specification_version: 4
|
261
261
|
summary: 'DAP: The Data Analysis Pipeline'
|