mihari 4.11.0 → 4.12.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/test.yml +1 -1
- data/README.md +13 -3
- data/build_frontend.sh +0 -3
- data/docker/Dockerfile +11 -12
- data/images/Tines-Full_Logo-Tines_Black.png +0 -0
- data/lib/mihari/commands/web.rb +4 -2
- data/lib/mihari/version.rb +1 -1
- data/lib/mihari/web/app.rb +10 -4
- data/lib/mihari/web/public/assets/{fa-brands-400.c7ae37d3.ttf → fa-brands-400-b1d1c1b0.ttf} +0 -0
- data/lib/mihari/web/public/assets/fa-brands-400-c61287c2.woff2 +0 -0
- data/lib/mihari/web/public/assets/fa-regular-400-5da313b0.woff2 +0 -0
- data/lib/mihari/web/public/assets/{fa-regular-400.fdc1f753.ttf → fa-regular-400-d7b19fe2.ttf} +0 -0
- data/lib/mihari/web/public/assets/fa-solid-900-8f06540f.woff2 +0 -0
- data/lib/mihari/web/public/assets/{fa-solid-900.6d53c706.ttf → fa-solid-900-e4f6a7e9.ttf} +0 -0
- data/lib/mihari/web/public/assets/{fa-v4compatibility.4d73f280.ttf → fa-v4compatibility-2ddb3b41.ttf} +0 -0
- data/lib/mihari/web/public/assets/fa-v4compatibility-f46715c9.woff2 +0 -0
- data/lib/mihari/web/public/assets/{index.e1e67d84.css → index-07aa1ba2.css} +2 -2
- data/lib/mihari/web/public/assets/index-a7fe697b.js +63 -0
- data/lib/mihari/web/public/index.html +3 -3
- data/mihari.gemspec +13 -13
- metadata +40 -39
- data/lib/mihari/web/public/assets/fa-brands-400.3fe890d0.woff2 +0 -0
- data/lib/mihari/web/public/assets/fa-regular-400.fe69d948.woff2 +0 -0
- data/lib/mihari/web/public/assets/fa-solid-900.d27bc752.woff2 +0 -0
- data/lib/mihari/web/public/assets/fa-v4compatibility.7d1c2ce5.woff2 +0 -0
- data/lib/mihari/web/public/assets/index.d3a61a69.js +0 -68
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 16412e44a6aa5eb9fb7022aa531b950249df76f074136e71c6621e5f2d3c7d44
|
4
|
+
data.tar.gz: 403f780911934e891ef072c87a3a6ae48d31f1854c8806d4c9ece884faf9ec62
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: edde8ae3fb93a7e3719788c6727782f7f9a9e2ae53eaa9d804342e545e0ca5e9ec6bb96d633f9c26a33f98e4addaf8693b6da37de8930f8770847a531665baa0
|
7
|
+
data.tar.gz: afda1bef59be058cbb5972d771bf7615820cc4588cae6cc53c2f2d39333e02edce9a3165dee30caf0996195ab09565392316d116040ce5cc93dbdac28b04c239
|
data/.github/workflows/test.yml
CHANGED
data/README.md
CHANGED
@@ -5,9 +5,19 @@
|
|
5
5
|
[![Coverage Status](https://coveralls.io/repos/github/ninoseki/mihari/badge.svg?branch=master)](https://coveralls.io/github/ninoseki/mihari?branch=master)
|
6
6
|
[![CodeFactor](https://www.codefactor.io/repository/github/ninoseki/mihari/badge)](https://www.codefactor.io/repository/github/ninoseki/mihari)
|
7
7
|
|
8
|
-
|
9
|
-
|
10
|
-
|
8
|
+
---
|
9
|
+
|
10
|
+
<p align="center">
|
11
|
+
<img src="https://github.com/ninoseki/mihari/raw/master/images/logo.png"/>
|
12
|
+
<br/>
|
13
|
+
<a href="https://tines.io?utm_source=github&utm_medium=sponsorship&utm_campaign=ninoseki">
|
14
|
+
<img src="https://github.com/ninoseki/mihari/raw/master/images/Tines-Full_Logo-Tines_Black.png"/>
|
15
|
+
</a>
|
16
|
+
<br/>
|
17
|
+
Mihari is proudly supported by <a href="https://tines.io?utm_source=github&utm_medium=sponsorship&utm_campaign=ninoseki">Tines</a>
|
18
|
+
</p>
|
19
|
+
|
20
|
+
---
|
11
21
|
|
12
22
|
Mihari is a tool for OSINT based threat hunting.
|
13
23
|
|
data/build_frontend.sh
CHANGED
@@ -15,8 +15,5 @@ trash -r ${CURRENT_DIR}/lib/mihari/web/public/
|
|
15
15
|
mkdir -p ${CURRENT_DIR}/lib/mihari/web/public/
|
16
16
|
cp -r dist/* ${CURRENT_DIR}/lib/mihari/web/public
|
17
17
|
|
18
|
-
# replace favicon path
|
19
|
-
sed -i "" 's/href="\/favicon.ico"/href="\/static\/favicon.ico"/' ${CURRENT_DIR}/lib/mihari/web/public/index.html
|
20
|
-
|
21
18
|
# remove tmp dir
|
22
19
|
rm -rf ${CURRENT_DIR}/tmp/mihari-frontend
|
data/docker/Dockerfile
CHANGED
@@ -1,15 +1,14 @@
|
|
1
|
-
FROM ruby:3.
|
2
|
-
|
3
|
-
RUN apk --no-cache add git build-base ruby-dev sqlite-dev postgresql-dev mysql-client mysql-dev \
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
&& apk del --purge git build-base ruby-dev
|
1
|
+
FROM ruby:3.1.3-alpine3.17
|
2
|
+
|
3
|
+
RUN apk --no-cache add git build-base ruby-dev sqlite-dev postgresql-dev mysql-client mysql-dev && \
|
4
|
+
gem install pg mysql2
|
5
|
+
|
6
|
+
ARG MIHARI_VERSION=4.11.0
|
7
|
+
|
8
|
+
RUN gem install mihari -v ${MIHARI_VERSION}
|
9
|
+
|
10
|
+
RUN apk del --purge git build-base ruby-dev
|
12
11
|
|
13
12
|
ENTRYPOINT ["mihari"]
|
14
13
|
|
15
|
-
CMD ["--help"]
|
14
|
+
CMD ["--help"]
|
Binary file
|
data/lib/mihari/commands/web.rb
CHANGED
@@ -8,18 +8,20 @@ module Mihari
|
|
8
8
|
desc "web", "Launch the web app"
|
9
9
|
method_option :port, type: :numeric, default: 9292, desc: "Hostname to listen on"
|
10
10
|
method_option :host, type: :string, default: "localhost", desc: "Port to listen on"
|
11
|
-
method_option :threads, type: :string, default: "
|
11
|
+
method_option :threads, type: :string, default: "0:5", desc: "min:max threads to use"
|
12
12
|
method_option :verbose, type: :boolean, default: true, desc: "Report each request"
|
13
|
+
method_option :worker_timeout, type: :numeric, default: 60, desc: "Worker timeout value (in seconds)"
|
13
14
|
def web
|
14
15
|
port = options["port"]
|
15
16
|
host = options["host"]
|
16
17
|
threads = options["threads"]
|
17
18
|
verbose = options["verbose"]
|
19
|
+
worker_timeout = options["worker_timeout"]
|
18
20
|
|
19
21
|
# set rack env as production
|
20
22
|
ENV["RACK_ENV"] ||= "production"
|
21
23
|
|
22
|
-
Mihari::App.run!(port: port, host: host, threads: threads, verbose: verbose)
|
24
|
+
Mihari::App.run!(port: port, host: host, threads: threads, verbose: verbose, worker_timeout: worker_timeout)
|
23
25
|
end
|
24
26
|
end
|
25
27
|
end
|
data/lib/mihari/version.rb
CHANGED
data/lib/mihari/web/app.rb
CHANGED
@@ -31,7 +31,7 @@ module Mihari
|
|
31
31
|
use Rack::Cors do
|
32
32
|
allow do
|
33
33
|
origins "*"
|
34
|
-
resource "*", headers: :any, methods: [
|
34
|
+
resource "*", headers: :any, methods: %i[get post put delete options]
|
35
35
|
end
|
36
36
|
end
|
37
37
|
|
@@ -42,7 +42,7 @@ module Mihari
|
|
42
42
|
end.to_app
|
43
43
|
end
|
44
44
|
|
45
|
-
def run!(port: 9292, host: "localhost", threads: "
|
45
|
+
def run!(port: 9292, host: "localhost", threads: "0:5", verbose: false, worker_timeout: 60)
|
46
46
|
url = "http://#{host}:#{port}"
|
47
47
|
|
48
48
|
# set maximum number of threads to use as PARALLEL_PROCESSOR_COUNT (if it is not set)
|
@@ -50,8 +50,14 @@ module Mihari
|
|
50
50
|
# TODO: is this the best way?
|
51
51
|
_min_thread, max_thread = threads.split(":")
|
52
52
|
ENV["PARALLEL_PROCESSOR_COUNT"] = max_thread if ENV["PARALLEL_PROCESSOR_COUNT"].nil?
|
53
|
-
|
54
|
-
|
53
|
+
Rack::Handler::Puma.run(
|
54
|
+
instance,
|
55
|
+
Port: port,
|
56
|
+
Host: host,
|
57
|
+
Threads: threads,
|
58
|
+
Verbose: verbose,
|
59
|
+
worker_timeout: worker_timeout
|
60
|
+
) do |_launcher|
|
55
61
|
Launchy.open(url) if ENV["RACK_ENV"] != "development"
|
56
62
|
rescue Launchy::CommandNotFoundError
|
57
63
|
# ref. https://github.com/ninoseki/mihari/issues/477
|
Binary file
|
Binary file
|
Binary file
|
data/lib/mihari/web/public/assets/{fa-regular-400.fdc1f753.ttf → fa-regular-400-d7b19fe2.ttf}
RENAMED
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|