<div class="middle">
  <ul class="attacks">
    <% @p4.attacks.each do |attack| %>
      <li>
        <input type="radio" name="attack" value="<%= attack.short_name %>" id="<%= attack.short_name %>" />
        <label for="<%= attack.short_name %>"><span></span><%= attack.short_name %></label>
      </li>
    <% end %>
  </ul>
  <div class="descriptions">
    <% @p4.attacks.each do |attack| %>
      <div class="description_for_<%= attack.short_name %>">
        <a href="http://www.cve.mitre.org/cgi-bin/cvename.cgi?name=<%= attack.cve %>"><%= attack.cve %></a>: <%= attack.name %><br />
        <%= attack.desc %>
      </div>
    <% end %>
  </div>
</div>

<div class="line with_headline">
  <h2>SELECT EXPLOIT OUTCOME</h2>
</div>

<div class="bottom">  
  <% @p4.attacks.each do |attack| %>
    <div class="attack_options_for_<%= attack.short_name %> attack_options">
      <table>
        <% i = 0 %>
        <% attack.payloads.each do |payload| %>
          <% if i == 3 %><% i = 0 %><% end %>
          <% if i == 0 %><tr><% end %>
          <td>
            <input type="radio" name="attack_payload" value="<%= payload %>" id="<%= attack.short_name %>_<%= payload %>" data-guiname="<%= attack.payload_to_guiname[payload] %>" data-description="<%= attack.payload_to_description[payload] %>" />
            <label for="<%= attack.short_name %>_<%= payload %>">
              <div class="icon"></div><div class="name"><%= attack.payload_to_guiname[payload] %></div>
            </label>
          </td>
          <% i += 1 %>
          <% if i == 3 %>
            </tr>
          <% end %>
        <% end %>
        <% if i == 1 %>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
          </tr>
        <% end %>
        <% if i == 2 %>
            <td>&nbsp;</td>
          </tr>
        <% end %>
      </table>
      
      <div class="description">
        <span class="name label"></span><span class="text"></span>
      </div>
    </div>
  <% end %>
</div>
