miteru 2.0.3 → 2.1.0

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: 4133dc72d0d07c5719999c526b8534a2dd7b5db5fe74172042b747c5cc557d4a
4
- data.tar.gz: d2f59be0a18bdaee1b74633a58b8ed59a396862defd4b80dff4ae8ae9d8199f4
3
+ metadata.gz: 7428f741cd791e37e5f201c978f4ee6b5f6fe239d350b69d3377a6af4604305d
4
+ data.tar.gz: 0057c9ee7ebe6dd5ee039939b30ff897d3298605c3843c980f2b30081ad8bc2d
5
5
  SHA512:
6
- metadata.gz: 4a311f7ffa407ed11951f8f3b7ce696510ba31f8888dff459d3a04e4a19ec892f6f7e5651b7616e70a4482cf07d92f657dc4765ef17b6f42e66a3b526c7e1e26
7
- data.tar.gz: 70b43504f29dc3646a343a87029e5c7a785d777099352717a4d2c2f26801879d2541d90ec5568f04d56c6635a35067397c4042e64a3177b6375cb74e51b5eae3
6
+ metadata.gz: b4f69cf18c8db256f035466f669835810e53329f7af7df5fd3d58689002c2e7175abb9456b31e21c0b23369e31a1559040c82f92c662202661c50cc8cc702334
7
+ data.tar.gz: d7188fe6bc2372560031fb964254f5ea6df56672edd0f112a6ebe7b41d5ad7efa2a52e6c1deb666891573990f0cf75e8b4ea768f5240cd5d25127a544e06e26c
data/.rubocop.yml ADDED
@@ -0,0 +1,2 @@
1
+ Style/StringLiterals:
2
+ EnforcedStyle: double_quotes
data/README.md CHANGED
@@ -1,7 +1,7 @@
1
1
  # Miteru
2
2
 
3
3
  [![Gem Version](https://badge.fury.io/rb/miteru.svg)](https://badge.fury.io/rb/miteru)
4
- [![Ruby CI](https://github.com/ninoseki/miteru/actions/workflows/test.yml/badge.svg)](https://github.com/ninoseki/miteru/actions/workflows/test.yml)
4
+ [![Ruby CI](https://github.com/ninoseki/miteru/actions/workflows/ruby.yml/badge.svg)](https://github.com/ninoseki/miteru/actions/workflows/ruby.yml)
5
5
  [![CodeFactor](https://www.codefactor.io/repository/github/ninoseki/miteru/badge)](https://www.codefactor.io/repository/github/ninoseki/miteru)
6
6
  [![Coverage Status](https://coveralls.io/repos/github/ninoseki/miteru/badge.svg?branch=master)](https://coveralls.io/github/ninoseki/miteru?branch=master)
7
7
 
@@ -14,12 +14,12 @@ I take no responsibility and/or liability for how you choose to use this tool.
14
14
 
15
15
  ## How It Works
16
16
 
17
- - It collects phishy URLs from the following feeds:
18
- - urlscan.io's automatic submissions. (`task.method:automatic`)
17
+ - Collect phishy URLs from the following feeds:
18
+ - urlscan.io's automatic submissions. (`task.method:automatic AND NOT task.source:urlscan-observe`)
19
19
  - urlscan.io phish feed. (available for Pro users)
20
20
  - [mitchellkrogza/Phishing.Database](https://github.com/mitchellkrogza/Phishing.Database)'s `phishing-links-ACTIVE-NOW.txt`.
21
21
  - [ninoseki/ayashige](https://github.com/ninoseki/ayashige) feed.
22
- - It checks each phishy URL whether it enables directory listing and contains phishing kits (compressed files) or not.
22
+ - Check each phishy URL whether it enables directory listing and contains phishing kits (compressed files) or not.
23
23
  - Note: Supported compressed files are: `*.zip`, `*.rar`, `*.7z`, `*.tar` and `*.gz`.
24
24
 
25
25
  ## Docs
data/lib/miteru/config.rb CHANGED
@@ -27,7 +27,8 @@ module Miteru
27
27
  threads: Parallel.processor_count,
28
28
  urlscan_api_key: nil,
29
29
  urlscan_submit_visibility: "public",
30
- urlscan_date_condition: ">now-1h",
30
+ urlscan_date_condition: "date:>now-1h",
31
+ urlscan_base_condition: "task.method:automatic AND NOT task.source:urlscan-observe",
31
32
  verbose: false
32
33
  )
33
34
 
@@ -91,6 +92,9 @@ module Miteru
91
92
  # @!attribute [r] urlscan_date_condition
92
93
  # @return [String]
93
94
 
95
+ # @!attribute [r] urlscan_base_condition
96
+ # @return [String]
97
+
94
98
  def database_url=(val)
95
99
  super(URI(val.to_s))
96
100
  end
@@ -31,7 +31,7 @@ module Miteru
31
31
  end
32
32
 
33
33
  def q
34
- "task.method:automatic AND date:#{Miteru.config.urlscan_date_condition}"
34
+ "#{base_condition} AND #{date_condition}"
35
35
  end
36
36
 
37
37
  #
@@ -59,6 +59,14 @@ module Miteru
59
59
  end
60
60
  end
61
61
  end
62
+
63
+ def base_condition
64
+ Miteru.config.urlscan_base_condition
65
+ end
66
+
67
+ def date_condition
68
+ Miteru.config.urlscan_date_condition
69
+ end
62
70
  end
63
71
  end
64
72
  end
@@ -23,7 +23,7 @@ module Miteru
23
23
  end
24
24
 
25
25
  def q
26
- "date:#{Miteru.config.urlscan_date_condition}"
26
+ Miteru.config.urlscan_date_condition
27
27
  end
28
28
 
29
29
  def format
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Miteru
4
- VERSION = "2.0.3"
4
+ VERSION = "2.1.0"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: miteru
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.3
4
+ version: 2.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Manabu Niseki
@@ -554,6 +554,7 @@ files:
554
554
  - ".github/workflows/ruby.yml"
555
555
  - ".gitignore"
556
556
  - ".rspec"
557
+ - ".rubocop.yml"
557
558
  - Gemfile
558
559
  - LICENSE
559
560
  - README.md