rapid7/metasploit-framework

View on GitHub

Showing 4,139 of 21,886 total issues

Method asm_reverse_http has 323 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  def asm_reverse_http(opts={})

    retry_count   = opts[:retry_count].to_i
    retry_wait   = opts[:retry_wait].to_i * 1000
    proxy_enabled = !!(opts[:proxy_host].to_s.strip.length > 0)
Severity: Major
Found in lib/msf/core/payload/windows/reverse_http.rb - About 1 day to fix

    File lastpass_creds.rb has 697 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    require 'English'
    require 'sqlite3'
    require 'uri'
    
    class MetasploitModule < Msf::Post
    Severity: Major
    Found in modules/post/multi/gather/lastpass_creds.rb - About 1 day to fix

      Method asm_reverse_http has 316 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

        def asm_reverse_http(opts={})
      
          retry_count   = opts[:retry_count].to_i
          retry_wait   = opts[:retry_wait].to_i * 1000
          proxy_enabled = !!(opts[:proxy_host].to_s.strip.length > 0)
      Severity: Major
      Found in lib/msf/core/payload/windows/x64/reverse_http_x64.rb - About 1 day to fix

        File fs.rb has 691 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        require 'tempfile'
        require 'filesize'
        require 'rex/post/meterpreter'
        require 'rex/post/meterpreter/extensions/stdapi/command_ids'
        require 'msf/ui/console/local_file_system'
        Severity: Major
        Found in lib/rex/post/meterpreter/ui/console/command_dispatcher/stdapi/fs.rb - About 1 day to fix

          Method build_payload_obj has 312 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

            def build_payload_obj(payload_data)
              payload_obj = 'aced' # STREAM_MAGIC
              payload_obj << '0005' # STREAM_VERSION
              payload_obj << '7372' # TC_OBJECT, TC_CLASSDESC
              payload_obj << '002e' # Class name length: 46
          Severity: Major
          Found in modules/exploits/multi/misc/weblogic_deserialize_badattrval.rb - About 1 day to fix

            File rbmysql.rb has 686 lines of code (exceeds 250 allowed). Consider refactoring.
            Open

            class RbMysql
            
              require "rbmysql/constants"
              require "rbmysql/error"
              require "rbmysql/charset"
            Severity: Major
            Found in lib/rbmysql.rb - About 1 day to fix

              File msftidy.rb has 680 lines of code (exceeds 250 allowed). Consider refactoring.
              Open

              require 'fileutils'
              require 'find'
              require 'time'
              require 'rubocop'
              require 'open3'
              Severity: Major
              Found in tools/dev/msftidy.rb - About 1 day to fix

                Method run_host has 307 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                  def run_host(ip)
                    begin
                
                    res = send_request_raw({
                      'uri'     => '/oradb/PUBLIC/GLOBAL_NAME',
                Severity: Major
                Found in modules/auxiliary/scanner/oracle/xdb_sid_brute.rb - About 1 day to fix

                  File teamcity_agent_xmlrpc_exec.rb has 673 lines of code (exceeds 250 allowed). Consider refactoring.
                  Open

                  class MetasploitModule < Msf::Exploit::Remote
                    Rank = ExcellentRanking
                  
                    include Msf::Exploit::Remote::HttpClient
                    include Msf::Exploit::CmdStager
                  Severity: Major
                  Found in modules/exploits/multi/misc/teamcity_agent_xmlrpc_exec.rb - About 1 day to fix

                    File windows_error.rb has 673 lines of code (exceeds 250 allowed). Consider refactoring.
                    Open

                    module Msf
                    
                    class WindowsError
                    
                      #
                    Severity: Major
                    Found in lib/msf/windows_error.rb - About 1 day to fix

                      Method on_request_uri has 303 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                        def on_request_uri(cli, request)
                          if request.uri =~ %r{/screenshot$}
                            data = ''
                            if supports_espia?(session)
                              data = session.espia.espia_image_get_dev_screen
                      Severity: Major
                      Found in modules/post/multi/manage/screenshare.rb - About 1 day to fix

                        File openssl_heartbleed.rb has 659 lines of code (exceeds 250 allowed). Consider refactoring.
                        Open

                        class MetasploitModule < Msf::Auxiliary
                          include Msf::Exploit::Remote::Tcp
                          include Msf::Auxiliary::Scanner
                          include Msf::Auxiliary::Report
                        
                        
                        Severity: Major
                        Found in modules/auxiliary/scanner/ssl/openssl_heartbleed.rb - About 1 day to fix

                          File ms_dtyp.rb has 656 lines of code (exceeds 250 allowed). Consider refactoring.
                          Open

                          require 'bindata'
                          require 'ruby_smb'
                          require 'rex/proto/secauthz/well_known_sids'
                          
                          module Rex::Proto::MsDtyp
                          Severity: Major
                          Found in lib/rex/proto/ms_dtyp.rb - About 1 day to fix

                            File resolver.rb has 654 lines of code (exceeds 250 allowed). Consider refactoring.
                            Open

                            require 'socket'
                            require 'timeout'
                            require 'ipaddr'
                            require 'logger'
                            require 'net/dns/packet'
                            Severity: Major
                            Found in lib/net/dns/resolver.rb - About 1 day to fix

                              File opennms_horizon_authenticated_rce.rb has 651 lines of code (exceeds 250 allowed). Consider refactoring.
                              Open

                              class MetasploitModule < Msf::Exploit::Remote
                                Rank = ExcellentRanking
                              
                                include Msf::Exploit::Remote::HttpClient
                                prepend Msf::Exploit::Remote::AutoCheck
                              Severity: Major
                              Found in modules/exploits/linux/http/opennms_horizon_authenticated_rce.rb - About 1 day to fix

                                File glassfish_deployer.rb has 647 lines of code (exceeds 250 allowed). Consider refactoring.
                                Open

                                require 'nokogiri'
                                require 'metasploit/framework/login_scanner/glassfish'
                                require 'metasploit/framework/credential_collection'
                                
                                class MetasploitModule < Msf::Exploit::Remote
                                Severity: Major
                                Found in modules/exploits/multi/http/glassfish_deployer.rb - About 1 day to fix

                                  Class Exploit has 77 methods (exceeds 20 allowed). Consider refactoring.
                                  Open

                                  class Exploit < Msf::Module
                                  
                                  ##
                                    # Exceptions
                                    ##
                                  Severity: Major
                                  Found in lib/msf/core/exploit.rb - About 1 day to fix

                                    File thycotic_secretserver_dump.rb has 644 lines of code (exceeds 250 allowed). Consider refactoring.
                                    Open

                                    require 'metasploit/framework/credential_collection'
                                    
                                    class MetasploitModule < Msf::Post
                                      include Msf::Post::Common
                                      include Msf::Post::File
                                    Severity: Major
                                    Found in modules/post/windows/gather/credentials/thycotic_secretserver_dump.rb - About 1 day to fix

                                      Method generate has 285 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                        def generate(_opts = {})
                                      
                                          target_uri = datastore['URL'] || ""
                                          filename = datastore['EXE'] || ""
                                          proto = "https"
                                      Severity: Major
                                      Found in modules/payloads/singles/windows/download_exec.rb - About 1 day to fix

                                        File client.rb has 639 lines of code (exceeds 250 allowed). Consider refactoring.
                                        Open

                                        require 'rex/encoder/ndr'
                                        require 'recog'
                                        
                                        module Msf
                                          module Exploit::Remote::SMB
                                        Severity: Major
                                        Found in lib/msf/core/exploit/remote/smb/client.rb - About 1 day to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language