Fix syntax

This commit is contained in:
Jon P 2017-07-28 10:16:59 +02:00
parent 2e87a3d3f8
commit 85f48b96bb
No known key found for this signature in database
GPG Key ID: 1A36F9E97F8C38A4
2 changed files with 4 additions and 4 deletions

View File

@ -32,7 +32,7 @@ class MetasploitModule < Msf::Post
# Array#select! is only in 1.9
paths = paths.select { |d| directory?(d) }
if paths.nil? or paths.empty?
if paths.nil? || paths.empty?
print_error("No users found with a .docker directory")
return
end
@ -47,7 +47,7 @@ class MetasploitModule < Msf::Post
file = "config.json"
target = "#{path}/#{file}"
if file?(target)
if file? target
print_status("Downloading #{target} -> #{file}")
extract(target)
end

View File

@ -29,7 +29,7 @@ class MetasploitModule < Msf::Post
# Array#select! is only in 1.9
paths = paths.select { |d| directory?(d) }
if paths.nil? or paths.empty?
if paths.nil? || paths.empty?
print_error("No users found with a .gnupg directory")
return
end
@ -49,7 +49,7 @@ class MetasploitModule < Msf::Post
if directory?(target)
next
end
print_status("Downloading #{path}#{sep}#{file} -> #{file}")
print_status("Downloading #{target} -> #{file}")
data = read_file(target)
file = file.split(sep).last
type = file.gsub(/\.gpg.*/, "").gsub(/gpg\./, "")