INNER CODE UNIT · Ruby
arguments
Hackplayers/evil-winrm · evil-winrm.rb:204
def arguments
options = { port: $port, url: $url, service: $service, user_agent: $user_agent }
optparse = OptionParser.new do |opts|
opts.banner = 'Usage: evil-winrm -i IP -u USER [-s SCRIPTS_PATH] [-e EXES_PATH] [-P PORT] [-a USERAGENT] [-p PASS] [-H HASH] [-U URL] [-S] [-c PUBLIC_KEY_PATH ] [-k PRIVATE_KEY_PATH ] [-r REALM] [-K TICKET_FILE] [--spn SPN_PREFIX] [-l]'
opts.on('-S', '--ssl', 'Enable ssl') do |_val|
$ssl = true
options[:port] = '5986'
end
opts.on('-c', '--pub-key PUBLIC_KEY_PATH', 'Local path to public key certificate') do |val|
options[:pub_key] = val
end
opts.on('-k', '--priv-key PRIVATE_KEY_PATH', 'Local path to private key certificate') do |val|
options[:priv_key] = val
end
opts.on('-r', '--realm DOMAIN',
'Kerberos auth, it has to be set also in /etc/krb5.conf file using this format -> CONTOSO.COM = { kdc = fooserver.contoso.com }') do |val|
options[:realm] = val.upcase
end