INNER CODE UNIT · Ruby

print_header

Hackplayers/evil-winrm · evil-winrm.rb:330

  def print_header
    print_message("Evil-WinRM shell v#{VERSION}", TYPE_INFO, false)
  end

  # Generate connection object
  def connection_initialization
    # If using Kerberos and host is an IP, ask user if they want to resolve it to FQDN
    if (!$ccache_file.nil? || !$realm.nil?) && is_ip_address?($host)
      puts
      print_message("IP address detected (#{$host}). Kerberos requires FQDN. Do you want to attempt reverse DNS lookup?", TYPE_WARNING, true, $logger)
      print_message('Press "y" to attempt DNS resolution, press any other key to cancel', TYPE_WARNING, true, $logger)
      response = $stdin.getch.downcase
      puts

      if response == 'y'
        print_message("Attempting reverse DNS lookup to get FQDN for Kerberos...", TYPE_INFO, true, $logger)
        fqdn = resolve_ip_to_fqdn($host, $realm)
        if fqdn

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…