hackedteam/test-av2

View on GitHub
AVMaster/Old/oldMaster.py

Summary

Maintainability
F
3 wks
Test Coverage

Function dispatch_kind has a Cognitive Complexity of 83 (exceeds 5 allowed). Consider refactoring.
Open

def dispatch_kind(vm_name, kind, args, r_id=None, tries=0):
    #   PREPARE FILES

    global status, test_id

Severity: Minor
Found in AVMaster/Old/oldMaster.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

File oldMaster.py has 604 lines of code (exceeds 250 allowed). Consider refactoring.
Open

import argparse
import os
import time
import random
import os.path
Severity: Major
Found in AVMaster/Old/oldMaster.py - About 1 day to fix

    Function main has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring.
    Open

    def main():
        global logdir, status, test_id
    
        # PARSING
    
    
    Severity: Minor
    Found in AVMaster/Old/oldMaster.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

    Function main has 42 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    def main():
        global logdir, status, test_id
    
        # PARSING
    
    
    Severity: Minor
    Found in AVMaster/Old/oldMaster.py - About 1 hr to fix

      Function update has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
      Open

      def update(flargs):
          vms = len(flargs[1].vms)
          try:
              vm_name = flargs[0]
              vm = VMachine(vm_conf_file, vm_name)
      Severity: Minor
      Found in AVMaster/Old/oldMaster.py - About 55 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

                                  if "STARTED" not in res:  # or res is not "":
                                      res += ", %s" % str(m['data'])
                                  else:
                                      res += "%s" % str(m['data'])
                                  upd_record_result(
      Severity: Major
      Found in AVMaster/Old/oldMaster.py - About 45 mins to fix

        Avoid deeply nested control flow statements.
        Open

                                    if found == True:
                                        break
                                    print "DBG Python.EXE not found for %s. sleeping 5 secs (retry %d)" % (vm_name, tick)
        Severity: Major
        Found in AVMaster/Old/oldMaster.py - About 45 mins to fix

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

          def push(flargs):
              vm_name, args = flargs
              kind = args.kind
          
              vm = VMachine(vm_conf_file, vm_name)
          Severity: Minor
          Found in AVMaster/Old/oldMaster.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

                                      if a:
                                          print "sample SAVED on db"
                                          #os.system('sudo rm -fr %s') % build_zip_dst
                                      else:
                                          print "sample NOT SAVED on db"
          Severity: Major
          Found in AVMaster/Old/oldMaster.py - About 45 mins to fix

            Avoid deeply nested control flow statements.
            Open

                                        if "python.exe" in out or script_name in out or "cmd.exe" in out:
                                            found = True
                                            print "DBG process found for %s!" % vm_name
                                        if found == True:
            Severity: Major
            Found in AVMaster/Old/oldMaster.py - About 45 mins to fix

              Function add_record_result has 5 arguments (exceeds 4 allowed). Consider refactoring.
              Open

              def add_record_result(vm_name, kind, t_id, status, result=None):
              Severity: Minor
              Found in AVMaster/Old/oldMaster.py - About 35 mins to fix

                Function dispatch_kind has 5 arguments (exceeds 4 allowed). Consider refactoring.
                Open

                def dispatch_kind(vm_name, kind, args, r_id=None, tries=0):
                Severity: Minor
                Found in AVMaster/Old/oldMaster.py - About 35 mins to fix

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

                  def dispatch(flargs):
                      try:
                          vm_name, args = flargs
                          kind = args.kind
                          results = []
                  Severity: Minor
                  Found in AVMaster/Old/oldMaster.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 "%s, ERROR: not updated. Reason: %s" % (vm_name, e)
                  Severity: Major
                  Found in AVMaster/Old/oldMaster.py - About 30 mins to fix

                    Avoid too many return statements within this function.
                    Open

                                return dispatch_kind(vm_name, kind, args, result_id, tries)
                    Severity: Major
                    Found in AVMaster/Old/oldMaster.py - About 30 mins to fix

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

                      def copy_to_guest(vm, test_dir, filestocopy):
                          #lib_dir = "%s\\lib" % test_dir
                          #assets_dir = "%s\\assets" % test_dir
                          vmavtest = "../AVAgent"
                      
                      
                      Severity: Minor
                      Found in AVMaster/Old/oldMaster.py - About 25 mins to fix

                      Cognitive Complexity

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

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

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

                      Further reading

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

                              if kind == "agents":
                                  results.append(dispatch_kind(vm_name, "silent", args))
                                  sleep(random.randint(5, 10))
                                  results.append(dispatch_kind(vm_name, "mobile", args))
                                  sleep(random.randint(5, 10))
                      Severity: Major
                      Found in AVMaster/Old/oldMaster.py and 1 other location - About 6 days to fix
                      AVMaster/master.py on lines 278..321

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

                      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

                      def update(flargs):
                          vms = len(flargs[1].vms)
                          try:
                              vm_name = flargs[0]
                              vm = VMachine(vm_conf_file, vm_name)
                      Severity: Major
                      Found in AVMaster/Old/oldMaster.py and 1 other location - About 3 days to fix
                      AVMaster/master.py on lines 64..124

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

                      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

                      def save_results(vm, kind, test_id, result_id):
                          global status, logdir
                      
                          try:
                              if kind == "silent" or kind == "melt":
                      Severity: Major
                      Found in AVMaster/Old/oldMaster.py and 1 other location - About 1 day to fix
                      AVMaster/master.py on lines 198..218

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

                      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

                      def copy_to_guest(vm, test_dir, filestocopy):
                          #lib_dir = "%s\\lib" % test_dir
                          #assets_dir = "%s\\assets" % test_dir
                          vmavtest = "../AVAgent"
                      
                      
                      Severity: Major
                      Found in AVMaster/Old/oldMaster.py and 1 other location - About 1 day to fix
                      AVMaster/master.py on lines 244..266

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

                      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

                      def test_internet(flargs):
                          vm_name = flargs[0]
                          try:
                              vm = VMachine(vm_conf_file, vm_name)
                              vm.startup()
                      Severity: Major
                      Found in AVMaster/Old/oldMaster.py and 1 other location - About 1 day to fix
                      AVMaster/master.py on lines 619..639

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

                      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

                      def upd_record_result(r_id, status=None, result=None):
                          r = Result.query.filter_by(id=r_id).first()
                          if not r:
                              print "DBG result not found"
                              return
                      Severity: Major
                      Found in AVMaster/Old/oldMaster.py and 1 other location - About 6 hrs to fix
                      AVMaster/master.py on lines 185..196

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

                      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

                      def save_screenshot(vm, result_id):
                          try:
                              #out_img = "/tmp/screenshot_%s_%s.png" % (vm, kind)
                              out_img = "/tmp/screenshot_%s.png" % vm
                              vmman.takeScreenshot(vm, out_img)
                      Severity: Major
                      Found in AVMaster/Old/oldMaster.py and 1 other location - About 6 hrs to fix
                      AVMaster/master.py on lines 220..233

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

                      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

                      def add_record_result(vm_name, kind, t_id, status, result=None):
                          try:
                              timestamp = time.strftime("%Y%m%d_%H%M", time.gmtime())
                              r = Result(vm_name, t_id, kind, status, result)
                              db.session.add(r)
                      Severity: Major
                      Found in AVMaster/Old/oldMaster.py and 1 other location - About 4 hrs to fix
                      AVMaster/master.py on lines 174..183

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

                      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

                      def start_test():
                          global db
                      
                          try:
                              timestamp = time.strftime("%Y%m%d_%H%M", time.gmtime())
                      Severity: Major
                      Found in AVMaster/Old/oldMaster.py and 1 other location - About 4 hrs to fix
                      AVMaster/master.py on lines 146..159

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

                      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

                      def add_record_sample(result_id, build_zip_dst):
                          print "DBG Saving Sample"
                          if not os.path.exists(build_zip_dst):
                              return False
                          with open(build_zip_dst, 'rb') as f:
                      Severity: Major
                      Found in AVMaster/Old/oldMaster.py and 1 other location - About 4 hrs to fix
                      AVMaster/master.py on lines 689..697

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

                      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

                      def check_infection_status(vm):
                          startup_dir = "C:\\Users\\avtest\\AppData\\Microsoft"
                          stuff = check_directory(vm, startup_dir)
                          print stuff
                          if stuff is None:
                      Severity: Major
                      Found in AVMaster/Old/oldMaster.py and 1 other location - About 3 hrs to fix
                      AVMaster/master.py on lines 641..652

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

                      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

                      def end_test(test):
                          try:
                              #t = Test.query.filter_by(id=t_id)
                              if test is None:
                                  return False
                      Severity: Major
                      Found in AVMaster/Old/oldMaster.py and 1 other location - About 3 hrs to fix
                      AVMaster/master.py on lines 161..172

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

                      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 args.vm:
                              if args.vm == "all":
                                  vm_names = c.get("pool", "all").split(",")
                              else:
                                  vm_names = args.vm.split(',')
                      Severity: Major
                      Found in AVMaster/Old/oldMaster.py and 1 other location - About 3 hrs to fix
                      AVMaster/master.py on lines 753..760

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

                      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

                          if kind == "mobile" or kind == "silent":
                              filestocopy.append("assets/codec")
                              filestocopy.append("assets/codec_mod")
                              filestocopy.append("assets/sqlite")
                              filestocopy.append("assets/sqlite_mod")
                      Severity: Major
                      Found in AVMaster/Old/oldMaster.py and 2 other locations - About 2 hrs to fix
                      AVMaster/master.py on lines 370..374
                      AVMaster/master.py on lines 492..496

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

                      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

                      def run_command(flargs):
                      #arg = args.kind
                          # if args.action == "command":
                          #    arg = args.cmd
                          vm_name, args = flargs
                      Severity: Major
                      Found in AVMaster/Old/oldMaster.py and 1 other location - About 2 hrs to fix
                      AVMaster/master.py on lines 133..144

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

                      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

                      def revert(flargs):
                          vm_name = flargs[0]
                          job_log(vm_name, "REVERT")
                          vm = VMachine(vm_conf_file, vm_name)
                          vm.revert_last_snapshot()
                      Severity: Major
                      Found in AVMaster/Old/oldMaster.py and 1 other location - About 2 hrs to fix
                      AVMaster/master.py on lines 126..131

                      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

                          if args.action == "dispatch":
                              print "DBG add record to db"
                              test = start_test()
                              if test.id is not None:
                                  test_id = test.id
                      Severity: Major
                      Found in AVMaster/Old/oldMaster.py and 1 other location - About 1 hr to fix
                      AVMaster/master.py on lines 784..791

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

                      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

                          try:
                              vm_name, args = flargs
                              kind = args.kind
                              results = []
                              print "DBG %s, %s" % (vm_name, kind)
                      Severity: Major
                      Found in AVMaster/Old/oldMaster.py and 1 other location - About 1 hr to fix
                      AVMaster/master.py on lines 270..336

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

                      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 args.pool:
                              pool_size = args.pool
                          else:
                              pool_size = int(c.get("pool", "size"))
                              args.pool = pool_size
                      Severity: Minor
                      Found in AVMaster/Old/oldMaster.py and 1 other location - About 55 mins to fix
                      AVMaster/master.py on lines 795..799

                      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

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

                          if args.action == "update":
                              os.system('sudo ./net_enable.sh')
                              print "[!] Enabling NETWORKING!"
                          else:
                              os.system('sudo ./net_disable.sh')
                      Severity: Minor
                      Found in AVMaster/Old/oldMaster.py and 1 other location - About 55 mins to fix
                      AVMaster/master.py on lines 777..782

                      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

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

                          if kind == "exploit_web":
                              filestocopy.append("assets/avtest.swf")
                              filestocopy.append("assets/owned.docm")
                              filestocopy.append("assets/PMIEFuck-WinWord.dll")
                      Severity: Major
                      Found in AVMaster/Old/oldMaster.py and 2 other locations - About 55 mins to fix
                      AVMaster/master.py on lines 365..368
                      AVMaster/master.py on lines 487..490

                      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

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

                          parser.add_argument('-k', '--kind', default="all", type=str,
                                              choices=[
                                                  'silent', 'melt', 'exploit', 'exploit_docx', 'exploit_ppsx', 'exploit_web',
                                                  'mobile', 'agents', 'exploits', 'silentmelt', 'release', 'all'],
                      Severity: Minor
                      Found in AVMaster/Old/oldMaster.py and 1 other location - About 50 mins to fix
                      AVMaster/master.py on lines 720..722

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

                      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(logdir):
                              print "DBG mkdir %s" % logdir
                              os.mkdir(logdir)
                      Severity: Minor
                      Found in AVMaster/Old/oldMaster.py and 1 other location - About 40 mins to fix
                      AVMaster/master.py on lines 735..737

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

                      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