rapid7/metasploit-framework

View on GitHub
modules/auxiliary/scanner/sap/sap_smb_relay.rb

Summary

Maintainability
B
5 hrs
Test Coverage

Method run_mmr has 37 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  def run_mmr
    begin
      smb_uri = "\\\\#{datastore['LHOST']}\\#{Rex::Text.rand_text_alpha_lower(7)}.#{Rex::Text.rand_text_alpha_lower(3)}"

      if datastore['HttpUsername'].empty?
Severity: Minor
Found in modules/auxiliary/scanner/sap/sap_smb_relay.rb - About 1 hr to fix

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

      def initialize
        super(
          'Name' => 'SAP SMB Relay Abuse',
          'Description' => %q{
              This module exploits provides several SMB Relay abuse through different SAP
    Severity: Minor
    Found in modules/auxiliary/scanner/sap/sap_smb_relay.rb - About 1 hr to fix

      Method send_soap_rfc_request has 30 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

        def send_soap_rfc_request(data, smb_uri)
          if not valid_credentials?
            vprint_error("#{rhost}:#{rport} - Credentials needed in order to abuse the SAP SOAP RFC service")
            return
          end
      Severity: Minor
      Found in modules/auxiliary/scanner/sap/sap_smb_relay.rb - About 1 hr to fix

        Method run_xmla has 29 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

          def run_xmla
        
            if not valid_credentials?
              vprint_error("#{rhost}:#{rport} - Credentials needed in order to abuse the SAP BW service")
              return
        Severity: Minor
        Found in modules/auxiliary/scanner/sap/sap_smb_relay.rb - About 1 hr to fix

          There are no issues that match your filters.

          Category
          Status