dap 0.0.17 → 0.0.18
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/dap/filter/http.rb +2 -2
- data/lib/dap/version.rb +1 -1
- data/spec/dap/filter/http_filter_spec.rb +28 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 867e514a4d19ea3b3b9b70125fcd2f901fc9f006
|
4
|
+
data.tar.gz: e26bee2e6c949d7cd844c66944f637b557ac5ae1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 258052902d6c6d25e37657f29a9b1a235ea138e59ed11577c0ffdb11f5f0b74bf33e3a9d74908cf0514802f6495143e9ab058c5311e650b1eda7e1ff13cdb7fd
|
7
|
+
data.tar.gz: f92c2afc884c726d2100bced1ecc63e8a749d5def35a4727012ecba147be13ce31fdababe597e1bd746285475e71df9376f77b0403130ab808b6c078e41619cb
|
data/lib/dap/filter/http.rb
CHANGED
@@ -38,7 +38,7 @@ module HTMLGhetto
|
|
38
38
|
Shellwords.shellwords(astr).each do |attr_str|
|
39
39
|
aname, avalue = attr_str.split('=', 2).map{|x| x.to_s.strip }
|
40
40
|
avalue = avalue.to_s.gsub(/^\"|"$/, '')
|
41
|
-
o[aname] = @coder.decode(avalue)
|
41
|
+
o[aname.downcase] = @coder.decode(avalue)
|
42
42
|
end
|
43
43
|
rescue ::Interrupt
|
44
44
|
raise $!
|
@@ -47,7 +47,7 @@ module HTMLGhetto
|
|
47
47
|
astr.to_s.split(/\s+/).each do |attr_str|
|
48
48
|
aname, avalue = attr_str.split('=', 2).map{|x| x.to_s.strip }
|
49
49
|
avalue = avalue.to_s.gsub(/^\"|"$/, '')
|
50
|
-
o[aname] = @coder.decode(avalue)
|
50
|
+
o[aname.downcase] = @coder.decode(avalue)
|
51
51
|
end
|
52
52
|
end
|
53
53
|
res << o
|
data/lib/dap/version.rb
CHANGED
@@ -51,3 +51,31 @@ describe Dap::Filter::FilterDecodeHTTPReply do
|
|
51
51
|
|
52
52
|
end
|
53
53
|
end
|
54
|
+
|
55
|
+
describe Dap::Filter::FilterHTMLLinks do
|
56
|
+
describe '.process' do
|
57
|
+
|
58
|
+
let(:filter) { described_class.new(['data']) }
|
59
|
+
|
60
|
+
context 'lowercase' do
|
61
|
+
let(:processed) { filter.process({'data' => '<a href="a"/><a href="b"/>'}) }
|
62
|
+
it 'extracted the correct links' do
|
63
|
+
expect(processed.map { |p| p['link'] }).to eq(%w(a b))
|
64
|
+
end
|
65
|
+
end
|
66
|
+
|
67
|
+
context 'uppercase' do
|
68
|
+
let(:processed) { filter.process({'data' => '<A HREF="a"/><A HREF="b"/>'}) }
|
69
|
+
it 'extracted the correct links' do
|
70
|
+
expect(processed.map { |p| p['link'] }).to eq(%w(a b))
|
71
|
+
end
|
72
|
+
end
|
73
|
+
|
74
|
+
context 'scattercase' do
|
75
|
+
let(:processed) { filter.process({'data' => '<A HrEf="a"/><A HrEf="b"/>'}) }
|
76
|
+
it 'extracted the correct links' do
|
77
|
+
expect(processed.map { |p| p['link'] }).to eq(%w(a b))
|
78
|
+
end
|
79
|
+
end
|
80
|
+
end
|
81
|
+
end
|
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.0.
|
4
|
+
version: 0.0.18
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Rapid7 Research
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-03-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec
|