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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c06dbaa1d46bc20c70d44bf5a3fda286e45a9f5bdb5046e9c900e3c6aa5e86a5
4
- data.tar.gz: c512cddc5e3c53875e9cc0c0c7db5b61e45fb301ce7cac2a0ab5b46167729df4
3
+ metadata.gz: d0345bd419d2af64ac26074a1a586ed961a6dce64bcb0043ee142cac6cfe99f7
4
+ data.tar.gz: 53a828e7e50fcd83b5005eed831b29e1282f743729f2f57319dad21f51a53e59
5
5
  SHA512:
6
- metadata.gz: 7321f78b8d68ce7434f9aaf29b4d781b0cac49ccf48b6a4f9944e6154c55ad0185bc7fe91625a46d7dece574f121d41523df63e761efa264fd4866370c85ccbd
7
- data.tar.gz: 4589f29b656ecec1fe9cc03cad0395b49b5f0a9bf674fb36bbcf13b4b2ebfa6cb0601f1d80ea1b94a2fd9f5d33f23b3654c6bc5852a810977da93dcf39f6a2f6
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 compressed file(s)
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/ga6ZbwuK1HOLOyELb23QrSvJP.svg)](https://asciinema.org/a/ga6ZbwuK1HOLOyELb23QrSvJP)
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
 
@@ -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, LL::ParserError, Addressable::URI::InvalidURIError => _
36
+ rescue OpenSSL::SSL::SSLError, HTTP::Error, Addressable::URI::InvalidURIError => _
37
37
  next
38
38
  end
39
39
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Miteru
4
- VERSION = "0.12.1"
4
+ VERSION = "0.12.2"
5
5
  end
@@ -10,12 +10,11 @@ module Miteru
10
10
  end
11
11
 
12
12
  def title
13
- doc.at_css("title")&.text
13
+ doc&.at_css("title")&.text
14
14
  end
15
15
 
16
16
  def kits
17
- @kits ||= doc.css("a").map do |a|
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, LL::ParserError, Addressable::URI::InvalidURIError => _
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 ||= Oga.parse_html(response.body.to_s)
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.16"
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.1
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-30 00:00:00.000000000 Z
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.16'
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.16'
180
+ version: '1.17'
181
181
  - !ruby/object:Gem::Dependency
182
182
  name: slack-incoming-webhooks
183
183
  requirement: !ruby/object:Gem::Requirement