rapid7/metasploit-framework

View on GitHub

Showing 7,361 of 22,177 total issues

Method dump_table_fields has 55 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    def dump_table_fields(table, columns, condition = '', num_limit = 0)
      return '' if columns.empty?

      one_column = columns.length == 1
      if one_column
Severity: Major
Found in lib/msf/core/exploit/sqli/mysqli/common.rb - About 2 hrs to fix

    Method dump_table_fields has 55 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        def dump_table_fields(table, columns, condition = '', num_limit = 0)
          return '' if columns.empty?
    
          one_column = columns.length == 1
          if one_column
    Severity: Major
    Found in lib/msf/core/exploit/sqli/postgresqli/common.rb - About 2 hrs to fix

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

        def get_target(agent)
          #If the user is already specified by the user, we'll just use that
          return target if target.name != 'Automatic'
      
          if agent =~ /NT 5\.1/ and agent =~ /MSIE 7/
      modules/exploits/windows/browser/adobe_flash_otf_font.rb on lines 133..151
      modules/exploits/windows/browser/cisco_playerpt_setsource_surl.rb on lines 345..363
      modules/exploits/windows/browser/msxml_get_definition_code_exec.rb on lines 131..149
      modules/exploits/windows/browser/oracle_autovue_setmarkupmode.rb on lines 309..327

      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

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

        def get_target(agent)
          #If the user is already specified by the user, we'll just use that
          return target if target.name != 'Automatic'
      
          if agent =~ /NT 5\.1/ and agent =~ /MSIE 6/
      modules/exploits/windows/browser/adobe_flash_otf_font.rb on lines 133..151
      modules/exploits/windows/browser/cisco_playerpt_setsource_surl.rb on lines 345..363
      modules/exploits/windows/browser/hp_alm_xgo_setshapenodetype_exec.rb on lines 80..98
      modules/exploits/windows/browser/msxml_get_definition_code_exec.rb on lines 131..149

      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

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

        def get_target(agent)
          #If the user is already specified by the user, we'll just use that
          return target if target.name != 'Automatic'
      
          if agent =~ /NT 5\.1/ and agent =~ /MSIE 6/
      Severity: Major
      Found in modules/exploits/windows/browser/adobe_flash_otf_font.rb and 4 other locations - About 2 hrs to fix
      modules/exploits/windows/browser/cisco_playerpt_setsource_surl.rb on lines 345..363
      modules/exploits/windows/browser/hp_alm_xgo_setshapenodetype_exec.rb on lines 80..98
      modules/exploits/windows/browser/msxml_get_definition_code_exec.rb on lines 131..149
      modules/exploits/windows/browser/oracle_autovue_setmarkupmode.rb on lines 309..327

      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

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

        def get_target(agent)
          #If the user is already specified by the user, we'll just use that
          return target if target.name != 'Automatic'
      
          if agent =~ /NT 5\.1/ and agent =~ /MSIE 6/
      modules/exploits/windows/browser/adobe_flash_otf_font.rb on lines 133..151
      modules/exploits/windows/browser/hp_alm_xgo_setshapenodetype_exec.rb on lines 80..98
      modules/exploits/windows/browser/msxml_get_definition_code_exec.rb on lines 131..149
      modules/exploits/windows/browser/oracle_autovue_setmarkupmode.rb on lines 309..327

      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

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

        def get_target(agent)
          #If the user is already specified by the user, we'll just use that
          return target if target.name != 'Automatic'
      
          if agent =~ /NT 5\.1/ and agent =~ /MSIE 6/
      modules/exploits/windows/browser/adobe_flash_otf_font.rb on lines 133..151
      modules/exploits/windows/browser/cisco_playerpt_setsource_surl.rb on lines 345..363
      modules/exploits/windows/browser/hp_alm_xgo_setshapenodetype_exec.rb on lines 80..98
      modules/exploits/windows/browser/oracle_autovue_setmarkupmode.rb on lines 309..327

      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 encode_block_bash_echo(state, buf)
      
          hex = ''
      
          # Can we use single quotes to enclose the echo arguments?
      Severity: Major
      Found in modules/encoders/cmd/generic_sh.rb and 1 other location - About 2 hrs to fix
      modules/encoders/cmd/echo.rb on lines 49..82

      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 encode_block_bash_echo(state, buf)
      
          hex = ''
      
          # Can we use single quotes to enclose the echo arguments?
      Severity: Major
      Found in modules/encoders/cmd/echo.rb and 1 other location - About 2 hrs to fix
      modules/encoders/cmd/generic_sh.rb on lines 106..139

      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

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

          if my_target.name == 'Automatic'
            agent = request.headers['User-Agent']
            if agent =~ /NT 5\.1/ and agent =~ /MSIE 6\.0/
              my_target = targets[1] # XP
            elsif agent =~ /NT 5\.1/ and agent =~ /MSIE 7\.0/
      modules/exploits/windows/browser/intrust_annotatex_add.rb on lines 97..111
      modules/exploits/windows/browser/viscom_movieplayer_drawtext.rb on lines 79..93

      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

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

          if my_target.name == 'Automatic'
            agent = request.headers['User-Agent']
            if agent =~ /NT 5\.1/ and agent =~ /MSIE 6\.0/
              my_target = targets[1] # XP
            elsif agent =~ /NT 5\.1/ and agent =~ /MSIE 7\.0/
      modules/exploits/windows/browser/imgeviewer_tifmergemultifiles.rb on lines 77..91
      modules/exploits/windows/browser/intrust_annotatex_add.rb on lines 97..111

      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

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

          if my_target.name == 'Automatic'
            agent = request.headers['User-Agent']
            if agent =~ /NT 5\.1/ and agent =~ /MSIE 6\.0/    # xp/ie6
              my_target = targets[1]
            elsif agent =~ /NT 5\.1/ and agent =~ /MSIE 7\.0/    # xp/ie7
      Severity: Major
      Found in modules/exploits/windows/browser/intrust_annotatex_add.rb and 2 other locations - About 2 hrs to fix
      modules/exploits/windows/browser/imgeviewer_tifmergemultifiles.rb on lines 77..91
      modules/exploits/windows/browser/viscom_movieplayer_drawtext.rb on lines 79..93

      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

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

        def dcerpc_mgmt_is_server_listening(dport=135)
          res = nil
      
          begin
      
      
      Severity: Major
      Found in lib/msf/core/exploit/remote/dcerpc_mgmt.rb and 1 other location - About 2 hrs to fix
      lib/msf/core/exploit/remote/dcerpc_mgmt.rb on lines 137..165

      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

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

        def initialize(info = {})
          super(
            update_info(
              info,
              {
      modules/exploits/linux/ssh/quantum_dxi_known_privkey.rb on lines 14..65

      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

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

        def initialize(info = {})
          super(
            update_info(
              info,
              {
      Severity: Major
      Found in modules/exploits/linux/ssh/quantum_dxi_known_privkey.rb and 1 other location - About 2 hrs to fix
      modules/exploits/linux/ssh/loadbalancerorg_enterprise_known_privkey.rb on lines 15..66

      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

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

        def self.extract_deployment(deployment)
          return [] if deployment.nil?
          domain    = deployment.elements['Login/Credentials/Domain'].get_text.value rescue ''
          username  = deployment.elements['Login/Credentials/Username'].get_text.value rescue ''
          password  = deployment.elements['Login/Credentials/Password'].get_text.value rescue ''
      Severity: Major
      Found in lib/rex/parser/unattend.rb and 1 other location - About 2 hrs to fix
      lib/rex/parser/unattend.rb on lines 69..82

      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

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

        def self.extract_autologon(auto_logon)
          return [] if auto_logon.nil?
      
          domain    = auto_logon.elements['Domain'].get_text.value rescue ''
          username  = auto_logon.elements['Username'].get_text.value rescue ''
      Severity: Major
      Found in lib/rex/parser/unattend.rb and 1 other location - About 2 hrs to fix
      lib/rex/parser/unattend.rb on lines 39..51

      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

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

              xml.send('SOAP-ENV:Header'){
                xml.send('me:AppReqHeader', 'xmlns:me' => "http://www.konicaminolta.com/Header/OpenAPI-#{major}-#{minor}"){
                  xml.send('ApplicationID', 'xmlns' => '') { xml.text '0' }
                  xml.send('UserName', 'xmlns' => '') { xml.text '' }
                  xml.send('Password', 'xmlns' => '') { xml.text '' }
      Severity: Major
      Found in modules/auxiliary/gather/konica_minolta_pwd_extract.rb and 1 other location - About 2 hrs to fix
      modules/auxiliary/gather/konica_minolta_pwd_extract.rb on lines 82..91

      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

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

              xml.send('SOAP-ENV:Header'){
                xml.send('me:AppReqHeader', 'xmlns:me' => "http://www.konicaminolta.com/Header/OpenAPI-#{major}-#{minor}"){
                  xml.send('ApplicationID', 'xmlns' => '') { xml.text '0' }
                  xml.send('UserName', 'xmlns' => '') { xml.text '' }
                  xml.send('Password', 'xmlns' => '') { xml.text '' }
      Severity: Major
      Found in modules/auxiliary/gather/konica_minolta_pwd_extract.rb and 1 other location - About 2 hrs to fix
      modules/auxiliary/gather/konica_minolta_pwd_extract.rb on lines 49..58

      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

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

        def dcerpc_mgmt_stop_server_listening(dport=135)
          res = nil
      
          begin
      
      
      Severity: Major
      Found in lib/msf/core/exploit/remote/dcerpc_mgmt.rb and 1 other location - About 2 hrs to fix
      lib/msf/core/exploit/remote/dcerpc_mgmt.rb on lines 106..134

      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

      Severity
      Category
      Status
      Source
      Language