You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: nagios_graph_explorer.rb
    path of file: ./repos/metasploit-framework/modules/exploits/unix/webapp
    
    the code of the file until where you have to start completion: ##
# This module requires Metasploit: https://metasploit.com/download
# Current source: https://github.com/rapid7/metasploit-framework
##

class MetasploitModule < Msf::Exploit::Remote
  Rank = ExcellentRanking

  include Msf::Exploit::Remote::HttpClient

  def initialize(info={})
    super(update_info(info,
      'Name'           => "Nagios XI Network Monitor Graph Explorer Component Command Injection",
      'Description'    => %q{
          This module exploits a vulnerability found in Nagios XI Network Monitor's
        component 'Graph Explorer'.  An authenticated user can execute system commands
        by injecting it in several parameters, such as in visApi.php's 'host' parameter,
        which results in remote code execution.
      },
      'License'        => MSF_LICENSE,
      'Author'         =>
        [
          'Daniel Compton <daniel.compton[at]ngssecure.com>', #Original discovery
          'sinn3r'
     
    
  def initialize(info={})
    super(update_info(info,
      'Name'           => "Nagios XI Network Monitor Graph Explorer Component Command Injection",
      'Description'    => %q{
          This module exploits a vulnerability found in Nagios XI Network Monitor's
        component 'Graph Explorer'.  An authenticated user can execute system commands
        by injecting it in several parameters, such as in visApi.php's 'host' parameter,
        which results in remote code execution.
      },
      'License'        => MSF_LICENSE,
      'Author'         =>
        [
          'Daniel Compton <daniel.compton[at]ngssecure.com>', #Original discovery
          'sinn3r'
        ],
      'References'     =>
        [
          [ 'OSVDB', '83552' ],
          [ 'BID', '54263' ],
          [ 'PACKETSTORM', '118497' ]
        ],
      'Payload'        =>
        {
          'BadChars' => "\x00\x0d\x0a",
          'Compat'      =>
            {
              'PayloadType' => 'cmd',
              'RequiredCmd' => 'generic perl python ruby telnet',
            }
        },
      'Platform'       => ['unix'],
      'Arch'           => ARCH_CMD,
      'Targets'        =>
        [
          ['Graph Explorer Component prior to 1.3', {}]
        ],
      'Privileged'     => false,
      'DisclosureDate' => '2012-11-30',
      'DefaultTarget'  => 0))

    register_options(
      [
        # URI isn't registered, because this is set by the installer.
        OptString.new('USERNAME', [true, 'The username to login as', 'nagiosadmin']),
        OptString.new('PASSWORD', [true, 'The password to use'])
      ])
  end