miteru 0.12.1 → 0.12.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +2 -4
- data/lib/miteru/crawler.rb +1 -1
- data/lib/miteru/version.rb +1 -1
- data/lib/miteru/website.rb +18 -5
- data/miteru.gemspec +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d0345bd419d2af64ac26074a1a586ed961a6dce64bcb0043ee142cac6cfe99f7
|
4
|
+
data.tar.gz: 53a828e7e50fcd83b5005eed831b29e1282f743729f2f57319dad21f51a53e59
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4c43b49597aa13659906b5eb10cc151bfb04ae89e64fa62cd18e682e978f6330bd256cac3e2c168ca6d8c8b43f2b5194d2ea16e123875e3b607c603cb1a15146
|
7
|
+
data.tar.gz: 31099a1446e773873327f1e9d51141f24386a6f0ea25d4502fd707c050a166c8406ca1528bca7cfb7b16670289c5dda689dec8764c5d83191b970118819dd843
|
data/README.md
CHANGED
@@ -44,7 +44,7 @@ Usage:
|
|
44
44
|
miteru execute
|
45
45
|
|
46
46
|
Options:
|
47
|
-
[--auto-download], [--no-auto-download] # Enable or disable auto-download of
|
47
|
+
[--auto-download], [--no-auto-download] # Enable or disable auto-download of phishing kits
|
48
48
|
[--directory-traveling], [--no-directory-traveling] # Enable or disable directory traveling
|
49
49
|
[--download-to=DOWNLOAD_TO] # Directory to download file(s)
|
50
50
|
# Default: /tmp
|
@@ -81,9 +81,7 @@ $ docker run -v /tmp:/tmp miteru execute --auto-download
|
|
81
81
|
|
82
82
|
## Aasciinema cast
|
83
83
|
|
84
|
-
[![asciicast](https://asciinema.org/a/
|
85
|
-
|
86
|
-
Note: In this demo, I stopped the process during the execution because it takes minutes to finish.
|
84
|
+
[![asciicast](https://asciinema.org/a/hHpkHhMLiiv17gmdRhVMtZWwM.svg)](https://asciinema.org/a/hHpkHhMLiiv17gmdRhVMtZWwM)
|
87
85
|
|
88
86
|
## Note
|
89
87
|
|
data/lib/miteru/crawler.rb
CHANGED
@@ -33,7 +33,7 @@ module Miteru
|
|
33
33
|
website = Website.new(url)
|
34
34
|
downloader.download_kits(website.kits) if website.has_kits? && auto_download?
|
35
35
|
notify(website) if verbose || website.has_kits?
|
36
|
-
rescue OpenSSL::SSL::SSLError, HTTP::Error,
|
36
|
+
rescue OpenSSL::SSL::SSLError, HTTP::Error, Addressable::URI::InvalidURIError => _
|
37
37
|
next
|
38
38
|
end
|
39
39
|
end
|
data/lib/miteru/version.rb
CHANGED
data/lib/miteru/website.rb
CHANGED
@@ -10,12 +10,11 @@ module Miteru
|
|
10
10
|
end
|
11
11
|
|
12
12
|
def title
|
13
|
-
doc
|
13
|
+
doc&.at_css("title")&.text
|
14
14
|
end
|
15
15
|
|
16
16
|
def kits
|
17
|
-
@kits ||=
|
18
|
-
link = a.get("href")
|
17
|
+
@kits ||= links.map do |link|
|
19
18
|
kit = Kit.new(base_url: url, link: link.to_s)
|
20
19
|
kit.valid? ? kit : nil
|
21
20
|
end.compact
|
@@ -35,7 +34,7 @@ module Miteru
|
|
35
34
|
|
36
35
|
def has_kits?
|
37
36
|
ok? && index? && kits?
|
38
|
-
rescue OpenSSL::SSL::SSLError, HTTP::Error,
|
37
|
+
rescue OpenSSL::SSL::SSLError, HTTP::Error, Addressable::URI::InvalidURIError => _
|
39
38
|
false
|
40
39
|
end
|
41
40
|
|
@@ -55,7 +54,21 @@ module Miteru
|
|
55
54
|
end
|
56
55
|
|
57
56
|
def doc
|
58
|
-
@doc ||=
|
57
|
+
@doc ||= parse_html(response.body.to_s)
|
58
|
+
end
|
59
|
+
|
60
|
+
def parse_html(html)
|
61
|
+
Oga.parse_html(html)
|
62
|
+
rescue ArgumentError, LL::ParserError => _
|
63
|
+
nil
|
64
|
+
end
|
65
|
+
|
66
|
+
def links
|
67
|
+
if doc
|
68
|
+
doc.css("a").map { |a| a.get("href") }.compact
|
69
|
+
else
|
70
|
+
[]
|
71
|
+
end
|
59
72
|
end
|
60
73
|
end
|
61
74
|
end
|
data/miteru.gemspec
CHANGED
@@ -36,7 +36,7 @@ Gem::Specification.new do |spec|
|
|
36
36
|
spec.add_dependency "down", "~> 4.8"
|
37
37
|
spec.add_dependency "http", "~> 4.1"
|
38
38
|
spec.add_dependency "oga", "~> 2.15"
|
39
|
-
spec.add_dependency "parallel", "~> 1.
|
39
|
+
spec.add_dependency "parallel", "~> 1.17"
|
40
40
|
spec.add_dependency "slack-incoming-webhooks", "~> 0.2"
|
41
41
|
spec.add_dependency "thor", "~> 0.19"
|
42
42
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: miteru
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.12.
|
4
|
+
version: 0.12.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Manabu Niseki
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-03
|
11
|
+
date: 2019-04-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -170,14 +170,14 @@ dependencies:
|
|
170
170
|
requirements:
|
171
171
|
- - "~>"
|
172
172
|
- !ruby/object:Gem::Version
|
173
|
-
version: '1.
|
173
|
+
version: '1.17'
|
174
174
|
type: :runtime
|
175
175
|
prerelease: false
|
176
176
|
version_requirements: !ruby/object:Gem::Requirement
|
177
177
|
requirements:
|
178
178
|
- - "~>"
|
179
179
|
- !ruby/object:Gem::Version
|
180
|
-
version: '1.
|
180
|
+
version: '1.17'
|
181
181
|
- !ruby/object:Gem::Dependency
|
182
182
|
name: slack-incoming-webhooks
|
183
183
|
requirement: !ruby/object:Gem::Requirement
|