rapid7/metasploit-framework

View on GitHub
modules/exploits/unix/http/schneider_electric_net55xx_encoder.rb

Summary

Maintainability
B
4 hrs
Test Coverage

Method initialize has 45 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  def initialize(info = {})
    super(
      update_info(
        info,
        'Name' => 'Schneider Electric Pelco Endura NET55XX Encoder',
Severity: Minor
Found in modules/exploits/unix/http/schneider_electric_net55xx_encoder.rb - About 1 hr to fix

    Method do_login has 27 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

      def do_login
        change_password
        print_status("#{rhost}:22 - Attempt to start a SSH connection...")
        opts = ssh_client_defaults.merge({
          auth_methods: ['password', 'keyboard-interactive'],
    Severity: Minor
    Found in modules/exploits/unix/http/schneider_electric_net55xx_encoder.rb - About 1 hr to fix

      Method check has 26 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

        def check
          xmlPayload = '<?xml version="1.0" encoding="UTF-8"?>'\
                       '<Envelope xmlns="http://www.w3.org/2003/05/soap-envelope">'\
                       '<Header xmlns:a="http://schemas.xmlsoap.org/ws/2004/08/addressing">'\
                       '<a:Action mustUnderstand="1">http://schemas.xmlsoap.org/ws/2005/04/discovery/Probe</a:Action>'\
      Severity: Minor
      Found in modules/exploits/unix/http/schneider_electric_net55xx_encoder.rb - About 1 hr to fix

        Consider simplifying this complex logical expression.
        Open

            if xmlResponse.include?('NET5501') || xmlResponse.include?('NET5501-I') || xmlResponse.include?('NET5501-XT') || xmlResponse.include?('NET5504') || xmlResponse.include?('NET5500') || xmlResponse.include?('NET5516') || xmlResponse.include?('NET5508')
              return Exploit::CheckCode::Appears
            end
        Severity: Major
        Found in modules/exploits/unix/http/schneider_electric_net55xx_encoder.rb - About 1 hr to fix

          There are no issues that match your filters.

          Category
          Status