選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

xmpp.erb 5.6KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178
  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>XMPP</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. tr:hover > td.critical, td:hover.critical {
  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. <thead>
  31. <tr>
  32. <th rowspan="2">Host</th>
  33. <td rowspan="2">Grade</td>
  34. <td colspan="2">Certificate</td>
  35. <td colspan="4">Protocols</td>
  36. <td colspan="5">Ciphers</td>
  37. <td colspan="2">Best practices</td>
  38. </tr>
  39. <tr>
  40. <td>Key size (bits)</td>
  41. <td class="warning">SHA1 sig</td>
  42. <td class="critical">SSL v2</td>
  43. <td class="critical">SSL v3</td>
  44. <td class="success">TLS 1.2</td>
  45. <td class="info">TLS</td>
  46. <td>Strength (bits)</td>
  47. <td class="critical">MD5</td>
  48. <td class="warning">SHA1</td>
  49. <td class="critical">DES/RC4</td>
  50. <td class="danger">3DES</td>
  51. <td class="info">PFS</td>
  52. <td class="success">Required</td>
  53. </tr>
  54. </thead>
  55. <tfoot>
  56. <tr>
  57. <th rowspan="2">Host</th>
  58. <td rowspan="2">Grade</td>
  59. <td colspan="2">Certificate</td>
  60. <td colspan="4">Protocols</td>
  61. <td colspan="5">Ciphers</td>
  62. <td colspan="2">Best practices</td>
  63. </tr>
  64. <tr>
  65. <td>Key size (bits)</td>
  66. <td class="warning">SHA1 sig</td>
  67. <td class="critical">SSL v2</td>
  68. <td class="critical">SSL v3</td>
  69. <td class="success">TLS 1.2</td>
  70. <td class="info">TLS</td>
  71. <td>Strength (bits)</td>
  72. <td class="critical">MD5</td>
  73. <td class="warning">SHA1</td>
  74. <td class="critical">DES/RC4</td>
  75. <td class="danger">3DES</td>
  76. <td class="info">PFS</td>
  77. <td class="success">Required</td>
  78. </tr>
  79. </tfoot>
  80. <tbody>
  81. <% servers.each do |n|
  82. s = n.server
  83. %>
  84. <tr>
  85. <% if s.is_a? Tls::TlsNotSupportedServer %>
  86. <th id="<%= s.hostname %>"><%= s.hostname %></th>
  87. <td class="critical" colspan="16">
  88. No SSL/TLS
  89. </td>
  90. <% else
  91. rank_color = case n.grade
  92. when 'A+' then :info
  93. when 'A', 'A-' then :success
  94. when 'B', 'C' then :warning
  95. when 'T', 'M' then :critical
  96. else :danger
  97. end %>
  98. <th id="<%= s.domain %>"><%= s.domain %></th>
  99. <td class="<%= rank_color %>">
  100. <%= n.grade %>
  101. </td>
  102. <td class="<%= s.key_size < 2048 ? :danger : s.key_size < 4096 ? :warning : :success %>">
  103. <% type, size = s.key %>
  104. <%= "#{size} (#{type.to_s.upcase})" %>
  105. <span class="sr-only">(<%= s.key_size < 2048 ? '☹' : '☺' %>)</span>
  106. </td>
  107. <td class="<%= s.sha1_sig? ? :warning : :success %>">
  108. <%= s.sha1_sig? ? '✓' : '✗' %>
  109. <span class="sr-only">(<%= s.sha1_sig? ? '☹' : '☺' %>)</span>
  110. </td>
  111. <td class="<%= s.sslv2? ? :critical : :success %>">
  112. <%= s.sslv2? ? '✓' : '✗' %>
  113. <span class="sr-only">(<%= s.sslv2? ? '☹' : '☺' %>)</span>
  114. </td>
  115. <td class="<%= s.sslv3? ? :critical : :success %>">
  116. <%= s.sslv3? ? '✓' : '✗' %>
  117. <span class="sr-only">(<%= s.sslv3? ? '☹' : '☺' %>)</span>
  118. </td>
  119. <td class="<%= s.tlsv1_2? ? :success : :danger %>">
  120. <%= s.tlsv1_2? ? '✓' : '✗' %>
  121. <span class="sr-only">(<%= s.tlsv1_2? ? '☺' : '☹' %>)</span>
  122. </td>
  123. <td class="<%= s.tls? ? (s.tls_only? ? :info : :success) : :danger %>">
  124. <%= s.tls? ? '✓' : '✗' %>
  125. <span class="sr-only">(<%= s.tls? ? '☺' : '☹' %>)</span>
  126. </td>
  127. <% cipher_size = s.cipher_size[:worst] %>
  128. <td class="<%= cipher_size < 112 ? :danger : cipher_size < 128 ? :warning : :success %>">
  129. <%= cipher_size %>
  130. <span class="sr-only">(<%= cipher_size < 128 ? '☹' : '☺' %>)</span>
  131. </td>
  132. <td class="<%= s.md5? ? :critical : :success %>">
  133. <%= s.md5? ? '✓' : '✗' %>
  134. <span class="sr-only">(<%= s.md5? ? '☹' : '☺' %>)</span>
  135. </td>
  136. <td class="<%= s.sha1? ? :warning : :success %>">
  137. <%= s.sha1? ? '✓' : '✗' %>
  138. <span class="sr-only">(<%= s.sha1? ? '☹' : '☺' %>)</span>
  139. </td>
  140. <td class="<%= (s.rc4? or s.des?) ? :critical : :success %>">
  141. <%= (s.rc4? or s.des?) ? '✓' : '✗' %>
  142. <span class="sr-only">(<%= (s.rc4? or s.des?) ? '☹' : '☺' %>)</span>
  143. </td>
  144. <td class="<%= s.des3? ? :danger : :success %>">
  145. <%= s.des3? ? '✓' : '✗' %>
  146. <span class="sr-only">(<%= s.des3? ? '☹' : '☺' %>)</span>
  147. </td>
  148. <td class="<%= s.pfs? ? (s.pfs_only? ? :info : :success) : :danger %>">
  149. <%= s.pfs? ? '✓' : '✗' %>
  150. <span class="sr-only">(<%= s.pfs? ? '☺' : '☹' %>)</span>
  151. </td>
  152. <td class="<%= s.required? ? :success : :danger %>">
  153. <%= s.required? ? '✓' : '✗' %>
  154. <span class="sr-only">(<%= s.required? ? '☺' : '☹' %>)</span>
  155. </td>
  156. <% end %>
  157. </tr>
  158. <% end %>
  159. </tbody>
  160. </table>
  161. </div>
  162. </div>
  163. </div>
  164. </body>
  165. </html>