Showing 21,960 of 21,960 total issues
Class Encoder
has 32 methods (exceeds 20 allowed). Consider refactoring. Open
class Encoder < Module
#
# The type set that encoders can fall within. This classifies the type of
# output generated by the encoder in terms of the general character set
File oats_weblogic_console.rb
has 333 lines of code (exceeds 250 allowed). Consider refactoring. Open
class MetasploitModule < Msf::Exploit::Remote
Rank = ExcellentRanking
include Msf::Exploit::Remote::HttpClient
include Msf::Auxiliary::Report
Similar blocks of code found in 2 locations. Consider refactoring. Open
def create_payload(num)
command = ""
os = "ANYOS"
if datastore['OS'].downcase == "linux"
if num == 1
- 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 137.
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
def create_payload(num)
command = ""
os = "ANYOS"
if datastore['OS'].downcase == "linux"
if num == 1
- 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 137.
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 cachedump.rb
has 332 lines of code (exceeds 250 allowed). Consider refactoring. Open
require 'English'
class MetasploitModule < Msf::Post
include Msf::Post::Windows::Priv
include Msf::Post::Windows::Registry
Method run
has 99 lines of code (exceeds 25 allowed). Consider refactoring. Open
def run
cracker = new_password_cracker(action.name)
lookups = []
Method make_kex_init
has 99 lines of code (exceeds 25 allowed). Consider refactoring. Open
def make_kex_init
[0x00, 0x00, 0x03, 0x14, 0x08, 0x14, 0xff, 0x9f,
0xde, 0x5d, 0x5f, 0xb3, 0x07, 0x8f, 0x49, 0xa7,
0x79, 0x6a, 0x03, 0x3d, 0xaf, 0x55, 0x00, 0x00,
0x00, 0x7e, 0x64, 0x69, 0x66, 0x66, 0x69, 0x65,
Method get_phpshell
has 99 lines of code (exceeds 25 allowed). Consider refactoring. Open
def get_phpshell
s = "#{@webroot}/#{@backdoor}"
p = "<?php #{payload.encoded} ?>"
# uses the Magento_Framework_Simplexml_Config_Cache_File class
serialize = 'O:13:\"Credis_Client\":22:{'
Method exploit
has 99 lines of code (exceeds 25 allowed). Consider refactoring. Open
def exploit
downfile = datastore['DOWNFILE'] || rand_text_alpha(8+rand(8))
@uri = '/tools_vct.htm'
user = datastore['USERNAME']
pass = datastore['PASSWORD']
Method initialize
has 99 lines of code (exceeds 25 allowed). Consider refactoring. Open
def initialize(info = {})
super(
update_info(
info,
'Name' => 'SaltStack Salt API Unauthenticated RCE through wheel_async client',
Method decrypt_vbr_db
has 99 lines of code (exceeds 25 allowed). Consider refactoring. Open
def decrypt_vbr_db(csv_dataset)
current_row = 0
decrypted_rows = 0
plaintext_rows = 0
blank_rows = 0
Method digest_auth
has 99 lines of code (exceeds 25 allowed). Consider refactoring. Open
def digest_auth(opts={})
cnonce = make_cnonce
nonce_count = 0
to = opts['timeout'] || 20
Method cmd_download
has 99 lines of code (exceeds 25 allowed). Consider refactoring. Open
def cmd_download(*args)
if (args.empty? or args.include? "-h")
cmd_download_help
return true
end
Method report_note
has 99 lines of code (exceeds 25 allowed). Consider refactoring. Open
def report_note(opts)
return if not active
::ApplicationRecord.connection_pool.with_connection {
wspace = Msf::Util::DBManager.process_opts_workspace(opts, framework)
opts = opts.clone()
File darkcomet_filedownloader.rb
has 331 lines of code (exceeds 250 allowed). Consider refactoring. Open
class MetasploitModule < Msf::Auxiliary
include Msf::Exploit::Remote::Tcp
include Msf::Auxiliary::Report
def initialize(info = {})
File splunk_xslt_authenticated_rce.rb
has 331 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 webkit_trident.rb
has 331 lines of code (exceeds 250 allowed). Consider refactoring. Open
class MetasploitModule < Msf::Exploit::Remote
Rank = ManualRanking
include Msf::Exploit::Remote::HttpServer::HTML
File exchange_chainedserializationbinder_rce.rb
has 331 lines of code (exceeds 250 allowed). Consider refactoring. Open
require 'nokogiri'
class MetasploitModule < Msf::Exploit::Remote
Rank = ExcellentRanking
File virustotal.rb
has 331 lines of code (exceeds 250 allowed). Consider refactoring. Open
begin
msfbase = __FILE__
while File.symlink?(msfbase)
msfbase = File.expand_path(File.readlink(msfbase), File.dirname(msfbase))
end
File file_system.rb
has 331 lines of code (exceeds 250 allowed). Consider refactoring. Open
module Msf
class Post
module Windows
module FileSystem
include Msf::Exploit::Windows_Constants