<%= Msf::Ui::Web::Common.header(framework.version, 'payloads') %> <% name = query_string['name'] step = (query_string['step'] || 0).to_i if (name == nil) %> <%# Display the payload list if one hasn't been selected %>
<%# Wizard step 0 - option selection %> <% elsif (step == 0) modinst = framework.payloads.create(name) %>
<%= Msf::Ui::Web::Common.module_icons(modinst) %>
<%= html_escape(modinst.name) %>

Name: <%= html_escape(modinst.name) %>
Version: <%= html_escape(modinst.version) %>
Authors: <%= modinst.author.map { |x| html_escape(x) }.join("
") %>
Description: <%= html_escape(modinst.description) %>
Size: <%= modinst.generate.length %>
Arch: <%= modinst.arch_to_s %>
OS: <%= modinst.platform_to_s %>


<% modinst.options.each { |name, option| next if (option.advanced?) next if (option.evasion?) %> <% } %>
<%= name %> <%= (option.required?) ? "Required" : "Optional" %> <%= option.type %> <%= html_escape(option.desc) %>
 
Max Size:
 
Restricted Characters (format: 0x00 0x01):
 
Selected Encoder:
 
Format:
 
<%# Wizard step 1 - generation %> <% elsif (step == 1) modinst = framework.payloads.create(name) badchars = query_string['badchars'] encoder = query_string['encoder'] format = query_string['format'] max_size = (query_string['max_size'] || 0).to_i # Build the options string options = '' query_string.each_pair { |k, v| next if (v == nil or v.length == 0) if (k =~ /^opt_(.*)$/) options += "#{$1}=#{v} " end } begin generation = modinst.generate_simple( 'Encoder' => (encoder == '__default') ? nil : encoder, 'BadChars' => badchars, 'Format' => format || 'c', 'OptionStr' => options, 'MaxSize' => (max_size == 0) ? nil : max_size) rescue generation = $! end %>
<%= Msf::Ui::Web::Common.module_icons(modinst) %>
<%= html_escape(modinst.name) %>

<%= generation %>
<% else %> Unknown step: <%= html_escape(step) %> <% end %> <%= Msf::Ui::Web::Common.footer %>