rapid7/metasploit-framework

View on GitHub

Showing 16,065 of 22,177 total issues

Consider simplifying this complex logical expression.
Open

    if (opts[:host] or opts[:address]) and opts[:port] and opts[:proto]
      addr = opts[:host] || opts[:address]
      wspace = opts[:workspace] || self.framework.db.workspace
      host = wspace.hosts.find_by_address(addr)
      if host && host.services.count > 0
Severity: Major
Found in lib/msf/core/rpc/v10/rpc_db.rb - About 40 mins to fix

    Consider simplifying this complex logical expression.
    Open

        if good_response
          print_good("SUCCESSFUL LOGIN - #{rhost}:#{rport} - #{user.inspect}:#{pass.inspect}")
    
          # Extract device model
          the_cookie = res.get_cookies
    Severity: Major
    Found in lib/msf/core/auxiliary/cnpilot.rb - About 40 mins to fix

      Consider simplifying this complex logical expression.
      Open

            if attrs.is_a?(String) || attrs.length == 0
              self.required = required
              self.desc     = attrs.is_a?(String) ? attrs : desc
              self.enums    = [ *(enums) ].map { |x| x.to_s }
              if default.nil? && enums.length > 0
      Severity: Major
      Found in lib/msf/core/opt_base.rb - About 40 mins to fix

        Consider simplifying this complex logical expression.
        Open

              if token[0].nil? or token[0].empty?
                cred = service.creds.where(user: token[0] || "", ptype: ptype, pass: token[1] || "").first_or_initialize
              else
                cred = service.creds.find_by_user_and_ptype_and_pass(token[0] || "", ptype, token[1] || "")
                unless cred
        Severity: Major
        Found in lib/msf/core/db_manager/cred.rb - About 40 mins to fix

          Consider simplifying this complex logical expression.
          Open

              elsif res.code == 200 and
                  (
                    res.body =~ /href="http[s]*:\/\/.*\/\?*author.+title="([[:print:]]+)" /i or
                    res.body =~ /<body class="archive author author-(?:[^\s]+) author-(?:\d+)/i or
                    res.body =~ /Posts by (\w+) Feed/i or
          Severity: Major
          Found in lib/msf/core/exploit/remote/http/wordpress/users.rb - About 40 mins to fix

            Consider simplifying this complex logical expression.
            Open

                        elsif (
                              service[:display].downcase.include?("SQL Server (#{instance}".downcase) || # 2k8
                              service[:display].downcase.include?("MSSQL$#{instance}".downcase) || # 2k
                              service[:display].downcase.include?("MSSQLServer#{instance}".downcase) || # 2k5
                              service[:display].downcase == instance.downcase # If the user gets very specific
            Severity: Major
            Found in lib/msf/core/post/windows/mssql.rb - About 40 mins to fix

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

                  def __init__(self, username, password, user_domain, target_domain, cmdLineOptions):
              Severity: Minor
              Found in modules/auxiliary/gather/get_user_spns.py - About 35 mins to fix

                Function fsyms has 5 arguments (exceeds 4 allowed). Consider refactoring.
                Open

                function fsyms(mem, base, segs, want, syms)
                Severity: Minor
                Found in data/exploits/javascript_utils/utils.js - About 35 mins to fix

                  Function send_mail has 5 arguments (exceeds 4 allowed). Consider refactoring.
                  Open

                  def send_mail(to, mailserver, cmd, mfrom, port):
                  Severity: Minor
                  Found in modules/exploits/linux/smtp/haraka.py - About 35 mins to fix

                    Function check_users has 5 arguments (exceeds 4 allowed). Consider refactoring.
                    Open

                    def check_users(in_q, out_q, url, password, timeout):
                    Severity: Minor
                    Found in modules/auxiliary/gather/office365userenum.py - About 35 mins to fix

                      Function make_scanner has 5 arguments (exceeds 4 allowed). Consider refactoring.
                      Open

                      def make_scanner(payload='', pattern='', onmatch=None, connect_timeout=3, read_timeout=10):
                      Severity: Minor
                      Found in lib/msf/core/modules/external/python/metasploit/probe_scanner.py - About 35 mins to fix

                        Function verify_service has 5 arguments (exceeds 4 allowed). Consider refactoring.
                        Open

                        def verify_service(rhost, rport, targeturi, timeout, user_agent):
                        Severity: Minor
                        Found in modules/auxiliary/scanner/http/rdp_web_login.py - About 35 mins to fix

                          Method getMethod has 5 arguments (exceeds 4 allowed). Consider refactoring.
                          Open

                              private MethodHandle getMethod(Class c, String methodName,
                                      Class returnType, Class argTypes[], boolean isStaticMethod)
                          Severity: Minor
                          Found in external/source/exploits/cve-2013-2460/Exploit.java - About 35 mins to fix

                            Function start_scanner has 5 arguments (exceeds 4 allowed). Consider refactoring.
                            Open

                            def start_scanner(payload, pattern, args, onmatch, **timeouts):
                            Severity: Minor
                            Found in lib/msf/core/modules/external/python/metasploit/probe_scanner.py - About 35 mins to fix

                              Method createMBean has 5 arguments (exceeds 4 allowed). Consider refactoring.
                              Open

                                          public ObjectInstance createMBean(String className,
                                                  ObjectName name, ObjectName loaderName, Object[] params,
                                                  String[] signature) throws ReflectionException,
                              Severity: Minor
                              Found in external/source/exploits/CVE-2010-0094/Exploit.java - About 35 mins to fix

                                Method nexpose_vuln_lookup has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                Open

                                      def nexpose_vuln_lookup(doc, vid, refs, host, serv = nil)
                                Severity: Minor
                                Found in plugins/nexpose.rb - About 35 mins to fix

                                  Method rpc_db_nodes has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                  Open

                                        def rpc_db_nodes(host, port, user, pass, name)
                                  Severity: Minor
                                  Found in plugins/wmap.rb - About 35 mins to fix

                                    Method frfxpilfer has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                    Open

                                    def frfxpilfer(frfoxdbloc,session,logs,usrnm,logfile)
                                    Severity: Minor
                                    Found in scripts/meterpreter/enum_firefox.rb - About 35 mins to fix

                                      Method wmicexec has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                      Open

                                      def wmicexec(session,wmic,user,pass,trgt)
                                      Severity: Minor
                                      Found in scripts/meterpreter/remotewinenum.rb - About 35 mins to fix

                                        Method isotp_send_and_wait has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                        Open

                                          def isotp_send_and_wait(bus, srcid, dstid, data, opt = {})
                                        Severity: Minor
                                        Found in modules/auxiliary/server/local_hwbridge.rb - About 35 mins to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language