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.

185 lines
6.0KB

  1. <!DOCTYPE html>
  2. <html lang="fr">
  3. <head>
  4. <meta charset="utf-8">
  5. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  6. <meta name="viewport" content="width=device-width, initial-scale=1">
  7. <title>Status SSL/TLS banque &amp; commerce en ligne</title>
  8. <link rel="stylesheet" href="bootstrap.min.css">
  9. <style>
  10. body {
  11. margin-top: 10px;
  12. }
  13. td {
  14. text-align: center;
  15. }
  16. .critical {
  17. background-color: #000;
  18. color: #fff;
  19. }
  20. td.critical:hover {
  21. background-color: #333 !important;
  22. }
  23. </style>
  24. </head>
  25. <body>
  26. <div class="container-fluid">
  27. <div class="row">
  28. <div class="col-md-12">
  29. <table class="table table-bordered table-hover table-condensed">
  30. <tbody>
  31. <%
  32. first = true
  33. results.each do |r|
  34. unless first
  35. %>
  36. <tr>
  37. <th colspan="17">&nbsp;</th>
  38. </tr>
  39. <%
  40. end
  41. first = false
  42. %>
  43. <tr>
  44. <th colspan="17" id="<%= r[0] %>"><%= r[0] %></th>
  45. </tr>
  46. <tr>
  47. <th>Site (IP)</th>
  48. <td>Rang</td>
  49. <td>Clef (bits)</td>
  50. <td>Chiff. (bits)</td>
  51. <td class="danger">SSL v2</td>
  52. <td class="danger">SSL v3</td>
  53. <td class="success">TLS</td>
  54. <td class="success">TLS 1.2</td>
  55. <td class="success">TLS only</td>
  56. <td class="danger">SHA1 sig</td>
  57. <td class="danger">RC4</td>
  58. <td class="danger">DES/3DES</td>
  59. <td class="danger">MD5</td>
  60. <td class="success">PFS</td>
  61. <td class="success">PFS only</td>
  62. <td class="success">HSTS</td>
  63. <td class="success">HSTS long</td>
  64. </tr>
  65. <% r[1].each do |n|
  66. s = n.server
  67. %>
  68. <tr>
  69. <th id="<%= s.hostname %>">
  70. <a href="https://www.ssllabs.com/ssltest/analyze.html?d=<%= s.hostname %>" target="_blank">
  71. <%= s.hostname %>
  72. </a>
  73. </th>
  74. <% if s.is_a? SSLCheck::NoSslTlsServer %>
  75. <td class="critical" colspan="16">
  76. No SSL/TLS
  77. </td>
  78. <%
  79. else
  80. rank_color = case n.grade
  81. when 'A+' then :info
  82. when 'A', 'A-' then :success
  83. when 'B', 'C' then :warning
  84. else :danger
  85. end
  86. %>
  87. <td class="<%= rank_color %>">
  88. <%= n.grade %>
  89. </td>
  90. <td class="<%= s.key_size < 2048 ? :danger : s.key_size < 4096 ? :warning : :success %>">
  91. <% type, size = s.key %>
  92. <%= "#{size} (#{type.to_s.upcase})" %>
  93. <span class="sr-only">(<%= s.key_size < 2048 ? '☹' : '☺' %>)</span>
  94. </td>
  95. <% cipher_size = s.cipher_size[:worst] %>
  96. <td class="<%= cipher_size < 112 ? :danger : cipher_size < 128 ? :warning : :success %>">
  97. <%= cipher_size %>
  98. <span class="sr-only">(<%= cipher_size < 128 ? '☹' : '☺' %>)</span>
  99. </td>
  100. <td class="<%= s.sslv2? ? :danger : :success %>">
  101. <%= s.sslv2? ? '✓' : '✗' %>
  102. <span class="sr-only">(<%= s.sslv2? ? '☹' : '☺' %>)</span>
  103. </td>
  104. <td class="<%= s.sslv3? ? :danger : :success %>">
  105. <%= s.sslv3? ? '✓' : '✗' %>
  106. <span class="sr-only">(<%= s.sslv3? ? '☹' : '☺' %>)</span>
  107. </td>
  108. <td class="<%= s.tls? ? :success : :danger %>">
  109. <%= s.tls? ? '✓' : '✗' %>
  110. <span class="sr-only">(<%= s.tls? ? '☺' : '☹' %>)</span>
  111. </td>
  112. <td class="<%= s.tlsv1_2? ? :success : :danger %>">
  113. <%= s.tlsv1_2? ? '✓' : '✗' %>
  114. <span class="sr-only">(<%= s.tlsv1_2? ? '☺' : '☹' %>)</span>
  115. </td>
  116. <td class="<%= s.tls_only? ? :success : :danger %>">
  117. <%= s.tls_only? ? '✓' : '✗' %>
  118. <span class="sr-only">(<%= s.tls_only? ? '☺' : '☹' %>)</span>
  119. </td>
  120. <td class="<%= s.sha1_sig? ? :danger : :success %>">
  121. <%= s.sha1_sig? ? '✓' : '✗' %>
  122. <span class="sr-only">(<%= s.sha1_sig? ? '☹' : '☺' %>)</span>
  123. </td>
  124. <td class="<%= s.rc4? ? :danger : :success %>">
  125. <%= s.rc4? ? '✓' : '✗' %>
  126. <span class="sr-only">(<%= s.rc4? ? '☹' : '☺' %>)</span>
  127. </td>
  128. <td class="<%= s.any_des? ? :danger : :success %>">
  129. <%= s.any_des? ? '✓' : '✗' %>
  130. <span class="sr-only">(<%= s.any_des? ? '☹' : '☺' %>)</span>
  131. </td>
  132. <td class="<%= s.md5? ? :danger : :success %>">
  133. <%= s.md5? ? '✓' : '✗' %>
  134. <span class="sr-only">(<%= s.md5? ? '☹' : '☺' %>)</span>
  135. </td>
  136. <td class="<%= s.pfs? ? :success : :danger %>">
  137. <%= s.pfs? ? '✓' : '✗' %>
  138. <span class="sr-only">(<%= s.pfs? ? '☺' : '☹' %>)</span>
  139. </td>
  140. <td class="<%= s.pfs_only? ? :success : :danger %>">
  141. <%= s.pfs_only? ? '✓' : '✗' %>
  142. <span class="sr-only">(<%= s.pfs_only? ? '☺' : '☹' %>)</span>
  143. </td>
  144. <td class="<%= s.hsts? ? :success : :danger %>">
  145. <%= s.hsts? ? '✓' : '✗' %>
  146. <span class="sr-only">(<%= s.hsts? ? '☺' : '☹' %>)</span>
  147. </td>
  148. <td class="<%= s.hsts_long? ? :success : :danger %>">
  149. <%= s.hsts_long? ? '✓' : '✗' %>
  150. <span class="sr-only">(<%= s.hsts_long? ? '☺' : '☹' %>)</span>
  151. </td>
  152. <% end %>
  153. </tr>
  154. <% end %>
  155. <tr>
  156. <th>Site</th>
  157. <td>Rang</td>
  158. <td>Clef (bits)</td>
  159. <td>Chiff. (bits)</td>
  160. <td class="danger">SSL v2</td>
  161. <td class="danger">SSL v3</td>
  162. <td class="success">TLS</td>
  163. <td class="success">TLS 1.2</td>
  164. <td class="success">TLS only</td>
  165. <td class="danger">SHA1 sig</td>
  166. <td class="danger">RC4</td>
  167. <td class="danger">DES/3DES</td>
  168. <td class="danger">MD5</td>
  169. <td class="success">PFS</td>
  170. <td class="success">PFS only</td>
  171. <td class="success">HSTS</td>
  172. <td class="success">HSTS long</td>
  173. </tr>
  174. <% end %>
  175. </tbody>
  176. </table>
  177. </div>
  178. </div>
  179. </div>
  180. </body>
  181. </html>