mihari 5.7.1 → 5.7.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (38) hide show
  1. checksums.yaml +4 -4
  2. data/lib/mihari/cli/main.rb +2 -0
  3. data/lib/mihari/clients/base.rb +23 -1
  4. data/lib/mihari/clients/binaryedge.rb +1 -3
  5. data/lib/mihari/clients/censys.rb +1 -2
  6. data/lib/mihari/clients/crtsh.rb +2 -3
  7. data/lib/mihari/clients/dnstwister.rb +1 -2
  8. data/lib/mihari/clients/fofa.rb +1 -3
  9. data/lib/mihari/clients/greynoise.rb +1 -2
  10. data/lib/mihari/clients/hunterhow.rb +1 -2
  11. data/lib/mihari/clients/misp.rb +1 -2
  12. data/lib/mihari/clients/onyphe.rb +1 -2
  13. data/lib/mihari/clients/otx.rb +2 -14
  14. data/lib/mihari/clients/passivetotal.rb +3 -16
  15. data/lib/mihari/clients/publsedive.rb +2 -17
  16. data/lib/mihari/clients/securitytrails.rb +3 -25
  17. data/lib/mihari/clients/shodan.rb +1 -2
  18. data/lib/mihari/clients/the_hive.rb +1 -2
  19. data/lib/mihari/clients/urlscan.rb +1 -2
  20. data/lib/mihari/clients/virustotal.rb +3 -17
  21. data/lib/mihari/clients/zoomeye.rb +9 -19
  22. data/lib/mihari/commands/alert.rb +11 -11
  23. data/lib/mihari/commands/database.rb +4 -1
  24. data/lib/mihari/commands/mixins.rb +11 -0
  25. data/lib/mihari/commands/search.rb +15 -15
  26. data/lib/mihari/constants.rb +1 -1
  27. data/lib/mihari/database.rb +1 -1
  28. data/lib/mihari/http.rb +13 -11
  29. data/lib/mihari/version.rb +1 -1
  30. data/lib/mihari/web/middleware/error_notification_adapter.rb +8 -3
  31. data/lib/mihari/web/public/assets/{index-07fafab5.js → index-ec641cb0.js} +44 -44
  32. data/lib/mihari/web/public/index.html +1 -1
  33. data/lib/mihari/web/public/redoc-static.html +400 -400
  34. data/lib/mihari.rb +0 -1
  35. data/mihari.gemspec +4 -4
  36. data/mkdocs.yml +14 -8
  37. metadata +13 -13
  38. 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