mihari 5.7.1 → 5.7.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/mihari/cli/main.rb +2 -0
- data/lib/mihari/clients/base.rb +23 -1
- data/lib/mihari/clients/binaryedge.rb +1 -3
- data/lib/mihari/clients/censys.rb +1 -2
- data/lib/mihari/clients/crtsh.rb +2 -3
- data/lib/mihari/clients/dnstwister.rb +1 -2
- data/lib/mihari/clients/fofa.rb +1 -3
- data/lib/mihari/clients/greynoise.rb +1 -2
- data/lib/mihari/clients/hunterhow.rb +1 -2
- data/lib/mihari/clients/misp.rb +1 -2
- data/lib/mihari/clients/onyphe.rb +1 -2
- data/lib/mihari/clients/otx.rb +2 -14
- data/lib/mihari/clients/passivetotal.rb +3 -16
- data/lib/mihari/clients/publsedive.rb +2 -17
- data/lib/mihari/clients/securitytrails.rb +3 -25
- data/lib/mihari/clients/shodan.rb +1 -2
- data/lib/mihari/clients/the_hive.rb +1 -2
- data/lib/mihari/clients/urlscan.rb +1 -2
- data/lib/mihari/clients/virustotal.rb +3 -17
- data/lib/mihari/clients/zoomeye.rb +9 -19
- data/lib/mihari/commands/alert.rb +11 -11
- data/lib/mihari/commands/database.rb +4 -1
- data/lib/mihari/commands/mixins.rb +11 -0
- data/lib/mihari/commands/search.rb +15 -15
- data/lib/mihari/constants.rb +1 -1
- data/lib/mihari/database.rb +1 -1
- data/lib/mihari/http.rb +13 -11
- data/lib/mihari/version.rb +1 -1
- data/lib/mihari/web/middleware/error_notification_adapter.rb +8 -3
- data/lib/mihari/web/public/assets/{index-07fafab5.js → index-ec641cb0.js} +44 -44
- data/lib/mihari/web/public/index.html +1 -1
- data/lib/mihari/web/public/redoc-static.html +400 -400
- data/lib/mihari.rb +0 -1
- data/mihari.gemspec +4 -4
- data/mkdocs.yml +14 -8
- metadata +13 -13
- data/lib/mihari/mixins/error_notification.rb +0 -21
@@ -7,16 +7,21 @@ module Mihari
|
|
7
7
|
# Error notification adapter for Rack app
|
8
8
|
#
|
9
9
|
class ErrorNotificationAdapter
|
10
|
-
include Mixins::ErrorNotification
|
11
|
-
|
12
10
|
def initialize(app)
|
13
11
|
@app = app
|
14
12
|
end
|
15
13
|
|
14
|
+
def with_error_notification
|
15
|
+
yield
|
16
|
+
rescue StandardError => e
|
17
|
+
Mihari.logger.error e
|
18
|
+
|
19
|
+
Sentry.capture_exception(e) if Sentry.initialized?
|
20
|
+
end
|
21
|
+
|
16
22
|
def call(env)
|
17
23
|
with_error_notification do
|
18
24
|
status, headers, body = @app.call(env)
|
19
|
-
|
20
25
|
[status, headers, body]
|
21
26
|
end
|
22
27
|
end
|