hackedteam/test-av2

View on GitHub
AVAgent/build.py

Summary

Maintainability
F
1 wk
Test Coverage

File build.py has 876 lines of code (exceeds 250 allowed). Consider refactoring.
Open

import os
import shutil
from time import sleep
import time
import socket
Severity: Major
Found in AVAgent/build.py - About 2 days to fix

    Function check_upgraded has a Cognitive Complexity of 39 (exceeds 5 allowed). Consider refactoring.
    Open

        def check_upgraded(self, instance_id, level, fast = True):
            logging.debug("check_upgraded")
    
            if fast:
                logging.debug("- Upgrade, Wait for 5 minutes: %s" % time.ctime())
    Severity: Minor
    Found in AVAgent/build.py - About 5 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 check_static has a Cognitive Complexity of 30 (exceeds 5 allowed). Consider refactoring.
    Open

    def check_static(files, report = None):
    
        global report_send
        if report:
            report_send = report
    Severity: Minor
    Found in AVAgent/build.py - About 4 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 execute_scout has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring.
    Open

        def execute_scout(self):
            """ build and execute the  """
            factory_id, ident, exe = self.execute_pull()
    
            new_exe = "build\\scout.exe"
    Severity: Minor
    Found in AVAgent/build.py - About 3 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

    AgentBuild has 27 functions (exceeds 20 allowed). Consider refactoring.
    Open

    class AgentBuild:
        def __init__(self, backend, frontend=None, platform='windows', kind='silent',
                     ftype='desktop', blacklist=[], soldierlist=[], param=None,
                     puppet="puppet", asset_dir="AVAgent/assets", factory=None):
            self.kind = kind
    Severity: Minor
    Found in AVAgent/build.py - About 3 hrs to fix

      Function execute_elite_fast has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring.
      Open

          def execute_elite_fast(self, instance_id = None, fast = True):
      
              if not instance_id:
                  with connection() as c:
                      instance_id, target_id = get_instance(c)
      Severity: Minor
      Found in AVAgent/build.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 _build_agent has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
      Open

          def _build_agent(self, factory, melt=None, kind="silent",tries=0):
      
              with connection() as c:
      
                  try:
      Severity: Minor
      Found in AVAgent/build.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 execute_agent_startup has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
      Open

          def execute_agent_startup(self):
              logging.debug("execute_agent_startup")
              executed = False
              for d, b in itertools.product(start_dirs, names):
                  filename = "%s/%s.exe" % (d, b)
      Severity: Minor
      Found in AVAgent/build.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 11 arguments (exceeds 4 allowed). Consider refactoring.
      Open

          def __init__(self, backend, frontend=None, platform='windows', kind='silent',
      Severity: Major
      Found in AVAgent/build.py - About 1 hr to fix

        Function _create_new_factory has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
        Open

            def _create_new_factory(self, operation, target, factory, config):
                with connection() as c:
                    assert c
                    if not c.logged_in():
                        logging.warn("Not logged in")
        Severity: Minor
        Found in AVAgent/build.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 get_instance has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
        Open

        def get_instance(client, imei=None):
            print 'passed imei to get_isntance ', imei
            #logging.debug("client: %s" % client)
            operation_id, group_id = client.operation(connection.operation)
            target = get_target_name()
        Severity: Minor
        Found in AVAgent/build.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 execute_agent has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
        Open

        def execute_agent(args, level, platform):
            """ starts the vm and execute elite,scout or pull, depending on the level """
            global internet_checked
        
            ftype = args.platform_type
        Severity: Minor
        Found in AVAgent/build.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 execute_soldier_fast has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
        Open

            def execute_soldier_fast(self, instance_id = None, fast = True):
        
                if not instance_id:
                    with connection() as c:
                        instance_id, target_id = get_instance(c)
        Severity: Minor
        Found in AVAgent/build.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 main has 28 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        def main():
            parser = argparse.ArgumentParser(description='AVMonitor avtest.')
        
            #'elite'
            parser.add_argument(
        Severity: Minor
        Found in AVAgent/build.py - About 1 hr to fix

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

          def check_evidences(backend, type_ev, key=None, value=None):
              connection.host = backend
          
              logging.debug("type_ev: %s, filter: %s=%s" % (type_ev, key, value))
              number = 0
          Severity: Minor
          Found in AVAgent/build.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 i in range(10):
                                      self._click_mouse(100 + i, 0)
          
          
          Severity: Major
          Found in AVAgent/build.py - About 45 mins to fix

            Avoid deeply nested control flow statements.
            Open

                                    if upgraded:
                                        break
                                if not upgraded:
            Severity: Major
            Found in AVAgent/build.py - About 45 mins to fix

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

                  def execute_web_expl(self, websrv):
                      """ WEBZ: we need to download some files only """
              
                      def check_file(filename):
                          try:
              Severity: Minor
              Found in AVAgent/build.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 build has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
              Open

              def build(args, report):
                  global results, report_send
                  results = []
              
                  report_send = report
              Severity: Minor
              Found in AVAgent/build.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 AVAgent/build.py - About 30 mins to fix

                Avoid too many return statements within this function.
                Open

                        return self.check_upgraded(instance_id, level, fast)
                Severity: Major
                Found in AVAgent/build.py - About 30 mins to fix

                  Avoid too many return statements within this function.
                  Open

                                  return
                  Severity: Major
                  Found in AVAgent/build.py - About 30 mins to fix

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

                        def _click_mouse(self, x, y):
                        # move first
                            x = 65536L * x / ctypes.windll.user32.GetSystemMetrics(0) + 1
                            y = 65536L * y / ctypes.windll.user32.GetSystemMetrics(1) + 1
                            ctypes.windll.user32.mouse_event(MOUSEEVENTF_MOVEABS, x, y, 0, 0)
                    Severity: Major
                    Found in AVAgent/build.py and 1 other location - About 6 hrs to fix
                    snippet/keymouse.py on lines 30..36

                    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 108.

                    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 11 locations. Consider refactoring.
                    Open

                        params['exploit'] = {"generate":
                                                 {"platforms": ["windows"], "binary": {"demo": False, "admin": False},
                                                  "exploit": "HT-2012-001",
                                                  "melt": {"demo": False, "scout": True, "admin": False}}, "platform": "exploit",
                                             "deliver": {"user": "USERID"},
                    Severity: Major
                    Found in AVAgent/build.py and 10 other locations - About 3 hrs to fix
                    AVAgent/build.py on lines 1085..1091
                    AVAgent/build.py on lines 1093..1099
                    AVAgent/build.py on lines 1101..1107
                    AVMaster/conf/params.py on lines 42..47
                    AVMaster/conf/params.py on lines 50..56
                    AVMaster/conf/params.py on lines 58..64
                    AVMaster/conf/params.py on lines 66..72
                    scripts/dvd_offline/build.py on lines 123..127
                    scripts/dvd_offline/build.py on lines 130..134
                    scripts/dvd_offline/build.py on lines 136..140

                    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 11 locations. Consider refactoring.
                    Open

                        params['exploit_web'] = {"generate":
                                                     {"platforms": ["windows"], "binary": {"demo": False, "admin": False},
                                                      "exploit": "HT-2013-002",
                                                      "melt": {"demo": False, "scout": True, "admin": False}},
                                                 "platform": "exploit", "deliver": {"user": "USERID"},
                    Severity: Major
                    Found in AVAgent/build.py and 10 other locations - About 3 hrs to fix
                    AVAgent/build.py on lines 1076..1082
                    AVAgent/build.py on lines 1085..1091
                    AVAgent/build.py on lines 1093..1099
                    AVMaster/conf/params.py on lines 42..47
                    AVMaster/conf/params.py on lines 50..56
                    AVMaster/conf/params.py on lines 58..64
                    AVMaster/conf/params.py on lines 66..72
                    scripts/dvd_offline/build.py on lines 123..127
                    scripts/dvd_offline/build.py on lines 130..134
                    scripts/dvd_offline/build.py on lines 136..140

                    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 11 locations. Consider refactoring.
                    Open

                        params['exploit_ppsx'] = {"generate":
                                                      {"platforms": ["windows"], "binary": {"demo": False, "admin": False},
                                                       "exploit": "HT-2013-003",
                                                       "melt": {"demo": False, "scout": True, "admin": False}},
                                                  "platform": "exploit", "deliver": {"user": "USERID"},
                    Severity: Major
                    Found in AVAgent/build.py and 10 other locations - About 3 hrs to fix
                    AVAgent/build.py on lines 1076..1082
                    AVAgent/build.py on lines 1085..1091
                    AVAgent/build.py on lines 1101..1107
                    AVMaster/conf/params.py on lines 42..47
                    AVMaster/conf/params.py on lines 50..56
                    AVMaster/conf/params.py on lines 58..64
                    AVMaster/conf/params.py on lines 66..72
                    scripts/dvd_offline/build.py on lines 123..127
                    scripts/dvd_offline/build.py on lines 130..134
                    scripts/dvd_offline/build.py on lines 136..140

                    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 11 locations. Consider refactoring.
                    Open

                        params['exploit_docx'] = {"generate":
                                                      {"platforms": ["windows"], "binary": {"demo": False, "admin": False},
                                                       "exploit": "HT-2013-002",
                                                       "melt": {"demo": False, "scout": True, "admin": False}},
                                                  "platform": "exploit", "deliver": {"user": "USERID"},
                    Severity: Major
                    Found in AVAgent/build.py and 10 other locations - About 3 hrs to fix
                    AVAgent/build.py on lines 1076..1082
                    AVAgent/build.py on lines 1093..1099
                    AVAgent/build.py on lines 1101..1107
                    AVMaster/conf/params.py on lines 42..47
                    AVMaster/conf/params.py on lines 50..56
                    AVMaster/conf/params.py on lines 58..64
                    AVMaster/conf/params.py on lines 66..72
                    scripts/dvd_offline/build.py on lines 123..127
                    scripts/dvd_offline/build.py on lines 130..134
                    scripts/dvd_offline/build.py on lines 136..140

                    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

                    Identical blocks of code found in 3 locations. Consider refactoring.
                    Open

                        params['blackberry'] = {
                            'platform': 'blackberry',
                            'binary': {'demo': demo},
                            'melt': {'appname': 'facebook',
                                     'name': 'Facebook Application',
                    Severity: Major
                    Found in AVAgent/build.py and 2 other locations - About 1 hr to fix
                    AVMaster/conf/params.py on lines 6..14
                    scripts/dvd_offline/build.py on lines 91..98

                    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 41.

                    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

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

                            if not os.path.exists('build/%s' % self.platform):
                                os.mkdir('build/%s' % self.platform)
                    Severity: Major
                    Found in AVAgent/build.py and 1 other location - About 1 hr to fix
                    scripts/dvd_offline/build.py on lines 294..295

                    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 41.

                    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

                    Identical blocks of code found in 3 locations. Consider refactoring.
                    Open

                        params['windows'] = {
                            'platform': 'windows',
                            'binary': {'demo': demo, 'admin': False},
                            'melt': {'scout': True, 'admin': False, 'bit64': True, 'codec': True},
                            'sign': {}
                    Severity: Major
                    Found in AVAgent/build.py and 2 other locations - About 55 mins to fix
                    AVMaster/conf/params.py on lines 16..20
                    scripts/dvd_offline/build.py on lines 100..103

                    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 37.

                    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

                                except Exception, e:
                                    logging.debug("DBG trace %s" % traceback.format_exc())
                                    add_result("+ ERROR SCOUT BUILD EXCEPTION RETRIEVED")
                    
                                    raise e
                    Severity: Minor
                    Found in AVAgent/build.py and 1 other location - About 45 mins to fix
                    AVAgent/build.py on lines 301..316

                    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 35.

                    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:
                                if isinstance(exe, list):
                                    exe = exe[0]
                    
                                logging.debug("- Execute: " + exe)
                    Severity: Minor
                    Found in AVAgent/build.py and 1 other location - About 45 mins to fix
                    AVAgent/build.py on lines 294..298

                    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 35.

                    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

                    Identical blocks of code found in 4 locations. Consider refactoring.
                    Open

                            privs = [
                                'ADMIN', 'ADMIN_USERS', 'ADMIN_OPERATIONS', 'ADMIN_TARGETS', 'ADMIN_AUDIT',
                                'ADMIN_LICENSE', 'SYS', 'SYS_FRONTEND', 'SYS_BACKEND', 'SYS_BACKUP',
                                'SYS_INJECTORS', 'SYS_CONNECTORS', 'TECH',
                                'TECH_FACTORIES', 'TECH_BUILD', 'TECH_CONFIG', 'TECH_EXEC', 'TECH_UPLOAD',
                    Severity: Major
                    Found in AVAgent/build.py and 3 other locations - About 35 mins to fix
                    scripts/dvd_offline/build.py on lines 182..182
                    scripts/dvd_offline/rcs_client.py on lines 385..385
                    tests_integration/test_rcs_client.py on lines 153..155

                    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 33.

                    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