Showing 7,361 of 22,177 total issues
Avoid deeply nested control flow statements. Open
elsif attribute_name == :cacertificate || attribute_name == :usercertificate
normalized_attribute = entry[attribute_name].map do |raw_key_data|
_certificate_file, read_data = read_der_certificate_file(raw_key_data)
read_data
Avoid deeply nested control flow statements. Open
if bin_guid.length == 16 # Length of binary data in bytes since this is what .length uses. In bits its 128 bits.
begin
decoded_guid = Rex::Proto::MsDtyp::MsDtypGuid.read(bin_guid)
decoded_guid_string = decoded_guid.get
rescue IOError => e
Avoid deeply nested control flow statements. Open
if error_string.present?
print_warning(error_string)
end
Avoid deeply nested control flow statements. Open
bad_reqs << k unless v.call(profile[k])
Avoid deeply nested control flow statements. Open
bad_reqs << k if profile[k] != v
Avoid deeply nested control flow statements. Open
if error_code.nil?
logger.print_warning("identity: #{session.metadata[:identity]} - Relay against target #{display_target(relayed_connection.target)} failed with unexpected error: #{resp.smb2_header.nt_status.value}")
else
logger.print_warning("identity: #{session.metadata[:identity]} - Relay against target #{display_target(relayed_connection.target)} failed with unexpected error: #{error_code.name}: #{error_code.description}")
end
Avoid deeply nested control flow statements. Open
return MajorRelease::Server2016Plus if windows_server?
Avoid deeply nested control flow statements. Open
return MajorRelease::Server2008R2 if windows_server?
Avoid deeply nested control flow statements. Open
elsif _minor == 2
return MajorRelease::Server2012 if windows_server?
return MajorRelease::Win8
elsif _minor == 3
Avoid deeply nested control flow statements. Open
if (datastore['PrependSetuid'])
# setuid(0)
pre << "\x00\x00\x20\xe0" # eor r0, r0, r0 #
pre << "\x17\x70\xa0\xe3" # mov r7, #23 #
pre << "\x00\x00\x00\xef" # svc #
Avoid deeply nested control flow statements. Open
if (datastore['PrependSetresuid'])
# setresuid(ruid=0, euid=0, suid=0)
pre << "\x00\x00\x20\xe0" # eor r0, r0, r0 #
pre << "\x01\x10\x21\xe0" # eor r1, r1, r1 #
pre << "\x02\x20\x22\xe0" # eor r2, r2, r2 #
Avoid deeply nested control flow statements. Open
if counter.zero? # Get starting packet
if pkt["DATA"][0] == "10"
data += pkt["DATA"][start_offset, 8 - start_offset]
left2combine -= 1
counter += 1
Avoid deeply nested control flow statements. Open
if version && platform && board
info = "#{platform.strip} #{board.strip} #{version.strip}"
end
Avoid deeply nested control flow statements. Open
s[:lmhash] = "00" * 24 if s[:lmhash] == '' or s[:lmhash] =~ /^(00)*$/m
Avoid deeply nested control flow statements. Open
elsif info =~ /sh: id: not found/
info = ssh_socket.exec!("vmware -v\n").to_s
else
info << ssh_socket.exec!("help\n?\n\n\n").to_s
Avoid deeply nested control flow statements. Open
if smb_status == 0 # success
ntlm_ver = detect_ntlm_ver(s[:lmhash],s[:ntlmhash])
logmessage =
Avoid deeply nested control flow statements. Open
s[:lmhash] = "00" * 24 if s[:lmhash] == s[:ntlmhash]
Similar blocks of code found in 6 locations. Consider refactoring. Open
for root, dirs, files in os.walk('./src/stage/'):
for name in files:
build(name[:-4])
- 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 35.
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 6 locations. Consider refactoring. Open
for root, dirs, files in os.walk('./src/egghunter/'):
for name in files:
build(name[:-4])
- 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 35.
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 6 locations. Consider refactoring. Open
for root, dirs, files in os.walk('./src/kernel/'):
for name in files:
build(name[:-4])
- 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 35.
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