rapid7/metasploit-framework

View on GitHub

Showing 16,065 of 22,177 total issues

Avoid too many return statements within this method.
Open

                return "#{cred.id}:$cram_md5$#{Rex::Text.encode_base64(data[0])}$#{password}"
Severity: Major
Found in lib/metasploit/framework/password_crackers/hashcat/formatter.rb - About 30 mins to fix

    Avoid too many return statements within this method.
    Open

                  return ['pbkdf2,oracle12c']
    Severity: Major
    Found in lib/metasploit/framework/password_crackers/jtr/formatter.rb - About 30 mins to fix

      Avoid too many return statements within this method.
      Open

                        return "#{cred.id}:#{cred.private.data}"
      Severity: Major
      Found in lib/metasploit/framework/password_crackers/hashcat/formatter.rb - About 30 mins to fix

        Avoid too many return statements within this method.
        Open

                        return "#{cred.id}:#{cred.private.data}"
        Severity: Major
        Found in lib/metasploit/framework/password_crackers/hashcat/formatter.rb - About 30 mins to fix

          Avoid too many return statements within this method.
          Open

                        return ['raw-md5,postgres']
          Severity: Major
          Found in lib/metasploit/framework/password_crackers/jtr/formatter.rb - About 30 mins to fix

            Avoid too many return statements within this method.
            Open

                          return ['md5']
            Severity: Major
            Found in lib/metasploit/framework/password_crackers/jtr/formatter.rb - About 30 mins to fix

              Avoid too many return statements within this method.
              Open

                                return "#{cred.id}:#{hash}:#{salt}"
              Severity: Major
              Found in lib/metasploit/framework/password_crackers/hashcat/formatter.rb - About 30 mins to fix

                Avoid too many return statements within this method.
                Open

                                return "#{cred.public.username}:#{cred.private.data.upcase}:::::#{cred.id}:"
                Severity: Major
                Found in lib/metasploit/framework/password_crackers/jtr/formatter.rb - About 30 mins to fix

                  Avoid too many return statements within this method.
                  Open

                                  return "#{cred.public.nil? ? ' ' : cred.public.username}:#{cred.private.data}:#{cred.id}:"
                  Severity: Major
                  Found in lib/metasploit/framework/password_crackers/jtr/formatter.rb - About 30 mins to fix

                    Avoid too many return statements within this method.
                    Open

                                  return ['des']
                    Severity: Major
                    Found in lib/metasploit/framework/password_crackers/jtr/formatter.rb - About 30 mins to fix

                      Avoid too many return statements within this method.
                      Open

                                    return ['sha512,crypt']
                      Severity: Major
                      Found in lib/metasploit/framework/password_crackers/jtr/formatter.rb - About 30 mins to fix

                        Avoid too many return statements within this method.
                        Open

                                      return ['bsdi']
                        Severity: Major
                        Found in lib/metasploit/framework/password_crackers/jtr/formatter.rb - About 30 mins to fix

                          Avoid too many return statements within this method.
                          Open

                                          return "#{cred.id}:#{cred.private.data.downcase.sub('*', '')}"
                          Severity: Major
                          Found in lib/metasploit/framework/password_crackers/hashcat/formatter.rb - About 30 mins to fix

                            Avoid too many return statements within this method.
                            Open

                                              return "#{cred.id}:#{Regexp.last_match(1)}:#{cred.public.username}"
                            Severity: Major
                            Found in lib/metasploit/framework/password_crackers/hashcat/formatter.rb - About 30 mins to fix

                              Method init has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                              Open

                                  public void init() 
                                    {
                                        String fName = "";
                                        
                                        fName = repeat('/', 303);
                              Severity: Minor
                              Found in external/source/exploits/CVE-2009-3867/AppletX.java - About 25 mins to fix

                              Cognitive Complexity

                              Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                              A method's cognitive complexity is based on a few simple rules:

                              • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                              • Code is considered more complex for each "break in the linear flow of the code"
                              • Code is considered more complex when "flow breaking structures are nested"

                              Further reading

                              Method init has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                              Open

                                 @SuppressWarnings("unchecked")
                                 public void init()
                                   {
                                  try
                                    {
                              Severity: Minor
                              Found in external/source/exploits/cve-2010-4452/AppletX.java - About 25 mins to fix

                              Cognitive Complexity

                              Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                              A method's cognitive complexity is based on a few simple rules:

                              • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                              • Code is considered more complex for each "break in the linear flow of the code"
                              • Code is considered more complex when "flow breaking structures are nested"

                              Further reading

                              Function status has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                              Open

                                  def status(self):
                                      status = {}
                                      hw_versions = []
                                      fw_version = pkg_resources.get_distribution("killerbee").version
                                      device_names = []
                              Severity: Minor
                              Found in tools/hardware/killerbee_msfrelay.py - About 25 mins to fix

                              Cognitive Complexity

                              Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                              A method's cognitive complexity is based on a few simple rules:

                              • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                              • Code is considered more complex for each "break in the linear flow of the code"
                              • Code is considered more complex when "flow breaking structures are nested"

                              Further reading

                              Function request_multiple_TGSs has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                              Open

                                  def request_multiple_TGSs(self, usernames):
                                      # Get a TGT for the current user
                                      TGT = self.getTGT()
                              
                                      if self.__outputFileName is not None:
                              Severity: Minor
                              Found in modules/auxiliary/gather/get_user_spns.py - About 25 mins to fix

                              Cognitive Complexity

                              Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                              A method's cognitive complexity is based on a few simple rules:

                              • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                              • Code is considered more complex for each "break in the linear flow of the code"
                              • Code is considered more complex when "flow breaking structures are nested"

                              Further reading

                              Function clean has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                              Open

                              def clean(dir='./bin/'):
                                  for root, dirs, files in os.walk(dir):
                                      for name in files:
                                          if name != '.keep':
                                              os.remove(os.path.join(root, name))
                              Severity: Minor
                              Found in external/source/shellcode/windows/x86/build.py - About 25 mins to fix

                              Cognitive Complexity

                              Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                              A method's cognitive complexity is based on a few simple rules:

                              • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                              • Code is considered more complex for each "break in the linear flow of the code"
                              • Code is considered more complex when "flow breaking structures are nested"

                              Further reading

                              Function parse has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                              Open

                              def parse(meta):
                                  parser = argparse.ArgumentParser(description=meta['description'])
                                  actions = ['run'] + meta['capabilities']
                                  parser.add_argument(
                                          'action',
                              Severity: Minor
                              Found in lib/msf/core/modules/external/python/metasploit/cli.py - About 25 mins to fix

                              Cognitive Complexity

                              Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                              A method's cognitive complexity is based on a few simple rules:

                              • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                              • Code is considered more complex for each "break in the linear flow of the code"
                              • Code is considered more complex when "flow breaking structures are nested"

                              Further reading

                              Severity
                              Category
                              Status
                              Source
                              Language