hackedteam/vector-exploit

View on GitHub

Showing 219 of 389 total issues

Function encrypt has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
Open

    def encrypt(self, iput, key, size):
        output = [0] * 16
        # the number of rounds
        nbrRounds = 0
        # the 128 bit block to encode
Severity: Minor
Found in src/ht-webkit-Android4-src/precompiled/debug/slowaes.py - About 1 hr 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 decrypt has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
Open

    def decrypt(self, iput, key, size):
        output = [0] * 16
        # the number of rounds
        nbrRounds = 0
        # the 128 bit block to decode
Severity: Minor
Found in src/ht-webkit-Android4-src/precompiled/debug/slowaes.py - About 1 hr 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 __init__ has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
Open

    def __init__(self, file):
        id = file.read(1)
        if id != PROPERTY_FOLDER:
            raise FormatError, 'folder id expected but %s found' % repr(id)
        self.numfolders = self._read64Bit(file)
Severity: Minor
Found in ht-2013-004-IE/pylzma.egg/py7zlib.py - About 1 hr 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 bisect_check has 26 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function bisect_check(bisect_firsthalf, bisect_secondhalf, addr) {
    // INFO("bisect_check " + addr);

    var iframe = document.createElement("iframe");

Severity: Minor
Found in src/ht-webkit-Android4-src/precompiled/debug/script.js - About 1 hr to fix

    Function XSLTObject has 26 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    function XSLTObject(page, childrenaddr, nameaddr, elementaddr, xml) {
        if (page === undefined) {
        ERR("XSLTObject: A page object is required.");
        }
    
    
    Severity: Minor
    Found in src/ht-webkit-Android4-src/precompiled/debug/script.js - About 1 hr to fix

      Function stage1_xml has 26 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      def stage1_xml(base=0x6b503000, nextaddr=None):
          """
          Generates the exploit XML document. The parameter base must be an integer.
          """
      
      
      Severity: Minor
      Found in src/edn2/2014-004-AndroidBrowser/stage1_xml.py - About 1 hr to fix

        Function stage1_xml has 26 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        def stage1_xml(base=0x6b503000, nextaddr=None):
            """
            Generates the exploit XML document. The parameter base must be an integer.
            """
        
        
        Severity: Minor
        Found in src/ht-webkit-Android4-src/precompiled/release/stage1_xml.py - About 1 hr to fix

          Function stage1_xml has 26 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          def stage1_xml(base=0x6b503000, nextaddr=None):
              """
              Generates the exploit XML document. The parameter base must be an integer.
              """
          
          
          Severity: Minor
          Found in src/ht-webkit-Android4-src/src/stage1_xml.py - About 1 hr to fix

            Function stage1_xml has 26 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            def stage1_xml(base=0x6b503000, nextaddr=None):
                """
                Generates the exploit XML document. The parameter base must be an integer.
                """
            
            
            Severity: Minor
            Found in src/ht-webkit-Android4-src/precompiled/debug/stage1_xml.py - About 1 hr to fix

              Function call has 7 arguments (exceeds 4 allowed). Consider refactoring.
              Open

              RCE.prototype.call = function(fn, r0, r1, r2, r3, r4, forking) {
              Severity: Major
              Found in src/ht-webkit-Android4-src/precompiled/debug/script.js - About 50 mins to fix

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

                    def __init__(self, info, start, src_start, size, folder, archive, maxsize=None):
                Severity: Major
                Found in ht-2013-002-Word/pylzma.egg/py7zlib.py - About 50 mins to fix

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

                      def __init__(self, info, start, src_start, size, folder, archive, maxsize=None):
                  Severity: Major
                  Found in ht-2013-003-Powerpoint/pylzma.egg/py7zlib.py - About 50 mins to fix

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

                        def __init__(self, info, start, src_start, size, folder, archive, maxsize=None):
                    Severity: Major
                    Found in ht-2013-004-IE/pylzma.egg/py7zlib.py - About 50 mins to fix

                      Avoid deeply nested control flow statements.
                      Open

                                              for g in gadgets_retrieved:
                      
                                                  # gadget not found TODO: test 
                                                  if ( len(g) > 8 or  g == 'null' ):
                                                      ExploitHTTPHandler.send_empty_reply()
                      Severity: Major
                      Found in src/ht-webkit-Android23/webkit_rc3_plus_tea.py - About 45 mins to fix

                        Avoid deeply nested control flow statements.
                        Open

                                                for g in gadgets_retrieved:
                        
                                                    # gadget not found TODO: test 
                                                    if ( len(g) > 8 or  g == 'null' ):
                                                        ExploitHTTPHandler.send_empty_reply()
                        Severity: Major
                        Found in src/ht-webkit-Android23/webkit_rc3_plus_tea.py - About 45 mins to fix

                          Avoid deeply nested control flow statements.
                          Open

                                                  if len(gadgets_retrieved) != 9:
                                                      firstStageSuccessful = False
                                                      ExploitHTTPHandler.send_empty_reply()
                                                      
                                                      logging.debug('Not enough gadgets {} '.format( len(gadgets_retrieved) ) )
                          Severity: Major
                          Found in src/ht-webkit-Android23/webkit_rc3_plus_tea.py - About 45 mins to fix

                            Avoid deeply nested control flow statements.
                            Open

                                                    if not candidate_port in used_socket_ports:
                                                        found = True
                            
                            
                            Severity: Major
                            Found in src/ht-webkit-Android23/webkit_rc3_plus_tea.py - About 45 mins to fix

                              Avoid deeply nested control flow statements.
                              Open

                                                      if len(gadgets_retrieved) != 6:
                                                          firstStageSuccessful = False
                                                          ExploitHTTPHandler.send_empty_reply()
                              
                                                          logging.debug('Not enough gadgets {}'.format( len(gadgets_retrieved) ) )
                              Severity: Major
                              Found in src/ht-webkit-Android23/webkit_rc3_plus_tea.py - About 45 mins to fix

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

                                    def decrypt(self, cipherIn, originalsize, mode, key, size, IV):
                                Severity: Minor
                                Found in src/edn2/2014-004-AndroidBrowser/slowaes.py - About 45 mins to fix

                                  Avoid deeply nested control flow statements.
                                  Open

                                              if (m_data < 0x10000) {
                                                  INFO("find_node_40: Invalid data value for text node: " + hex(m_data, 8) +
                                                   " (type offset: " + i*4 + ", dataoffset: " + dataoffset);
                                                  return null;
                                              }
                                  Severity: Major
                                  Found in src/ht-webkit-Android4-src/precompiled/debug/script.js - About 45 mins to fix
                                    Severity
                                    Category
                                    Status
                                    Source
                                    Language