rapid7/metasploit-framework

View on GitHub

Showing 7,361 of 22,177 total issues

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

          when /\+FCO/i
            print_status( "Fax: #{result}" )
            dialrange[dialnum][:identified] = true
            dialrange[dialnum][:result] = result
            dialrange[dialnum][:fax] = true
Severity: Major
Found in modules/auxiliary/scanner/telephony/wardial.rb and 1 other location - About 1 hr to fix
modules/auxiliary/scanner/telephony/wardial.rb on lines 253..264

Duplicated Code

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

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

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

Tuning

This issue has a mass of 67.

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

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

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

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

Refactorings

Further Reading

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

      mytarget = nil

      print_status("Automatically detecting the target...")
      connect
      disconnect
Severity: Major
Found in modules/exploits/windows/ftp/httpdx_tolog_format.rb and 1 other location - About 1 hr to fix
modules/exploits/windows/ftp/vermillion_ftpd_port.rb on lines 112..141

Duplicated Code

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

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

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

Tuning

This issue has a mass of 67.

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

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

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

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

Refactorings

Further Reading

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

  def check
    # Use nagios_xi_login to try and authenticate. If authentication succeeds, nagios_xi_login returns
    # an array containing the http response body of a get request to index.php and the session cookies
    auth_result, err_msg, @auth_cookies, @version = authenticate(username, password, finish_install)

modules/exploits/linux/http/nagios_xi_plugins_filename_authenticated_rce.rb on lines 88..106

Duplicated Code

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

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

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

Tuning

This issue has a mass of 67.

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

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

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

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

Refactorings

Further Reading

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

  def check
    connect

    web_req = "GET /console/login/LoginForm.jsp HTTP/1.1\nHost: #{peer}\n\n"
    sock.put(web_req)
modules/exploits/multi/misc/weblogic_deserialize_badattrval.rb on lines 80..103

Duplicated Code

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

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

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

Tuning

This issue has a mass of 67.

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

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

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

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

Refactorings

Further Reading

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

      mytarget = nil

      print_status("Automatically detecting the target...")
      connect
      disconnect
Severity: Major
Found in modules/exploits/windows/ftp/vermillion_ftpd_port.rb and 1 other location - About 1 hr to fix
modules/exploits/windows/ftp/httpdx_tolog_format.rb on lines 140..169

Duplicated Code

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

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

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

Tuning

This issue has a mass of 67.

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

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

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

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

Refactorings

Further Reading

Method login has 13 arguments (exceeds 4 allowed). Consider refactoring.
Open

  def login(name = '', user = '', pass = '', domain = '',
      verify_signature = false, usentlmv2 = false, usentlm2_session = true,
      send_lm = true, use_lanman_key = false, send_ntlm = true,
      native_os = 'Windows 2000 2195', native_lm = 'Windows 2000 5.0', spnopt = {})
Severity: Major
Found in lib/rex/proto/smb/simple_client.rb - About 1 hr to fix

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

      def jsp_drop_bin(bin_data, output_file)
        jspraw =  %Q|<%@ page import="java.io.*" %>\n|
        jspraw << %Q|<%\n|
        jspraw << %Q|String data = "#{Rex::Text.to_hex(bin_data, "")}";\n|
    
    
    modules/exploits/multi/http/sonicwall_gms_upload.rb on lines 234..258
    modules/exploits/windows/http/desktopcentral_file_upload.rb on lines 135..159
    modules/exploits/windows/http/desktopcentral_statusupdate_upload.rb on lines 125..149
    modules/exploits/windows/http/hp_autopass_license_traversal.rb on lines 211..235
    modules/exploits/windows/http/jira_collector_traversal.rb on lines 164..188
    modules/exploits/windows/http/manageengine_connectionid_write.rb on lines 55..79
    modules/exploits/windows/http/solarwinds_fsm_userlogin.rb on lines 108..132

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

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

      def jsp_drop_bin(bin_data, output_file)
        jspraw =  %Q|<%@ page import="java.io.*" %>\n|
        jspraw << %Q|<%\n|
        jspraw << %Q|String data = "#{Rex::Text.to_hex(bin_data, "")}";\n|
    
    
    modules/exploits/multi/http/sonicwall_gms_upload.rb on lines 234..258
    modules/exploits/windows/http/desktopcentral_file_upload.rb on lines 135..159
    modules/exploits/windows/http/hp_autopass_license_traversal.rb on lines 211..235
    modules/exploits/windows/http/jira_collector_traversal.rb on lines 164..188
    modules/exploits/windows/http/manageengine_connectionid_write.rb on lines 55..79
    modules/exploits/windows/http/solarwinds_fsm_userlogin.rb on lines 108..132
    modules/exploits/windows/http/vmware_vcenter_chargeback_upload.rb on lines 156..180

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

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

      def jsp_drop_bin(bin_data, output_file)
        jspraw =  %Q|<%@ page import="java.io.*" %>\n|
        jspraw << %Q|<%\n|
        jspraw << %Q|String data = "#{Rex::Text.to_hex(bin_data, "")}";\n|
    
    
    Severity: Major
    Found in modules/exploits/windows/http/jira_collector_traversal.rb and 7 other locations - About 1 hr to fix
    modules/exploits/multi/http/sonicwall_gms_upload.rb on lines 234..258
    modules/exploits/windows/http/desktopcentral_file_upload.rb on lines 135..159
    modules/exploits/windows/http/desktopcentral_statusupdate_upload.rb on lines 125..149
    modules/exploits/windows/http/hp_autopass_license_traversal.rb on lines 211..235
    modules/exploits/windows/http/manageengine_connectionid_write.rb on lines 55..79
    modules/exploits/windows/http/solarwinds_fsm_userlogin.rb on lines 108..132
    modules/exploits/windows/http/vmware_vcenter_chargeback_upload.rb on lines 156..180

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

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

      def jsp_drop_bin(bin_data, output_file)
        jspraw =  %Q|<%@ page import="java.io.*" %>\n|
        jspraw << %Q|<%\n|
        jspraw << %Q|String data = "#{Rex::Text.to_hex(bin_data, "")}";\n|
    
    
    modules/exploits/multi/http/sonicwall_gms_upload.rb on lines 234..258
    modules/exploits/windows/http/desktopcentral_file_upload.rb on lines 135..159
    modules/exploits/windows/http/desktopcentral_statusupdate_upload.rb on lines 125..149
    modules/exploits/windows/http/hp_autopass_license_traversal.rb on lines 211..235
    modules/exploits/windows/http/jira_collector_traversal.rb on lines 164..188
    modules/exploits/windows/http/solarwinds_fsm_userlogin.rb on lines 108..132
    modules/exploits/windows/http/vmware_vcenter_chargeback_upload.rb on lines 156..180

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

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

      def jsp_drop_bin(bin_data, output_file)
        jspraw =  %Q|<%@ page import="java.io.*" %>\n|
        jspraw << %Q|<%\n|
        jspraw << %Q|String data = "#{Rex::Text.to_hex(bin_data, "")}";\n|
    
    
    Severity: Major
    Found in modules/exploits/multi/http/sonicwall_gms_upload.rb and 7 other locations - About 1 hr to fix
    modules/exploits/windows/http/desktopcentral_file_upload.rb on lines 135..159
    modules/exploits/windows/http/desktopcentral_statusupdate_upload.rb on lines 125..149
    modules/exploits/windows/http/hp_autopass_license_traversal.rb on lines 211..235
    modules/exploits/windows/http/jira_collector_traversal.rb on lines 164..188
    modules/exploits/windows/http/manageengine_connectionid_write.rb on lines 55..79
    modules/exploits/windows/http/solarwinds_fsm_userlogin.rb on lines 108..132
    modules/exploits/windows/http/vmware_vcenter_chargeback_upload.rb on lines 156..180

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

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

      def jsp_drop_bin(bin_data, output_file)
        jspraw =  %Q|<%@ page import="java.io.*" %>\n|
        jspraw << %Q|<%\n|
        jspraw << %Q|String data = "#{Rex::Text.to_hex(bin_data, "")}";\n|
    
    
    Severity: Major
    Found in modules/exploits/windows/http/solarwinds_fsm_userlogin.rb and 7 other locations - About 1 hr to fix
    modules/exploits/multi/http/sonicwall_gms_upload.rb on lines 234..258
    modules/exploits/windows/http/desktopcentral_file_upload.rb on lines 135..159
    modules/exploits/windows/http/desktopcentral_statusupdate_upload.rb on lines 125..149
    modules/exploits/windows/http/hp_autopass_license_traversal.rb on lines 211..235
    modules/exploits/windows/http/jira_collector_traversal.rb on lines 164..188
    modules/exploits/windows/http/manageengine_connectionid_write.rb on lines 55..79
    modules/exploits/windows/http/vmware_vcenter_chargeback_upload.rb on lines 156..180

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

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

      def jsp_drop_bin(bin_data, output_file)
        jspraw =  %Q|<%@ page import="java.io.*" %>\n|
        jspraw << %Q|<%\n|
        jspraw << %Q|String data = "#{Rex::Text.to_hex(bin_data, "")}";\n|
    
    
    modules/exploits/multi/http/sonicwall_gms_upload.rb on lines 234..258
    modules/exploits/windows/http/desktopcentral_statusupdate_upload.rb on lines 125..149
    modules/exploits/windows/http/hp_autopass_license_traversal.rb on lines 211..235
    modules/exploits/windows/http/jira_collector_traversal.rb on lines 164..188
    modules/exploits/windows/http/manageengine_connectionid_write.rb on lines 55..79
    modules/exploits/windows/http/solarwinds_fsm_userlogin.rb on lines 108..132
    modules/exploits/windows/http/vmware_vcenter_chargeback_upload.rb on lines 156..180

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

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

      def jsp_drop_bin(bin_data, output_file)
        jspraw =  %Q|<%@ page import="java.io.*" %>\n|
        jspraw << %Q|<%\n|
        jspraw << %Q|String data = "#{Rex::Text.to_hex(bin_data, "")}";\n|
    
    
    modules/exploits/multi/http/sonicwall_gms_upload.rb on lines 234..258
    modules/exploits/windows/http/desktopcentral_file_upload.rb on lines 135..159
    modules/exploits/windows/http/desktopcentral_statusupdate_upload.rb on lines 125..149
    modules/exploits/windows/http/jira_collector_traversal.rb on lines 164..188
    modules/exploits/windows/http/manageengine_connectionid_write.rb on lines 55..79
    modules/exploits/windows/http/solarwinds_fsm_userlogin.rb on lines 108..132
    modules/exploits/windows/http/vmware_vcenter_chargeback_upload.rb on lines 156..180

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

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

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

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

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

    Refactorings

    Further Reading

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

      def import_outpost24_xml(args={}, &block)
        bl = validate_ips(args[:blacklist]) ? args[:blacklist].split : []
        wspace = Msf::Util::DBManager.process_opts_workspace(args, framework).name
        if Rex::Parser.nokogiri_loaded
          parser = "Nokogiri v#{::Nokogiri::VERSION}"
    Severity: Major
    Found in lib/msf/core/db_manager/import/outpost24.rb and 6 other locations - About 1 hr to fix
    lib/msf/core/db_manager/import/acunetix.rb on lines 13..29
    lib/msf/core/db_manager/import/appscan.rb on lines 13..29
    lib/msf/core/db_manager/import/burp_session.rb on lines 13..29
    lib/msf/core/db_manager/import/ci.rb on lines 13..29
    lib/msf/core/db_manager/import/foundstone.rb on lines 13..29
    lib/msf/core/db_manager/import/mbsa.rb on lines 13..29

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

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

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

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

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

    Refactorings

    Further Reading

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

      def import_appscan_xml(args={}, &block)
        bl = validate_ips(args[:blacklist]) ? args[:blacklist].split : []
        wspace = Msf::Util::DBManager.process_opts_workspace(args, framework).name
        if Rex::Parser.nokogiri_loaded
          parser = "Nokogiri v#{::Nokogiri::VERSION}"
    Severity: Major
    Found in lib/msf/core/db_manager/import/appscan.rb and 6 other locations - About 1 hr to fix
    lib/msf/core/db_manager/import/acunetix.rb on lines 13..29
    lib/msf/core/db_manager/import/burp_session.rb on lines 13..29
    lib/msf/core/db_manager/import/ci.rb on lines 13..29
    lib/msf/core/db_manager/import/foundstone.rb on lines 13..29
    lib/msf/core/db_manager/import/mbsa.rb on lines 13..29
    lib/msf/core/db_manager/import/outpost24.rb on lines 13..29

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

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

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

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

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

    Refactorings

    Further Reading

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

      def import_foundstone_xml(args={}, &block)
        bl = validate_ips(args[:blacklist]) ? args[:blacklist].split : []
        wspace = Msf::Util::DBManager.process_opts_workspace(args, framework).name
        if Rex::Parser.nokogiri_loaded
          parser = "Nokogiri v#{::Nokogiri::VERSION}"
    Severity: Major
    Found in lib/msf/core/db_manager/import/foundstone.rb and 6 other locations - About 1 hr to fix
    lib/msf/core/db_manager/import/acunetix.rb on lines 13..29
    lib/msf/core/db_manager/import/appscan.rb on lines 13..29
    lib/msf/core/db_manager/import/burp_session.rb on lines 13..29
    lib/msf/core/db_manager/import/ci.rb on lines 13..29
    lib/msf/core/db_manager/import/mbsa.rb on lines 13..29
    lib/msf/core/db_manager/import/outpost24.rb on lines 13..29

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

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

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

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

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

    Refactorings

    Further Reading

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

      def import_burp_session_xml(args={}, &block)
        bl = validate_ips(args[:blacklist]) ? args[:blacklist].split : []
        wspace = Msf::Util::DBManager.process_opts_workspace(args, framework).name
        if Rex::Parser.nokogiri_loaded
          parser = "Nokogiri v#{::Nokogiri::VERSION}"
    Severity: Major
    Found in lib/msf/core/db_manager/import/burp_session.rb and 6 other locations - About 1 hr to fix
    lib/msf/core/db_manager/import/acunetix.rb on lines 13..29
    lib/msf/core/db_manager/import/appscan.rb on lines 13..29
    lib/msf/core/db_manager/import/ci.rb on lines 13..29
    lib/msf/core/db_manager/import/foundstone.rb on lines 13..29
    lib/msf/core/db_manager/import/mbsa.rb on lines 13..29
    lib/msf/core/db_manager/import/outpost24.rb on lines 13..29

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

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

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

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

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

    Refactorings

    Further Reading

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

      def import_ci_xml(args={}, &block)
        bl = validate_ips(args[:blacklist]) ? args[:blacklist].split : []
        wspace = Msf::Util::DBManager.process_opts_workspace(args, framework).name
        if Rex::Parser.nokogiri_loaded
          parser = "Nokogiri v#{::Nokogiri::VERSION}"
    Severity: Major
    Found in lib/msf/core/db_manager/import/ci.rb and 6 other locations - About 1 hr to fix
    lib/msf/core/db_manager/import/acunetix.rb on lines 13..29
    lib/msf/core/db_manager/import/appscan.rb on lines 13..29
    lib/msf/core/db_manager/import/burp_session.rb on lines 13..29
    lib/msf/core/db_manager/import/foundstone.rb on lines 13..29
    lib/msf/core/db_manager/import/mbsa.rb on lines 13..29
    lib/msf/core/db_manager/import/outpost24.rb on lines 13..29

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

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

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

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

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

    Refactorings

    Further Reading

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

      def import_acunetix_xml(args={}, &block)
        bl = validate_ips(args[:blacklist]) ? args[:blacklist].split : []
        wspace = Msf::Util::DBManager.process_opts_workspace(args, framework).name
        if Rex::Parser.nokogiri_loaded
          parser = "Nokogiri v#{::Nokogiri::VERSION}"
    Severity: Major
    Found in lib/msf/core/db_manager/import/acunetix.rb and 6 other locations - About 1 hr to fix
    lib/msf/core/db_manager/import/appscan.rb on lines 13..29
    lib/msf/core/db_manager/import/burp_session.rb on lines 13..29
    lib/msf/core/db_manager/import/ci.rb on lines 13..29
    lib/msf/core/db_manager/import/foundstone.rb on lines 13..29
    lib/msf/core/db_manager/import/mbsa.rb on lines 13..29
    lib/msf/core/db_manager/import/outpost24.rb on lines 13..29

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

    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