Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

xmpp.erb 6.0KB

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