rapid7/metasploit-framework

View on GitHub

Showing 15,730 of 21,757 total issues

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

  def exe_init_options(opts)
    opts.merge!(
      {
        :template_path => datastore['EXE::Path'],
        :template => datastore['EXE::Template'],
Severity: Minor
Found in lib/msf/core/exploit/exe.rb - About 1 hr to fix

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

          def arp(target_ip=nil)
            return self.arp_cache[target_ip] if self.arp_cache[target_ip]
            return self.arp_cache[:gateway] unless should_arp? target_ip
            source_ip = Rex::Socket.source_address(target_ip)
            raise RuntimeError, "Could not access the capture process." unless self.arp_capture
    Severity: Minor
    Found in lib/msf/core/exploit/capture.rb - About 1 hr to fix

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

        def generate_cmdstager(opts = {}, pl = nil)
          select_cmdstager(opts)
      
          exe_opts = {code: pl}.merge(
            platform: target_platform,
      Severity: Minor
      Found in lib/msf/core/exploit/cmd_stager.rb - About 1 hr to fix

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

          def ascii85_encode(stream)
            eod = "~>"
            i = 0
            code = ""
            input = stream.dup
        Severity: Minor
        Found in lib/msf/core/exploit/pdf.rb - About 1 hr to fix

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

          def handle_credential_login(data, mod)
            # Required
            service_data = {
                address: data['address'],
                port: data['port'],
          Severity: Minor
          Found in lib/msf/core/module/external.rb - About 1 hr to fix

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

              def handle_intermediate_stage(conn, payload)
                if( self.module_info['Stager']['RequiresMidstager'] == false )
                  conn.put( [ payload.length ].pack('V') )
                  # returning false allows stager.rb!handle_connection() to prepend the stage_prefix if needed
                  return false
            Severity: Minor
            Found in lib/msf/core/payload/windows.rb - About 1 hr to fix

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

                def initialize(info = {})
                  super(
                    update_info(
                      info,
                      'Compat' => {
              Severity: Minor
              Found in lib/msf/core/post/file.rb - About 1 hr to fix

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

                  def generate_axis2(opts={})
                    raise if not respond_to? :stager_config
                
                    app_name = opts[:app_name] || Rex::Text.rand_text_alpha_lower(rand(8)+8)
                
                
                Severity: Minor
                Found in lib/msf/core/payload/java.rb - About 1 hr to fix

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

                    def shell_registry_getvalinfo(key, valname, view)
                      key = normalize_key(key)
                      value = {
                        'Data' => nil,
                        'Type' => nil
                  Severity: Minor
                  Found in lib/msf/core/post/windows/registry.rb - About 1 hr to fix

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

                            def service_change_startup(name, mode, server = nil)
                              if mode.is_a? Integer
                                startup_number = mode
                              else
                                case mode.downcase
                    Severity: Minor
                    Found in lib/msf/core/post/windows/services.rb - About 1 hr to fix

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

                        def win_parse_results(str)
                          tip = false
                          hashish = {}
                          lastkey = nil
                          str.each_line do |line|
                      Severity: Minor
                      Found in lib/msf/core/post/windows/cli_parse.rb - About 1 hr to fix

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

                          def busy_box_write_file(file_path, data, prepend = false)
                            if prepend
                              dir = busy_box_writable_dir
                              return false unless dir
                              cmd_exec("cp -f #{file_path} #{dir}tmp")
                        Severity: Minor
                        Found in lib/msf/core/post/linux/busy_box.rb - About 1 hr to fix

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

                                  def ldap_auth_opts_scahnnel(opts)
                                    auth_opts = {}
                                    pfx_path = opts[:ldap_cert_file]
                                    raise Msf::ValidationError, 'The LDAP::CertFile option is required when using SCHANNEL authentication.' if pfx_path.blank?
                          
                          
                          Severity: Minor
                          Found in lib/metasploit/framework/ldap/client.rb - About 1 hr to fix

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

                                    def attempt_login(credential)
                                      result_opts = {
                                        credential: credential,
                                        status: Metasploit::Model::Login::Status::INCORRECT,
                                        proof: nil,

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

                                      def attempt_login(credential)
                                        result_options = {
                                            credential: credential
                                        }
                              
                              
                              Severity: Minor
                              Found in lib/metasploit/framework/login_scanner/db2.rb - About 1 hr to fix

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

                                        def attempt_login(credential)
                                          result_opts = {
                                            credential: credential
                                          }
                                
                                
                                Severity: Minor
                                Found in lib/metasploit/framework/login_scanner/smh.rb - About 1 hr to fix

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

                                              public virtual void Exec(int oldLen)
                                              {
                                                  try {
                                                      // generate JIT-code for Payload()
                                                      Payload();
                                  Severity: Minor
                                  Found in external/source/exploits/cve-2013-0074/SilverApp1/MainPage.xaml.cs - About 1 hr to fix

                                    Function __init__ has 8 arguments (exceeds 4 allowed). Consider refactoring.
                                    Open

                                        def __init__(self, command='', username='', password='', domain='', hashes=None, share=None,
                                    Severity: Major
                                    Found in modules/auxiliary/scanner/smb/impacket/dcomexec.py - About 1 hr to fix

                                      Function check_login has 8 arguments (exceeds 4 allowed). Consider refactoring.
                                      Open

                                      def check_login(rhost, rport, targeturi, domain, username, password, timeout, user_agent):
                                      Severity: Major
                                      Found in modules/auxiliary/scanner/http/rdp_web_login.py - About 1 hr to fix

                                        Function check_logins has 8 arguments (exceeds 4 allowed). Consider refactoring.
                                        Open

                                        def check_logins(rhost, rport, targeturi, domain, usernames, passwords, timeout, user_agent):
                                        Severity: Major
                                        Found in modules/auxiliary/scanner/http/rdp_web_login.py - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language