You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

show.html.erb 1.9KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. <div class="container">
  2. <div class="row">
  3. <div class="col-sm-11">
  4. <h1>
  5. [SSH] <%= @host %> <span class="small">(<%= l @result.date %>)</span>
  6. </h1>
  7. </div>
  8. <% if Time.now - @result.date >= Rails.configuration.refresh_delay %>
  9. <div class="col-sm-1">
  10. <%= link_to t('Refresh'), {action: :refresh}, class: %i(btn btn-default) %>
  11. </div>
  12. <% end %>
  13. </div>
  14. <%
  15. @result.hosts.each do |host|
  16. if host.error
  17. error, host = host.error, host.host
  18. %>
  19. <div class="row">
  20. <div class="col-sm-12">
  21. <h2><%= host.name %> - <%= host.ip %> : <%= host.port %></h2>
  22. <%= t 'Error during analysis:' %>
  23. <span class="label label-error"><%= error %></span>
  24. </div>
  25. </div>
  26. <%
  27. else
  28. host, server = host.host, host.handshake
  29. %>
  30. <div class="row">
  31. <div class="col-sm-12">
  32. <h2><%= host.name %> - <%= host.ip %> : <%= host.port %></h2>
  33. </div>
  34. </div>
  35. <div class="row">
  36. <div class="col-sm-12">
  37. <table class="table table-bordered table-condensed table-striped">
  38. <tbody>
  39. <tr>
  40. <th><%= t 'Key exchange' %></th>
  41. </tr>
  42. <% server.kex.each do |kex| %>
  43. <tr>
  44. <td><%= kex_label kex %></td>
  45. </tr>
  46. <% end %>
  47. <tr>
  48. <th><%= t 'Cipher' %></th>
  49. </tr>
  50. <% server.encryption.each do |cipher| %>
  51. <tr>
  52. <td><%= cipher_label cipher %></td>
  53. </tr>
  54. <% end %>
  55. <tr>
  56. <th><%= t 'HMAC' %></th>
  57. </tr>
  58. <% server.hmac.each do |hmac| %>
  59. <tr>
  60. <td><%= hmac_label hmac %></td>
  61. </tr>
  62. <% end %>
  63. <tr>
  64. <th><%= t 'Compression' %></th>
  65. </tr>
  66. <% server.compression.each do |compression| %>
  67. <tr>
  68. <td><%= compression_label compression %></td>
  69. </tr>
  70. <% end %>
  71. <tr>
  72. <th><%= t 'Keys' %></th>
  73. </tr>
  74. <% server.key_.each do |key| %>
  75. <tr>
  76. <td><%= key_label key %></td>
  77. </tr>
  78. <% end %>
  79. </tbody>
  80. </table>
  81. </div>
  82. </div>
  83. <% end
  84. end %>
  85. </div>