Showing 22,177 of 22,177 total issues
File task_scheduler.rb
has 354 lines of code (exceeds 250 allowed). Consider refactoring. Open
module Msf
class Post
module Windows
#
# Post module mixin for dealing with Windows Task Scheduler
Method run
has 112 lines of code (exceeds 25 allowed). Consider refactoring. Open
def run
found = false
roots.each do |root|
break if found
Method exploit
has 112 lines of code (exceeds 25 allowed). Consider refactoring. Open
def exploit
version = get_version
# 1: get the cookies, the login_url and the password_form and username form names (they varies between versions)
res = send_request_cgi({
Method on_request_uri
has 112 lines of code (exceeds 25 allowed). Consider refactoring. Open
def on_request_uri(cli, request)
return if ((p = regenerate_payload(cli)) == nil)
print_status("Sending exploit HTML")
Method initialize
has 112 lines of code (exceeds 25 allowed). Consider refactoring. Open
def initialize(info = {})
super(
update_info(
info,
'Name' => 'MS08-068 Microsoft Windows SMB Relay Code Execution',
Method exploit
has 112 lines of code (exceeds 25 allowed). Consider refactoring. Open
def exploit
if check != CheckCode::Appears
fail_with(Failure::NotVulnerable, 'Target not vulnerable! punt!')
end
Method token_generation_endpoints
has 112 lines of code (exceeds 25 allowed). Consider refactoring. Open
def token_generation_endpoints
%w[
/access/file-path-manager/indexing
/cm/autodeploy/cluster-software-images/indexing
/cm/autodeploy/qkview/indexing
File session_notifier.rb
has 353 lines of code (exceeds 250 allowed). Consider refactoring. Open
require 'net/https'
require 'net/http'
require 'uri'
module Msf
class Plugin::SessionNotifier < Msf::Plugin
File chaos_rat_xss_to_rce.rb
has 353 lines of code (exceeds 250 allowed). Consider refactoring. Open
class MetasploitModule < Msf::Exploit::Remote
Rank = ExcellentRanking
prepend Msf::Exploit::Remote::AutoCheck
include Msf::Exploit::Remote::HttpClient
Similar blocks of code found in 3 locations. Consider refactoring. Open
def initialize(info = {})
super(update_info(info,
'Name' => 'Borland InterBase isc_create_database() Buffer Overflow',
'Description' => %q{
This module exploits a stack buffer overflow in Borland InterBase
- 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 151.
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 3 locations. Consider refactoring. Open
def initialize(info = {})
super(update_info(info,
'Name' => 'Borland InterBase isc_attach_database() Buffer Overflow',
'Description' => %q{
This module exploits a stack buffer overflow in Borland InterBase
- 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 151.
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 3 locations. Consider refactoring. Open
def initialize(info = {})
super(update_info(info,
'Name' => 'Borland InterBase SVC_attach() Buffer Overflow',
'Description' => %q{
This module exploits a stack buffer overflow in Borland InterBase
- 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 151.
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 getcountermeasure.rb
has 352 lines of code (exceeds 250 allowed). Consider refactoring. Open
session = client
@@exec_opts = Rex::Parser::Arguments.new(
"-h" => [ false, "Help menu." ],
"-k" => [ false, "Kill any AV, HIPS and Third Party Firewall process found." ],
"-d" => [ false, "Disable built in Firewall" ]
File empire_skywalker.rb
has 352 lines of code (exceeds 250 allowed). Consider refactoring. Open
class MetasploitModule < Msf::Exploit::Remote
Rank = ExcellentRanking
include Msf::Exploit::Remote::HttpClient
include Msf::Exploit::FileDropper
File cisco.rb
has 352 lines of code (exceeds 250 allowed). Consider refactoring. Open
module Msf
###
#
# This module provides methods for working with Cisco equipment
#
Method initialize
has 111 lines of code (exceeds 25 allowed). Consider refactoring. Open
def initialize(info = {})
super(merge_info(info,
'Name' => 'Windows x86 Pingback, Bind TCP Inline',
'Description' => 'Open a socket and report UUID when a connection is received (Windows x86)',
'Author' => [ 'bwatters-r7' ],
Method initialize
has 111 lines of code (exceeds 25 allowed). Consider refactoring. Open
def initialize(info = {})
super(
update_info(
info,
'Name' => 'Wordpress File Manager Advanced Shortcode 2.3.2 - Unauthenticated Remote Code Execution through shortcode',
Method exploit
has 111 lines of code (exceeds 25 allowed). Consider refactoring. Open
def exploit
return unless check == Exploit::CheckCode::Appears
uri = target_uri.path
vprint_status("#{peer} - Grabbing CSRF token...")
Method exploit
has 111 lines of code (exceeds 25 allowed). Consider refactoring. Open
def exploit
init = send_request_cgi({
'uri' => normalize_uri(target_uri.path, 'index.php')
})
Method win32_rwx_exec_thread
has 111 lines of code (exceeds 25 allowed). Consider refactoring. Open
def self.win32_rwx_exec_thread(code, block_offset, which_offset='start')
stub_block = Rex::Payloads::Shuffle.from_graphml_file(
File.join(Msf::Config.install_root, 'data', 'shellcode', 'block_api.x86.graphml'),
arch: ARCH_X86,
name: 'api_call'