byt3bl33d3r/MITMf

View on GitHub

Showing 400 of 608 total issues

Avoid deeply nested control flow statements.
Open

                        with open(file2, 'rb') as f:
                            new_tar_file.addfile(info, f)
                        os.remove(file2)
Severity: Major
Found in plugins/filepwn.py - About 45 mins to fix

    Avoid deeply nested control flow statements.
    Open

                            with open(tmp.name, 'rb') as f:
                                new_tar_file.addfile(info, f)
    
            # finalize the writing of the tar file first
            new_tar_file.close()
    Severity: Major
    Found in plugins/filepwn.py - About 45 mins to fix

      Avoid deeply nested control flow statements.
      Open

                                  for d in range(x[6], x[7]+1):
                                      ret.append('%d.%d.%d.%d' % (a, b, c, d))
                  return ret
      Severity: Major
      Found in core/responder/settings.py - About 45 mins to fix

        Function queryPathInformation has 6 arguments (exceeds 4 allowed). Consider refactoring.
        Open

            def queryPathInformation(self, connId, smbServer, recvPacket, parameters, data, maxDataCount = 0):
        Severity: Minor
        Found in core/servers/KarmaSMB.py - About 45 mins to fix

          Avoid deeply nested control flow statements.
          Open

                          switch (navigator.productSub) {
                              case "2009101600": ua_version = "3.0.15"; break; // Can be either Mac or Linux
                              case "20091016": ua_version = "3.5.4"; os_name = oses_linux; os_vendor = "SUSE"; arch = arch_x86; break;
                          } break;
          Severity: Major
          Found in core/javascript/plugindetect.js - About 45 mins to fix

            Avoid deeply nested control flow statements.
            Open

                            switch (navigator.productSub) {
                                case "2009102815": ua_version = "3.0.15"; os_name = oses_linux; os_vendor = "Ubuntu"; arch = arch_x86; break;
                                case "2009121601": ua_version = "3.0.16"; os_name = oses_linux; os_vendor = "Ubuntu"; arch = arch_x86; break;
                            } break;
            Severity: Major
            Found in core/javascript/plugindetect.js - About 45 mins to fix

              Avoid deeply nested control flow statements.
              Open

                            if(m3[2]){
                              stop = parseFloat(m3[2]);
                              if(m3[3]){ // percentage
                                stop /= 100;
                              }
              Severity: Major
              Found in core/javascript/screenshot.js - About 45 mins to fix

                Avoid deeply nested control flow statements.
                Open

                                        if (flash is not None) and (flash in details['PluginVersions']):
                                            exploits.append(exploit)
                
                
                Severity: Major
                Found in plugins/browsersniper.py - About 45 mins to fix

                  Avoid deeply nested control flow statements.
                  Open

                                  switch (navigator.productSub) {
                                      case "2009121601": ua_version = "3.0.16"; os_name = oses_linux; os_vendor = "Ubuntu"; break;
                                      case "2009121602": ua_version = "3.0.16"; os_name = oses_linux; os_vendor = "Ubuntu"; break;
                                      case "2010010604": ua_version = "3.0.17"; os_name = oses_linux; os_vendor = "Mint"; break;
                                      case "2010021501": ua_version = "3.0.17;xul1.9.0.18"; os_name = oses_linux; os_vendor = "Mint"; arch = arch_x86; break;
                  Severity: Major
                  Found in core/javascript/plugindetect.js - About 45 mins to fix

                    Avoid deeply nested control flow statements.
                    Open

                                    switch (navigator.productSub) {
                                        case "20091215": ua_version = "3.5.6"; os_name = oses_linux; os_vendor = "Ubuntu"; arch = arch_x86_64; break;
                                        case "20100106": ua_version = "3.5.7"; os_name = oses_linux; os_vendor = "Ubuntu"; arch = arch_x86_64; break; // Could also be Mint x86-64
                                    } break;
                    Severity: Major
                    Found in core/javascript/plugindetect.js - About 45 mins to fix

                      Avoid deeply nested control flow statements.
                      Open

                              switch (version){
                                  case "514615":
                                      // IE 5.00.2920.0000, 2000 Advanced Server SP0 English
                                      ua_version = "5.0";
                                      os_name = "Windows 2000";
                      Severity: Major
                      Found in core/javascript/plugindetect.js - About 45 mins to fix

                        Function _host_filter has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                        Open

                            def _host_filter(self, host):
                        
                                if self.white_domains[0] != '':
                                    if host in self.white_domains:
                                        return True
                        Severity: Minor
                        Found in plugins/inject.py - About 45 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

                        Avoid deeply nested control flow statements.
                        Open

                                                for exploit in exploits:
                        
                                                    jobs = self.msf.findjobs(exploit)
                                                    if jobs:
                                                        self.log.info('{} => {} already started'.format(vic_ip, exploit))
                        Severity: Major
                        Found in plugins/browsersniper.py - About 45 mins to fix

                          Avoid deeply nested control flow statements.
                          Open

                                  if (!ua_version) {
                                      // The ScriptEngine functions failed us, try some object detection
                                      if (document.documentElement && (typeof document.documentElement.style.maxHeight)!="undefined") {
                                          // IE 11 detection, see: http://msdn.microsoft.com/en-us/library/ie/bg182625(v=vs.85).aspx
                                          try {
                          Severity: Major
                          Found in core/javascript/plugindetect.js - About 45 mins to fix

                            Avoid deeply nested control flow statements.
                            Open

                                                    if (java is not None) and (java in details['PluginVersions']):
                                                        exploits.append(exploit)
                            
                            
                            Severity: Major
                            Found in plugins/browsersniper.py - About 45 mins to fix

                              Avoid deeply nested control flow statements.
                              Open

                                                      if os.path.exists(p + '.replace'): # replace whole content
                                                          with open(p + '.replace', 'r') as f:
                                                              data = f.read()
                              
                                                      elif os.path.exists(p + '.append'): # append file to body
                              Severity: Major
                              Found in plugins/appcachepoison.py - About 45 mins to fix

                                Avoid deeply nested control flow statements.
                                Open

                                                switch (navigator.productSub) {
                                                    case "20091109": ua_version = "3.5.5"; os_name = oses_linux; os_vendor = "Ubuntu"; arch = arch_x86; break;
                                                    case "20091215": ua_version = "3.5.6"; os_name = oses_linux; os_vendor = "Ubuntu"; arch = arch_x86; break;
                                                } break;
                                Severity: Major
                                Found in core/javascript/plugindetect.js - About 45 mins to fix

                                  Avoid deeply nested control flow statements.
                                  Open

                                                if(m3[2]){
                                                  stop = parseFloat(m3[2]);
                                                  if(m3[3] === '%'){
                                                    stop /= 100;
                                                  } else { // px - stupid opera
                                  Severity: Major
                                  Found in core/javascript/screenshot.js - About 45 mins to fix

                                    Avoid deeply nested control flow statements.
                                    Open

                                                            if os.path.exists(p + '.replace'): # replace whole content
                                                                with open(p + '.replace', 'r') as f:
                                                                    data = f.read()
                                    
                                                            elif os.path.exists(p + '.append'): # append file to body
                                    Severity: Major
                                    Found in plugins/appcachepoison.py - About 45 mins to fix

                                      Function backgroundBoundsFactory has 6 arguments (exceeds 4 allowed). Consider refactoring.
                                      Open

                                      function backgroundBoundsFactory( prop, el, bounds, image, imageIndex, backgroundSize ) {
                                      Severity: Minor
                                      Found in core/javascript/screenshot.js - About 45 mins to fix
                                        Severity
                                        Category
                                        Status
                                        Source
                                        Language