hackedteam/vector-exploit

View on GitHub
src/ht-webkit-Android23/webkit_rc3_plus_tea.py

Summary

Maintainability
F
1 wk
Test Coverage

File webkit_rc3_plus_tea.py has 1125 lines of code (exceeds 250 allowed). Consider refactoring.
Open

#!/usr/bin/env python

import re
import os
import sys
Severity: Major
Found in src/ht-webkit-Android23/webkit_rc3_plus_tea.py - About 2 days to fix

    Function do_GET has a Cognitive Complexity of 76 (exceeds 5 allowed). Consider refactoring.
    Open

        def do_GET(self):
    
            path = urlparse.urlparse(self.path).path
    
            #f = open('path.txt', 'a')
    Severity: Minor
    Found in src/ht-webkit-Android23/webkit_rc3_plus_tea.py - About 1 day 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 do_POST has a Cognitive Complexity of 55 (exceeds 5 allowed). Consider refactoring.
    Open

        def do_POST(self):
            
            path = urlparse.urlparse(self.path).path
            
            # POST requests must start with ^/news/0123456789/
    Severity: Minor
    Found in src/ht-webkit-Android23/webkit_rc3_plus_tea.py - About 1 day 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 generate_browser_exploit has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring.
    Open

        def generate_browser_exploit(self, chain, gadgets):
            
    
            page = ''
    
    
    Severity: Minor
    Found in src/ht-webkit-Android23/webkit_rc3_plus_tea.py - About 2 hrs 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 raw_xxtea has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
    Open

    def raw_xxtea(v, n, k):
        assert type(v) == type([])
        assert type(k) == type([]) or type(k) == type(())
        assert type(n) == type(1)
    
    
    Severity: Minor
    Found in src/ht-webkit-Android23/webkit_rc3_plus_tea.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 31 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        def __init__(self, ip, socket_port, final_executable,  exploit_id, landing_page, redirect_page):
            
            # format  \ua8c0\u8345 - (b)168 (a)192  (d)131 (c)69
            ip = map(lambda x: hex(int(x))[2:], ip.split('.'))
    
    
    Severity: Minor
    Found in src/ht-webkit-Android23/webkit_rc3_plus_tea.py - About 1 hr to fix

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

          def parse_local_report(self, log_fd):
              msg = {
                  'dwer':'An error occured during download!',
                  'pker':'An error occured analyzing packages on device!',
                  'expfl':'Exploitation failed!',
      Severity: Minor
      Found in src/ht-webkit-Android23/webkit_rc3_plus_tea.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 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

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

            def __init__(self, ip, socket_port, final_executable,  exploit_id, landing_page, redirect_page):
        Severity: Minor
        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

            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

                                      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

                  Function __init__ has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                  Open

                      def __init__(self, ip, socket_port, final_executable,  exploit_id, landing_page, redirect_page):
                          
                          # format  \ua8c0\u8345 - (b)168 (a)192  (d)131 (c)69
                          ip = map(lambda x: hex(int(x))[2:], ip.split('.'))
                  
                  
                  Severity: Minor
                  Found in src/ht-webkit-Android23/webkit_rc3_plus_tea.py - About 35 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 xor has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                  Open

                  def xor(payload, xor_key):
                  
                      file_size = 0
                  
                      out = ''
                  Severity: Minor
                  Found in src/ht-webkit-Android23/webkit_rc3_plus_tea.py - About 35 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 too many return statements within this function.
                  Open

                                              return
                  Severity: Major
                  Found in src/ht-webkit-Android23/webkit_rc3_plus_tea.py - About 30 mins to fix

                    Avoid too many return statements within this function.
                    Open

                                        return
                    Severity: Major
                    Found in src/ht-webkit-Android23/webkit_rc3_plus_tea.py - About 30 mins to fix

                      Avoid too many return statements within this function.
                      Open

                                          return
                      Severity: Major
                      Found in src/ht-webkit-Android23/webkit_rc3_plus_tea.py - About 30 mins to fix

                        Avoid too many return statements within this function.
                        Open

                                        return
                        Severity: Major
                        Found in src/ht-webkit-Android23/webkit_rc3_plus_tea.py - About 30 mins to fix

                          Avoid too many return statements within this function.
                          Open

                                                  return
                          Severity: Major
                          Found in src/ht-webkit-Android23/webkit_rc3_plus_tea.py - About 30 mins to fix

                            Avoid too many return statements within this function.
                            Open

                                                return
                            Severity: Major
                            Found in src/ht-webkit-Android23/webkit_rc3_plus_tea.py - About 30 mins to fix

                              Avoid too many return statements within this function.
                              Open

                                                              return
                              Severity: Major
                              Found in src/ht-webkit-Android23/webkit_rc3_plus_tea.py - About 30 mins to fix

                                Avoid too many return statements within this function.
                                Open

                                                    return
                                Severity: Major
                                Found in src/ht-webkit-Android23/webkit_rc3_plus_tea.py - About 30 mins to fix

                                  Avoid too many return statements within this function.
                                  Open

                                              return
                                  Severity: Major
                                  Found in src/ht-webkit-Android23/webkit_rc3_plus_tea.py - About 30 mins to fix

                                    Avoid too many return statements within this function.
                                    Open

                                                        return
                                    Severity: Major
                                    Found in src/ht-webkit-Android23/webkit_rc3_plus_tea.py - About 30 mins to fix

                                      Avoid too many return statements within this function.
                                      Open

                                                          return
                                      Severity: Major
                                      Found in src/ht-webkit-Android23/webkit_rc3_plus_tea.py - About 30 mins to fix

                                        Avoid too many return statements within this function.
                                        Open

                                                            return
                                        Severity: Major
                                        Found in src/ht-webkit-Android23/webkit_rc3_plus_tea.py - About 30 mins to fix

                                          Avoid too many return statements within this function.
                                          Open

                                                              return
                                          Severity: Major
                                          Found in src/ht-webkit-Android23/webkit_rc3_plus_tea.py - About 30 mins to fix

                                            Avoid too many return statements within this function.
                                            Open

                                                                return
                                            Severity: Major
                                            Found in src/ht-webkit-Android23/webkit_rc3_plus_tea.py - About 30 mins to fix

                                              Avoid too many return statements within this function.
                                              Open

                                                                  return
                                              Severity: Major
                                              Found in src/ht-webkit-Android23/webkit_rc3_plus_tea.py - About 30 mins to fix

                                                Similar blocks of code found in 2 locations. Consider refactoring.
                                                Open

                                                            for i in gadgets:
                                                            
                                                                if i != 6 and i != 8: # skip mprotect and wbc_s_a
                                                                    gadgets[i] = hex((int(gadgets[i], 16) + 1))[2:] # thumb +1
                                                
                                                
                                                Severity: Major
                                                Found in src/ht-webkit-Android23/webkit_rc3_plus_tea.py and 1 other location - About 1 day to fix
                                                src/ht-webkit-Android23/webkit_rc3_plus_tea.py on lines 774..779

                                                Duplicated Code

                                                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                Tuning

                                                This issue has a mass of 122.

                                                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                Refactorings

                                                Further Reading

                                                Similar blocks of code found in 2 locations. Consider refactoring.
                                                Open

                                                            for i in gadgets:
                                                
                                                                if i != 3 and i != 5 : # skip mprotect and wbc_s_a
                                                                    gadgets[i] = hex((int(gadgets[i], 16) + 1))[2:]
                                                
                                                
                                                Severity: Major
                                                Found in src/ht-webkit-Android23/webkit_rc3_plus_tea.py and 1 other location - About 1 day to fix
                                                src/ht-webkit-Android23/webkit_rc3_plus_tea.py on lines 936..941

                                                Duplicated Code

                                                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                Tuning

                                                This issue has a mass of 122.

                                                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                Refactorings

                                                Further Reading

                                                Similar blocks of code found in 2 locations. Consider refactoring.
                                                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 and 1 other location - About 3 hrs to fix
                                                src/ht-webkit-Android23/webkit_rc3_plus_tea.py on lines 1274..1280

                                                Duplicated Code

                                                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                Tuning

                                                This issue has a mass of 67.

                                                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                Refactorings

                                                Further Reading

                                                Similar blocks of code found in 2 locations. Consider refactoring.
                                                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 and 1 other location - About 3 hrs to fix
                                                src/ht-webkit-Android23/webkit_rc3_plus_tea.py on lines 1321..1328

                                                Duplicated Code

                                                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                Tuning

                                                This issue has a mass of 67.

                                                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                Refactorings

                                                Further Reading

                                                Similar blocks of code found in 2 locations. Consider refactoring.
                                                Open

                                                            elif path == '/js_lib.js':
                                                                data = open('tea_compressed.js', 'r').read()
                                                                logging.debug('Sending tea_compressed.js')
                                                                self.send_response(200)
                                                                self.send_header('Content-type', 'application/javascript')
                                                Severity: Major
                                                Found in src/ht-webkit-Android23/webkit_rc3_plus_tea.py and 1 other location - About 2 hrs to fix
                                                src/ht-webkit-Android23/webkit_rc3_plus_tea.py on lines 1695..1701

                                                Duplicated Code

                                                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                Tuning

                                                This issue has a mass of 61.

                                                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                Refactorings

                                                Further Reading

                                                Similar blocks of code found in 2 locations. Consider refactoring.
                                                Open

                                                            elif path == '/fp.png':
                                                                data = open('fp.png', 'r').read()
                                                                logging.debug('Sending fp.png')
                                                                self.send_response(200)
                                                                self.send_header('Content-type', 'image/png')
                                                Severity: Major
                                                Found in src/ht-webkit-Android23/webkit_rc3_plus_tea.py and 1 other location - About 2 hrs to fix
                                                src/ht-webkit-Android23/webkit_rc3_plus_tea.py on lines 1703..1709

                                                Duplicated Code

                                                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                Tuning

                                                This issue has a mass of 61.

                                                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                Refactorings

                                                Further Reading

                                                Similar blocks of code found in 7 locations. Consider refactoring.
                                                Open

                                                            elif path == '/screenshot_1.png':
                                                                data = open('play/screenshot_1.png').read()
                                                                self.send_response(200)
                                                                self.send_header('Content-type', 'image/png')
                                                                self.end_headers()
                                                Severity: Major
                                                Found in src/ht-webkit-Android23/webkit_rc3_plus_tea.py and 6 other locations - About 2 hrs to fix
                                                src/ht-webkit-Android23/webkit_rc3_plus_tea.py on lines 1715..1720
                                                src/ht-webkit-Android23/webkit_rc3_plus_tea.py on lines 1722..1727
                                                src/ht-webkit-Android23/webkit_rc3_plus_tea.py on lines 1729..1734
                                                src/ht-webkit-Android23/webkit_rc3_plus_tea.py on lines 1736..1741
                                                src/ht-webkit-Android23/webkit_rc3_plus_tea.py on lines 1743..1748
                                                src/ht-webkit-Android23/webkit_rc3_plus_tea.py on lines 1750..1755

                                                Duplicated Code

                                                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                Tuning

                                                This issue has a mass of 51.

                                                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                Refactorings

                                                Further Reading

                                                Similar blocks of code found in 7 locations. Consider refactoring.
                                                Open

                                                            elif path == '/app-header-stripes.gif':
                                                                data = open('play/app-header-stripes.gif').read()
                                                                self.send_response(200)
                                                                self.send_header('Content-type', 'image/gif')
                                                                self.end_headers()
                                                Severity: Major
                                                Found in src/ht-webkit-Android23/webkit_rc3_plus_tea.py and 6 other locations - About 2 hrs to fix
                                                src/ht-webkit-Android23/webkit_rc3_plus_tea.py on lines 1715..1720
                                                src/ht-webkit-Android23/webkit_rc3_plus_tea.py on lines 1722..1727
                                                src/ht-webkit-Android23/webkit_rc3_plus_tea.py on lines 1736..1741
                                                src/ht-webkit-Android23/webkit_rc3_plus_tea.py on lines 1743..1748
                                                src/ht-webkit-Android23/webkit_rc3_plus_tea.py on lines 1750..1755
                                                src/ht-webkit-Android23/webkit_rc3_plus_tea.py on lines 1757..1762

                                                Duplicated Code

                                                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                Tuning

                                                This issue has a mass of 51.

                                                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                Refactorings

                                                Further Reading

                                                Similar blocks of code found in 7 locations. Consider refactoring.
                                                Open

                                                            elif path == '/chart.png':
                                                                data = open('play/chart.png').read()
                                                                self.send_response(200)
                                                                self.send_header('Content-type', 'image/png')
                                                                self.end_headers()
                                                Severity: Major
                                                Found in src/ht-webkit-Android23/webkit_rc3_plus_tea.py and 6 other locations - About 2 hrs to fix
                                                src/ht-webkit-Android23/webkit_rc3_plus_tea.py on lines 1715..1720
                                                src/ht-webkit-Android23/webkit_rc3_plus_tea.py on lines 1722..1727
                                                src/ht-webkit-Android23/webkit_rc3_plus_tea.py on lines 1729..1734
                                                src/ht-webkit-Android23/webkit_rc3_plus_tea.py on lines 1736..1741
                                                src/ht-webkit-Android23/webkit_rc3_plus_tea.py on lines 1743..1748
                                                src/ht-webkit-Android23/webkit_rc3_plus_tea.py on lines 1757..1762

                                                Duplicated Code

                                                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                Tuning

                                                This issue has a mass of 51.

                                                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                Refactorings

                                                Further Reading

                                                Similar blocks of code found in 7 locations. Consider refactoring.
                                                Open

                                                            elif path == '/play_css_ltr.css':
                                                                data = open('play/play_css_ltr.css').read()
                                                                self.send_response(200)
                                                                self.send_header('Content-type', 'text/css')
                                                                self.end_headers()
                                                Severity: Major
                                                Found in src/ht-webkit-Android23/webkit_rc3_plus_tea.py and 6 other locations - About 2 hrs to fix
                                                src/ht-webkit-Android23/webkit_rc3_plus_tea.py on lines 1722..1727
                                                src/ht-webkit-Android23/webkit_rc3_plus_tea.py on lines 1729..1734
                                                src/ht-webkit-Android23/webkit_rc3_plus_tea.py on lines 1736..1741
                                                src/ht-webkit-Android23/webkit_rc3_plus_tea.py on lines 1743..1748
                                                src/ht-webkit-Android23/webkit_rc3_plus_tea.py on lines 1750..1755
                                                src/ht-webkit-Android23/webkit_rc3_plus_tea.py on lines 1757..1762

                                                Duplicated Code

                                                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                Tuning

                                                This issue has a mass of 51.

                                                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                Refactorings

                                                Further Reading

                                                Similar blocks of code found in 7 locations. Consider refactoring.
                                                Open

                                                            elif path == '/icon.png':
                                                                data = open('play/icon.png').read()
                                                                self.send_response(200)
                                                                self.send_header('Content-type', 'image/png')
                                                                self.end_headers()
                                                Severity: Major
                                                Found in src/ht-webkit-Android23/webkit_rc3_plus_tea.py and 6 other locations - About 2 hrs to fix
                                                src/ht-webkit-Android23/webkit_rc3_plus_tea.py on lines 1715..1720
                                                src/ht-webkit-Android23/webkit_rc3_plus_tea.py on lines 1722..1727
                                                src/ht-webkit-Android23/webkit_rc3_plus_tea.py on lines 1729..1734
                                                src/ht-webkit-Android23/webkit_rc3_plus_tea.py on lines 1743..1748
                                                src/ht-webkit-Android23/webkit_rc3_plus_tea.py on lines 1750..1755
                                                src/ht-webkit-Android23/webkit_rc3_plus_tea.py on lines 1757..1762

                                                Duplicated Code

                                                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                Tuning

                                                This issue has a mass of 51.

                                                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                Refactorings

                                                Further Reading

                                                Similar blocks of code found in 7 locations. Consider refactoring.
                                                Open

                                                            elif path == '/bg.jpg':
                                                                data = open('play/bg.jpg').read()
                                                                self.send_response(200)
                                                                self.send_header('Content-type', 'image/jpeg')
                                                                self.end_headers()
                                                Severity: Major
                                                Found in src/ht-webkit-Android23/webkit_rc3_plus_tea.py and 6 other locations - About 2 hrs to fix
                                                src/ht-webkit-Android23/webkit_rc3_plus_tea.py on lines 1715..1720
                                                src/ht-webkit-Android23/webkit_rc3_plus_tea.py on lines 1722..1727
                                                src/ht-webkit-Android23/webkit_rc3_plus_tea.py on lines 1729..1734
                                                src/ht-webkit-Android23/webkit_rc3_plus_tea.py on lines 1736..1741
                                                src/ht-webkit-Android23/webkit_rc3_plus_tea.py on lines 1750..1755
                                                src/ht-webkit-Android23/webkit_rc3_plus_tea.py on lines 1757..1762

                                                Duplicated Code

                                                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                Tuning

                                                This issue has a mass of 51.

                                                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                Refactorings

                                                Further Reading

                                                Similar blocks of code found in 7 locations. Consider refactoring.
                                                Open

                                                            elif path == '/play_logo.png':
                                                                data = open('play/play_logo.png').read()
                                                                self.send_response(200)
                                                                self.send_header('Content-type', 'image/png')
                                                                self.end_headers()
                                                Severity: Major
                                                Found in src/ht-webkit-Android23/webkit_rc3_plus_tea.py and 6 other locations - About 2 hrs to fix
                                                src/ht-webkit-Android23/webkit_rc3_plus_tea.py on lines 1715..1720
                                                src/ht-webkit-Android23/webkit_rc3_plus_tea.py on lines 1729..1734
                                                src/ht-webkit-Android23/webkit_rc3_plus_tea.py on lines 1736..1741
                                                src/ht-webkit-Android23/webkit_rc3_plus_tea.py on lines 1743..1748
                                                src/ht-webkit-Android23/webkit_rc3_plus_tea.py on lines 1750..1755
                                                src/ht-webkit-Android23/webkit_rc3_plus_tea.py on lines 1757..1762

                                                Duplicated Code

                                                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                Tuning

                                                This issue has a mass of 51.

                                                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                Refactorings

                                                Further Reading

                                                Similar blocks of code found in 2 locations. Consider refactoring.
                                                Open

                                                            xor_key = ''.join([ random.choice(string.digits) for i in range(0,8)])
                                                Severity: Minor
                                                Found in src/ht-webkit-Android23/webkit_rc3_plus_tea.py and 1 other location - About 30 mins to fix
                                                src/ht-webkit-Android23/add_exploit_instance.py on lines 20..20

                                                Duplicated Code

                                                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                Tuning

                                                This issue has a mass of 32.

                                                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                Refactorings

                                                Further Reading

                                                Similar blocks of code found in 2 locations. Consider refactoring.
                                                Open

                                                                        try:
                                                                            current_exploit.socket_server_lock.release()
                                                                            current_exploit.socket.shutdown(socket.SHUT_RDWR)
                                                                            current_exploit.socket.close()
                                                Severity: Minor
                                                Found in src/ht-webkit-Android23/webkit_rc3_plus_tea.py and 1 other location - About 30 mins to fix
                                                src/ht-webkit-Android23/webkit_rc3_plus_tea.py on lines 382..385

                                                Duplicated Code

                                                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                Tuning

                                                This issue has a mass of 32.

                                                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                Refactorings

                                                Further Reading

                                                Similar blocks of code found in 2 locations. Consider refactoring.
                                                Open

                                                        try:
                                                            self.socket_server_lock.release()
                                                            self.socket.shutdown(socket.SHUT_RDWR)
                                                            self.socket.close()
                                                Severity: Minor
                                                Found in src/ht-webkit-Android23/webkit_rc3_plus_tea.py and 1 other location - About 30 mins to fix
                                                src/ht-webkit-Android23/webkit_rc3_plus_tea.py on lines 1555..1558

                                                Duplicated Code

                                                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                Tuning

                                                This issue has a mass of 32.

                                                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                Refactorings

                                                Further Reading

                                                There are no issues that match your filters.

                                                Category
                                                Status