lib/pwn/plugins/char.rb in pwn-0.4.586 vs lib/pwn/plugins/char.rb in pwn-0.4.587
- old
+ new
@@ -366,18 +366,18 @@
f.puts char_hash[char_key][:char] unless char_hash[char_key][:char].nil? || char_hash[char_key][:char].encode('utf-8').include?('***')
end
end
end
- if File.read(this_file).length.zero?
+ if File.read(this_file).empty?
File.unlink(this_file)
else
print '.'
end
rescue StandardError => e
puts "FILE GENERATION ATTEMPT OF: #{this_file} RESULTED THE FOLLOWING ERROR:"
puts "#{e.class}: #{e.message}\n#{e.backtrace}\n\n\n"
- File.unlink(this_file) if File.read(this_file).length.zero?
+ File.unlink(this_file) if File.read(this_file).empty?
next
end
print "\n"
rescue StandardError => e
raise e