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.

161 lines
4.9KB

  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. </style>
  17. </head>
  18. <body>
  19. <div class="container-fluid">
  20. <div class="row">
  21. <div class="col-md-12">
  22. <table class="table table-bordered table-hover table-condensed">
  23. <tbody>
  24. <%
  25. first = true
  26. results.each do |r|
  27. unless first
  28. %>
  29. <tr>
  30. <th colspan="16">&nbsp;</th>
  31. </tr>
  32. <%
  33. end
  34. first = false
  35. %>
  36. <tr>
  37. <th colspan="16" id="<%= r[0] %>"><%= r[0] %></th>
  38. </tr>
  39. <tr>
  40. <th>Site (IP)</th>
  41. <td>Rang</td>
  42. <td>Clef (bits)</td>
  43. <td>Chiff. (bits)</td>
  44. <td class="danger">SSL</td>
  45. <td class="success">TLS</td>
  46. <td class="success">TLS 1.2</td>
  47. <td class="success">TLS only</td>
  48. <td class="danger">SHA1 sig</td>
  49. <td class="danger">RC4</td>
  50. <td class="danger">DES/3DES</td>
  51. <td class="danger">MD5</td>
  52. <td class="success">PFS</td>
  53. <td class="success">PFS only</td>
  54. <td class="success">HSTS</td>
  55. <td class="success">HSTS long</td>
  56. </tr>
  57. <% r[1].each do |n|
  58. s = n.server
  59. rank_color = case n.grade
  60. when 'A+' then :info
  61. when 'A', 'A-' then :success
  62. when 'B', 'C' then :warning
  63. else :danger
  64. end
  65. %>
  66. <tr>
  67. <th id="<%= s.hostname %>">
  68. <a href="https://www.ssllabs.com/ssltest/analyze.html?d=<%= s.hostname %>" target="_blank">
  69. <%= s.hostname %>
  70. </a>
  71. </th>
  72. <td class="<%= rank_color %>">
  73. <%= n.grade %>
  74. </td>
  75. <td class="<%= s.key_size < 2048 ? :danger : s.key_size < 4096 ? :warning : :success %>">
  76. <%= s.key_size %>
  77. (<%= s.key_size < 2048 ? '☹' : '☺' %>)
  78. </td>
  79. <% cipher_size = s.cipher_size[:worst] %>
  80. <td class="<%= cipher_size < 112 ? :danger : cipher_size < 128 ? :warning : :success %>">
  81. <%= cipher_size %>
  82. (<%= cipher_size < 128 ? '☹' : '☺' %>)
  83. </td>
  84. <td class="<%= s.ssl? ? :danger : :success %>">
  85. <%= s.ssl? ? '✓' : '✗' %>
  86. (<%= s.ssl? ? '☹' : '☺' %>)
  87. </td>
  88. <td class="<%= s.tls? ? :success : :danger %>">
  89. <%= s.tls? ? '✓' : '✗' %>
  90. (<%= s.tls? ? '☺' : '☹' %>)
  91. </td>
  92. <td class="<%= s.tlsv1_2? ? :success : :danger %>">
  93. <%= s.tlsv1_2? ? '✓' : '✗' %>
  94. (<%= s.tlsv1_2? ? '☺' : '☹' %>)
  95. </td>
  96. <td class="<%= s.tls_only? ? :success : :danger %>">
  97. <%= s.tls_only? ? '✓' : '✗' %>
  98. (<%= s.tls_only? ? '☺' : '☹' %>)
  99. </td>
  100. <td class="<%= s.sha1_sig? ? :danger : :success %>">
  101. <%= s.sha1_sig? ? '✓' : '✗' %>
  102. (<%= s.sha1_sig? ? '☹' : '☺' %>)
  103. </td>
  104. <td class="<%= s.rc4? ? :danger : :success %>">
  105. <%= s.rc4? ? '✓' : '✗' %>
  106. (<%= s.rc4? ? '☹' : '☺' %>)
  107. </td>
  108. <td class="<%= s.any_des? ? :danger : :success %>">
  109. <%= s.any_des? ? '✓' : '✗' %>
  110. (<%= s.any_des? ? '☹' : '☺' %>)
  111. </td>
  112. <td class="<%= s.md5? ? :danger : :success %>">
  113. <%= s.md5? ? '✓' : '✗' %>
  114. (<%= s.md5? ? '☹' : '☺' %>)
  115. </td>
  116. <td class="<%= s.pfs? ? :success : :danger %>">
  117. <%= s.pfs? ? '✓' : '✗' %>
  118. (<%= s.pfs? ? '☺' : '☹' %>)
  119. </td>
  120. <td class="<%= s.pfs_only? ? :success : :danger %>">
  121. <%= s.pfs_only? ? '✓' : '✗' %>
  122. (<%= s.pfs_only? ? '☺' : '☹' %>)
  123. </td>
  124. <td class="<%= s.hsts? ? :success : :danger %>">
  125. <%= s.hsts? ? '✓' : '✗' %>
  126. (<%= s.hsts? ? '☺' : '☹' %>)
  127. </td>
  128. <td class="<%= s.hsts_long? ? :success : :danger %>">
  129. <%= s.hsts_long? ? '✓' : '✗' %>
  130. (<%= s.hsts_long? ? '☺' : '☹' %>)
  131. </td>
  132. </tr>
  133. <% end %>
  134. <tr>
  135. <th>Site</th>
  136. <td>Rang</td>
  137. <td>Clef (bits)</td>
  138. <td>Chiff. (bits)</td>
  139. <td class="danger">SSL</td>
  140. <td class="success">TLS</td>
  141. <td class="success">TLS 1.2</td>
  142. <td class="success">TLS only</td>
  143. <td class="danger">SHA1 sig</td>
  144. <td class="danger">RC4</td>
  145. <td class="danger">DES/3DES</td>
  146. <td class="danger">MD5</td>
  147. <td class="success">PFS</td>
  148. <td class="success">PFS only</td>
  149. <td class="success">HSTS</td>
  150. <td class="success">HSTS long</td>
  151. </tr>
  152. <% end %>
  153. </tbody>
  154. </table>
  155. </div>
  156. </div>
  157. </div>
  158. </body>
  159. </html>