Showing 7,266 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)
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
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)
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'
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
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"
File msftidy.rb
has 680 lines of code (exceeds 250 allowed). Consider refactoring. Open
require 'fileutils'
require 'find'
require 'time'
require 'rubocop'
require 'open3'
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',
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
File windows_error.rb
has 673 lines of code (exceeds 250 allowed). Consider refactoring. Open
module Msf
class WindowsError
#
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
Similar blocks of code found in 2 locations. Consider refactoring. Open
module Payload::Windows::BindNamedPipe
include Msf::Payload::TransportConfig
include Msf::Payload::Windows
include Msf::Payload::Windows::SendUUID
- Read upRead up
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 374.
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
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 2 locations. Consider refactoring. Open
module Payload::Windows::BindNamedPipe_x64
include Msf::Payload::TransportConfig
include Msf::Payload::Windows
include Msf::Payload::Windows::SendUUID_x64
- Read upRead up
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 374.
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
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
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
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
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'
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
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
Class Exploit
has 77 methods (exceeds 20 allowed). Consider refactoring. Open
class Exploit < Msf::Module
##
# Exceptions
##
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