yawast 0.6.0.beta1 → 0.6.0.beta2
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/lib/scanner/plugins/dns/caa.rb +33 -1
- data/lib/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 779f6a4e3931af042ba6a710c3977dd90598c7a5
|
4
|
+
data.tar.gz: b4e509b33ff1f30567fd3e82045a528bba245194
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 17103ce8c7a19214dad58f4ae90dd5778d47c1e7238612ff6084a191e232202d2f25d23b3694c7a18cef9229e43ae47a671bd8fc335b969cf04e17b5b3a8f07d
|
7
|
+
data.tar.gz: 64be510794ac840caa60c864766fc683c6d2927e46debc85964131769db5e12997ffbff905f57b7ccc75b7b4e6114a69f1c9d8330b4657086475312dead484fe
|
@@ -22,7 +22,9 @@ module Yawast
|
|
22
22
|
ans.answer.each do |rec|
|
23
23
|
# check for CNAME first
|
24
24
|
if rec.type == 'CNAME'
|
25
|
-
Yawast::Utilities.
|
25
|
+
Yawast::Utilities.puts_info "\t\tCAA (#{domain}): CNAME Found: -> #{rec.rdata}"
|
26
|
+
|
27
|
+
follow_cname res,rec
|
26
28
|
else
|
27
29
|
# check for RDATA
|
28
30
|
if rec.rdata != nil
|
@@ -44,6 +46,36 @@ module Yawast
|
|
44
46
|
domain = domain.partition('.').last
|
45
47
|
end
|
46
48
|
end
|
49
|
+
|
50
|
+
def self.follow_cname(res, rec)
|
51
|
+
# we have a CNAME, so we should check the target, and see if it has anything
|
52
|
+
# then, we'll continue searching the chain.
|
53
|
+
cname = rec.rdata
|
54
|
+
while cname != ''
|
55
|
+
cname_ans = res.query(cname, 'CAA')
|
56
|
+
|
57
|
+
if cname_ans.answer.count > 0
|
58
|
+
ans.answer.each do |record|
|
59
|
+
if record.type == 'CNAME'
|
60
|
+
# another CNAME
|
61
|
+
Yawast::Utilities.puts_info "\t\tCAA (#{domain}): CNAME Found: -> #{rec.rdata}"
|
62
|
+
cname = rec.rdata
|
63
|
+
else
|
64
|
+
if record.rdata != nil
|
65
|
+
Yawast::Utilities.puts_info "\t\tCAA (#{domain}): #{record.rdata}"
|
66
|
+
else
|
67
|
+
Yawast::Utilities.puts_error "\t\tCAA (#{domain}): Invalid Response: #{record.answer}"
|
68
|
+
end
|
69
|
+
|
70
|
+
cname = ''
|
71
|
+
end
|
72
|
+
end
|
73
|
+
else
|
74
|
+
Yawast::Utilities.puts_info "\t\tCAA (#{cname}): No Records Found"
|
75
|
+
cname = ''
|
76
|
+
end
|
77
|
+
end
|
78
|
+
end
|
47
79
|
end
|
48
80
|
end
|
49
81
|
end
|
data/lib/version.rb
CHANGED