Showing 18 of 21,757 total issues
Consider simplifying this complex logical expression. Open
Open
if hash.nil? || hash.empty? ||
(hash.start_with?(/{crypt}/i) && hash.length < 10) ||
hash.start_with?('*****') ||
hash.start_with?(/yyyyyy/i) ||
hash == '*' ||
Consider simplifying this complex logical expression. Open
Open
if (
(module_full_name_ref && ref_match.match(/#{module_full_name_ref}/)) ||
(edb_ref && ref_match.match(/EXPLOIT\-DB:#{edb_ref}$/)) ||
(osvdb_ref && ref_match.match(/OSVDB:#{osvdb_ref}$/)) ||
(bid_ref && ref_match.match(/BID:#{bid_ref}$/)) ||
Consider simplifying this complex logical expression. Open
Open
if (check[j] == '0') || (check[j] == '1') || (check[j] == '2') || (check[j] == '3') || (check[j] == '4') || (check[j] == '5') || (check[j] == '6') || (check[j] == '7') || (check[j] == '8') || (check[j] == '9') || (check[j] == ',')
if (check[j] == ',') && (check[j + 1] == ',')
print_error('DATA_REGISTERS cannot contain two consecutive commas')
return
end
Consider simplifying this complex logical expression. Open
Open
if version < Rex::Version.new('7.0') ||
(version >= Rex::Version.new('7.0') && version < Rex::Version.new('7.0.121307')) ||
(version >= Rex::Version.new('7.1') && version < Rex::Version.new('7.1.150')) ||
(version >= Rex::Version.new('7.2') && version < Rex::Version.new('7.2.103')) ||
(version >= Rex::Version.new('8.0') && version < Rex::Version.new('8.0.320')) ||
Consider simplifying this complex logical expression. Open
Open
if !((@user && !@user.empty?) && (@host && !@host.empty?) && (@port && !@port.empty? && (@port.to_i > 0)) && (@pass && !@pass.empty?))
print_status('You need to connect to a server first.')
ncusage
return
end
Consider simplifying this complex logical expression. Open
Open
if ((@user && !@user.empty?) && (@host && !@host.empty?) && (@port && !@port.empty? && (@port.to_i > 0)) && (@pass && !@pass.empty?))
config = Hash.new
config = { group.to_s => { 'username' => @user, 'password' => @pass, 'server' => @host, 'port' => @port } }
File.open(nessus_yaml.to_s, 'w+') do |f|
f.puts YAML.dump(config)
Consider simplifying this complex logical expression. Open
Open
if !((@user && !@user.empty?) && (@host && !@host.empty?) && (@port && !@port.empty? && (@port.to_i > 0)) && (@pass && !@pass.empty?))
ncusage
return
end
Consider simplifying this complex logical expression. Open
Open
if !((@user && !@user.empty?) && (@host && !@host.empty?) && (@port && !@port.empty? && (@port.to_i > 0)) && (@pass && !@pass.empty?))
nexpose_usage
return
end
Consider simplifying this complex logical expression. Open
Open
if ((@user && !@user.empty?) && (@host && !@host.empty?) && (@port && !@port.empty? && (@port.to_i > 0)) && (@pass && !@pass.empty?))
config = { group.to_s => { 'username' => @user, 'password' => @pass, 'server' => @host, 'port' => @port, 'trust_cert' => @trust_cert } }
::File.open(Nexpose_yaml.to_s, 'wb') { |f| f.puts YAML.dump(config) }
print_good("#{Nexpose_yaml} created.")
else
Consider simplifying this complex logical expression. Open
Open
if (str.empty? or str =~ /Null/ or str =~ /^noSuch/)
output_data["System date"] = '-'
else
# RFC 2579 - Textual Conventions for SMIv2
Consider simplifying this complex logical expression. Open
Open
if (version[0] <= 9 && version[0] > 4 && version[2] < 9031 && version[3] == 'sd') ||
(version[0] <= 6 && version[2] < 99999 && version[3] == 'ae') ||
(version[3] == 'sc' && version[2] < 99999)
return Exploit::CheckCode::Appears
end
Consider simplifying this complex logical expression. Open
Open
if (error[0] == error[1]) and (error[0].empty? or (error[0].unpack('C')[0] & 7) == 0) and # fd_nextsize
(error[2] == error[3]) and (error[2].empty? or (error[2].unpack('C')[0] & 7) == 0) and # fd
(error[4] =~ /\A503 send[^e].?\z/mn) and ((error[4].unpack('C*')[8] & 15) == PREV_INUSE) and # size
(error[5] == "177") # the last \x7F of our BAD1 command, encoded as \\177 by string_printing()
leaked_arch = ARCH_X64
Consider simplifying this complex logical expression. Open
Open
if (a[i-1]==ooLen && a[i]==0 && a[i+1]==0 // oo[0]==null && oo[1]==null
&& a[i+2]!=0 && a[i+3]!=0 && a[i+4]!=0 // oo[2,3,4] != null
&& a[i+5]==0 && a[i+6]==0) // oo[5,6] == null
{
// read pointer from oo[4]
Consider simplifying this complex logical expression. Open
Open
if release_short >= Rex::Version.new('5.13.0') && release_long < Rex::Version.new('5.13.0-37.42') || # Ubuntu 21.10
release_short >= Rex::Version.new('5.4.0') && release_long < Rex::Version.new('5.4.0-105.119') || # Ubuntu 20.04 LTS
release_short >= Rex::Version.new('4.15.0') && release_long < Rex::Version.new('4.15.0-173.182') || # Ubuntu 18.04 LTS
release_short >= Rex::Version.new('4.4.0') && release_long < Rex::Version.new('4.4.0-222.255') # Ubuntu 16.04 ESM
return CheckCode::Vulnerable("IF host OS is Ubuntu, kernel version #{release} is vulnerable")
Consider simplifying this complex logical expression. Open
Open
if (version >= Rex::Version.new('5.0.0') && version < Rex::Version.new('5.1.0')) ||
(version >= Rex::Version.new('6.0.0') && version < Rex::Version.new('6.1.0')) ||
(version >= Rex::Version.new('6.7.0') && version < Rex::Version.new('6.8.0')) ||
(version >= Rex::Version.new('7.0.0') && version < Rex::Version.new('7.0.2'))
return CheckCode::Appears
Consider simplifying this complex logical expression. Open
Open
if file_contents.nil? || file_contents.empty?
print_warning('Configuration file content is empty')
return
else
config = Rex::Parser::Ini.from_s(file_contents)
Consider simplifying this complex logical expression. Open
Open
if !(modified || accessed || creation || emodified ||
blank_file_mace || blank_directory_mace || get_file_mace) || help
print_line("\nUsage: timestomp <file(s)> OPTIONS\n" +
@@timestomp_opts.usage)
return nil
Consider simplifying this complex logical expression. Open
Open
if s[:last] == :ntlm_type2
lmlength = ntlmpayload[12, 2].unpack("v")[0]
lmoffset = ntlmpayload[16, 2].unpack("v")[0]
ntlmlength = ntlmpayload[20, 2].unpack("v")[0]
ntlmoffset = ntlmpayload[24, 2].unpack("v")[0]