miteru 0.5.0 → 0.6.0
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/README.md +10 -1
- data/lib/miteru/cli.rb +3 -2
- data/lib/miteru/crawler.rb +4 -4
- data/lib/miteru/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 166a1fddc570f084a95e186663f2e180834dcfa1066678991c4d6ea27f2f1af4
|
|
4
|
+
data.tar.gz: bc44cf63a3d83664550920d04b2fa527b1c05cb92229a0f661cd0686ce2f2cb8
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 90e6bb04c2054742753eb92015443792afdd43002ccb16b9e96119d96627c0c4b34264382412e98b449f3474aeb95dfdebc51d6302c79b3071b17d82ceb4ac97
|
|
7
|
+
data.tar.gz: 1c65f5dea8bab1c7a7abe44814d0f2703cab12b3e8e3049bb89635540f205d54e3b7396830af0404732706f186b336af2c573c116c54cbb546058a3123ec21cc
|
data/README.md
CHANGED
|
@@ -36,9 +36,11 @@ Options:
|
|
|
36
36
|
[--auto-download], [--no-auto-download] # Enable or disable auto-download of *.zip file(s)
|
|
37
37
|
[--download-to=DOWNLOAD_TO] # Directory to download file(s)
|
|
38
38
|
# Default: /tmp
|
|
39
|
+
[--post-to-slack], [--no-post-to-slack] # Post a message to Slack if it detects a phishing kit
|
|
39
40
|
[--size=N] # Number of urlscan.io's results. (Max: 100,000)
|
|
40
41
|
# Default: 100
|
|
41
|
-
[--
|
|
42
|
+
[--threads=N] # Number of threads to use
|
|
43
|
+
# Default: 10
|
|
42
44
|
[--verbose], [--no-verbose]
|
|
43
45
|
# Default: true
|
|
44
46
|
|
|
@@ -53,3 +55,10 @@ https://dummy2.com: it doesn't contain a phishing kit.
|
|
|
53
55
|
https://dummy3.com: it doesn't contain a phishing kit.
|
|
54
56
|
https://dummy4.com: it might contain a phishing kit (dummy.zip).
|
|
55
57
|
```
|
|
58
|
+
|
|
59
|
+
## Note
|
|
60
|
+
|
|
61
|
+
For using `--post-to-slack` feature, you should set the following environment variables:
|
|
62
|
+
|
|
63
|
+
- `SLACK_WEBHOOK_URL`: Your Slack Webhook URL.
|
|
64
|
+
- `SLACK_CHANNEL`: Slack channel to post a message (default: "#general").
|
data/lib/miteru/cli.rb
CHANGED
|
@@ -10,12 +10,13 @@ module Miteru
|
|
|
10
10
|
class CLI < Thor
|
|
11
11
|
method_option :auto_download, type: :boolean, default: false, desc: "Enable or disable auto-download of *.zip file(s)"
|
|
12
12
|
method_option :download_to, type: :string, default: "/tmp", desc: "Directory to download file(s)"
|
|
13
|
-
method_option :size, type: :numeric, default: 100, desc: "Number of urlscan.io's results. (Max: 100,000)"
|
|
14
13
|
method_option :post_to_slack, type: :boolean, default: false, desc: "Post a message to Slack if it detects a phishing kit"
|
|
14
|
+
method_option :size, type: :numeric, default: 100, desc: "Number of urlscan.io's results. (Max: 100,000)"
|
|
15
|
+
method_option :threads, type: :numeric, default: 10, desc: "Number of threads to use"
|
|
15
16
|
method_option :verbose, type: :boolean, default: true
|
|
16
17
|
desc "execute", "Execute the crawler"
|
|
17
18
|
def execute
|
|
18
|
-
websites = Crawler.execute(size: options[:size], verbose: options[:verbose])
|
|
19
|
+
websites = Crawler.execute(size: options[:size], threads: options[:threads], verbose: options[:verbose])
|
|
19
20
|
websites.each do |website|
|
|
20
21
|
next unless website.has_kit?
|
|
21
22
|
|
data/lib/miteru/crawler.rb
CHANGED
|
@@ -14,9 +14,9 @@ module Miteru
|
|
|
14
14
|
URLSCAN_ENDPOINT = "https://urlscan.io/api/v1"
|
|
15
15
|
OPENPHISH_ENDPOINT = "https://openphish.com"
|
|
16
16
|
|
|
17
|
-
def initialize(size: 100, verbose: false)
|
|
18
|
-
@threads = 10
|
|
17
|
+
def initialize(size: 100, threads: 10, verbose: false)
|
|
19
18
|
@size = size
|
|
19
|
+
@threads = threads
|
|
20
20
|
@verbose = verbose
|
|
21
21
|
raise ArgumentError, "size must be less than 100,000" if size > 100_000
|
|
22
22
|
end
|
|
@@ -70,8 +70,8 @@ module Miteru
|
|
|
70
70
|
websites
|
|
71
71
|
end
|
|
72
72
|
|
|
73
|
-
def self.execute(size: 100, verbose: false)
|
|
74
|
-
new(size: size, verbose: verbose).execute
|
|
73
|
+
def self.execute(size: 100, threads: 10, verbose: false)
|
|
74
|
+
new(size: size, threads: threads, verbose: verbose).execute
|
|
75
75
|
end
|
|
76
76
|
|
|
77
77
|
private
|
data/lib/miteru/version.rb
CHANGED