Showing 7,361 of 22,177 total issues
Method initialize
has 54 lines of code (exceeds 25 allowed). Consider refactoring. Open
def initialize(info = {})
super(
update_info(
info,
'Name' => 'Kerberos Ticket Management',
Method main
has 54 lines of code (exceeds 25 allowed). Consider refactoring. Open
def main
filter = 'All'
filters = ['all','exploit','payload','post','nop','encoder','auxiliary']
type = 'CVE'
db_path = nil
Method get_parsed_options
has 54 lines of code (exceeds 25 allowed). Consider refactoring. Open
def get_parsed_options
options = {}
parser = OptionParser.new do |opt|
opt.separator ''
Method cmd_ls
has 54 lines of code (exceeds 25 allowed). Consider refactoring. Open
def cmd_ls(*args)
# Set defaults
path = client.fs.dir.getwd
search_term = nil
sort = 'Name'
Method initialize
has 54 lines of code (exceeds 25 allowed). Consider refactoring. Open
def initialize(client)
super(client, 'stdapi')
# Alias the following things on the client object so that they
# can be directly referenced
Method cmd_features
has 54 lines of code (exceeds 25 allowed). Consider refactoring. Open
def cmd_features(*args)
args << 'print' if args.empty?
action, *rest = args
case action
Method execute_script
has 54 lines of code (exceeds 25 allowed). Consider refactoring. Open
def execute_script(script_name, *args)
post_module = legacy_script_to_post_module(script_name)
if post_module
print_warning("Meterpreter scripts are deprecated. Try #{post_module}.")
Method process_dr_search
has 54 lines of code (exceeds 25 allowed). Consider refactoring. Open
def process_dr_search(res, res_code, repo_name, fields=nil, mode='standard')
if res_code == 1 || res.nil? || !(res.instance_of?(Hash) && res.keys.include?('response') && res['response'].instance_of?(Hash))
vprint_error("Received unexpected reply when trying to dump table #{repo_name}: #{res}")
return nil
end
Method generate_sled
has 54 lines of code (exceeds 25 allowed). Consider refactoring. Open
def generate_sled
min = reqs['MinNops'] || 0
space = reqs['Space']
pad_nops = reqs['PadNops']
Method brocade_config_eater
has 54 lines of code (exceeds 25 allowed). Consider refactoring. Open
def brocade_config_eater(thost, tport, config)
# this is for brocade type devices.
# It is similar to cisco
# Docs: enable password-display -> http://wwwaem.brocade.com/content/html/en/command-reference-guide/fastiron-08040-commandref/GUID-169889CD-1A74-4A23-AC78-38796692374F.html
Method build_on_behalf_of
has 54 lines of code (exceeds 25 allowed). Consider refactoring. Open
def build_on_behalf_of(csr:, on_behalf_of:, cert:, key:, algorithm: 'SHA256')
# algorithm needs to be one that OpenSSL supports, but we also need the OID constants defined
digest = OpenSSL::Digest.new(algorithm)
unless [ digest.name, "RSAWith#{digest.name}" ].all? { |s| Rex::Proto::Kerberos::Model::OID.constants.include?(s.to_sym) }
raise ArgumentError, "Can not map digest algorithm #{digest.name} to the necessary OIDs."
Method parse
has 54 lines of code (exceeds 25 allowed). Consider refactoring. Open
def parse(value, datastore)
Enumerator.new do |results|
# extract the individual elements from the rhost string, ensuring that
# whitespace, strings, escape characters, etc are handled correctly.
values = Rex::Parser::Arguments.from_s(value)
Method handle_x86_bsd_opts
has 54 lines of code (exceeds 25 allowed). Consider refactoring. Open
def handle_x86_bsd_opts(pre, app)
if (datastore['PrependSetresuid'])
# setresuid(0, 0, 0)
pre << "\x31\xc0" + # xorl %eax,%eax #
"\x50" + # pushl %eax #
Method initialize
has 54 lines of code (exceeds 25 allowed). Consider refactoring. Open
def initialize(info = {})
ret = super(info)
register_advanced_options(
[
Method attempt_login
has 54 lines of code (exceeds 25 allowed). Consider refactoring. Open
def attempt_login(credential)
result_options = {
credential: credential,
host: host,
port: port,
Method attempt_login
has 54 lines of code (exceeds 25 allowed). Consider refactoring. Open
def attempt_login(credential)
self.ssh_socket = nil
opt_hash = ssh_client_defaults.merge({
:port => port,
:verbose => verbosity
Identical blocks of code found in 2 locations. Consider refactoring. Open
if (target == targets[0])
lzh << generate_seh_record(target.ret)
lzh << make_nops(8)
lzh << payload.encoded
- 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 82.
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
Identical blocks of code found in 2 locations. Consider refactoring. Open
if (target == targets[0])
lzh << generate_seh_record(target.ret)
lzh << make_nops(8)
lzh << payload.encoded
- 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 82.
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(update_info(info,
'Name' => 'Apple TV Video Remote Control',
'Description' => %q(
This module plays a video on an AppleTV device. Note that
- 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 82.
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 exploit
if is_system?
fail_with(Failure::None, 'Session is already elevated')
end
- 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 82.
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