Showing 22,004 of 22,004 total issues
Method crawler_process_page
has 109 lines of code (exceeds 25 allowed). Consider refactoring. Open
def crawler_process_page(t, page, cnt)
return if page.nil? # Skip over pages that don't contain any info aka page is nil. We can't process these types of pages since there is no data to process.
msg = "[#{"%.5d" % cnt}/#{"%.5d" % max_page_count}] #{page ? page.code || "ERR" : "ERR"} - #{t[:vhost]} - #{page.url}"
if page.error
print_error("Error accessing page #{page.error.to_s}")
Method stage2_html
has 109 lines of code (exceeds 25 allowed). Consider refactoring. Open
def stage2_html(req_uri)
template = <<-EOF
<html>
<head>
Method make_js
has 109 lines of code (exceeds 25 allowed). Consider refactoring. Open
def make_js(encoded_payload)
# The following executes a ret2lib using icucnv36.dll
# The effect is to bypass DEP and execute the shellcode in an indirect way
stack_data = [
Method make_js
has 109 lines of code (exceeds 25 allowed). Consider refactoring. Open
def make_js(encoded_payload)
# The following executes a ret2lib using icucnv36.dll
# The effect is to bypass DEP and execute the shellcode in an indirect way
stack_data = [
Method system_v
has 109 lines of code (exceeds 25 allowed). Consider refactoring. Open
def system_v(backdoor_path, backdoor_file, runlevel, has_updatercd)
if has_updatercd
print_status('Utilizing update-rc.d')
else
print_status('Utilizing chkconfig')
Method parse_decrypted_cache
has 109 lines of code (exceeds 25 allowed). Consider refactoring. Open
def parse_decrypted_cache(dec_data, s)
i = 0
hash = dec_data[i, 0x10]
i += 72
Method session_setup_with_ntlmssp
has 109 lines of code (exceeds 25 allowed). Consider refactoring. Open
def session_setup_with_ntlmssp(user = '', pass = '', domain = '', name = nil, do_recv = true)
ntlm_options = {
:signing => self.require_signing,
:usentlm2_session => self.usentlm2_session,
File cisco_playerpt_setsource_surl.rb
has 348 lines of code (exceeds 250 allowed). Consider refactoring. Open
class MetasploitModule < Msf::Exploit::Remote
Rank = NormalRanking
include Msf::Exploit::Remote::HttpServer::HTML
include Msf::Exploit::Remote::Seh
File polkit_dbus_auth_bypass.rb
has 348 lines of code (exceeds 250 allowed). Consider refactoring. Open
require 'unix_crypt'
class MetasploitModule < Msf::Exploit::Local
Rank = ExcellentRanking
Similar blocks of code found in 2 locations. Consider refactoring. Open
def initialize(info = {})
super(merge_info(info,
'Name' => 'Linux Command Shell, Bind TCP Inline',
'Description' => 'Listen for a connection and spawn a command shell',
'Author' => 'Ramon de C Valle',
- 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 148.
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 initialize(info = {})
super(merge_info(info,
'Name' => 'Linux Command Shell, Bind TCP Inline',
'Description' => 'Listen for a connection and spawn a command shell',
'Author' => 'Ramon de C Valle',
- 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 148.
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
Class Kiwi
has 34 methods (exceeds 20 allowed). Consider refactoring. Open
class Console::CommandDispatcher::Kiwi
Klass = Console::CommandDispatcher::Kiwi
include Console::CommandDispatcher
Class DataStoreWithFallbacks
has 34 methods (exceeds 20 allowed). Consider refactoring. Open
class DataStoreWithFallbacks
# The global framework datastore doesn't currently import options
# For now, store an ad-hoc list of keys that the shell handles
#
File docker_runc_escape.rb
has 347 lines of code (exceeds 250 allowed). Consider refactoring. Open
class MetasploitModule < Msf::Exploit::Local
Rank = ManualRanking
include Msf::Post::Linux::Priv
File tplink_archer_a7_c7_lan_rce.rb
has 347 lines of code (exceeds 250 allowed). Consider refactoring. Open
require 'openssl'
class MetasploitModule < Msf::Exploit::Remote
Rank = ExcellentRanking
Method run_host
has 108 lines of code (exceeds 25 allowed). Consider refactoring. Open
def run_host(ip)
conn = false
usecode = datastore['ForceCode']
tpath = normalize_uri(datastore['PATH'])
Method exploit
has 108 lines of code (exceeds 25 allowed). Consider refactoring. Open
def exploit
unless datastore['AutoCheck']
cookie_jar.clear
res = authenticate
fail_with(Failure::NoAccess, 'Authentication failed') if res&.body =~ %r{<title>ZM - Login</title>}
Method initialize
has 108 lines of code (exceeds 25 allowed). Consider refactoring. Open
def initialize(info = {})
super(
update_info(
info,
'Name' => 'Gibbon School Platform Authenticated PHP Deserialization Vulnerability',
Method initialize
has 108 lines of code (exceeds 25 allowed). Consider refactoring. Open
def initialize(info = {})
super(
update_info(
info,
'Name' => 'D-Link Unauthenticated Remote Command Execution using UPnP via a special crafted M-SEARCH packet.',
Method report_vuln
has 108 lines of code (exceeds 25 allowed). Consider refactoring. Open
def report_vuln(opts)
return if not active
raise ArgumentError.new("Missing required option :host") if opts[:host].nil?
raise ArgumentError.new("Deprecated data column for vuln, use .info instead") if opts[:data]
name = opts[:name] || return