#
# Copyright (c) 2006-2026 Wade Alcorn - wade@bindshell.net
# Browser Exploitation Framework (BeEF) - https://beefproject.com
# See the file 'doc/COPYING' for copying permission
#
class Beef_bind_shell < BeEF::Core::Command
  def self.options
    [
      { 'name' => 'rhost', 'ui_label' => 'Host', 'value' => '127.0.0.1' },
      { 'name' => 'rport', 'ui_label' => 'BeEF Bind Port', 'value' => '4444' },
      { 'name' => 'path', 'ui_label' => 'Path', 'value' => '/' },
      { 'name' => 'cmd', 'ui_label' => 'Command', 'value' => 'hostname' },
      { 'name' => 'shellcode', 'type' => 'combobox', 'ui_label' => 'BeEF Bind Shellcode', 'store_type' => 'arraystore',
        'store_fields' => ['shellcode'], 'store_data' => [['Windows'], ['Linux']],
        'valueField' => 'shellcode', 'displayField' => 'shellcode', 'mode' => 'local', 'autoWidth' => true }
    ]
  end

  def post_execute
    save({ 'result' => @datastore['result'] })
  end
end
