lib/AppleDecrypter.rb
def add_passwords_from_file(password_file)
    if password_file
      @passwords = Array.new()

      # Read in each line and add them to our list
      File.readlines(password_file).each do |password|
        #@logger.debug("Apple Decrypter: Adding password number #{passwords.length} to our list")
        @passwords.push(password.chomp)
      end

      puts "Added #{@passwords.length} passwords to the AppleDecrypter from #{password_file}"
    end
  end
##
# This function takes a FilePath +file+ and reads passwords from it 
# one per line to build the overall +@passwords+ Array.
This function takes a FilePath +file+ and reads passwords from it
one per line to build the overall +@passwords+ Array.
This function takes a FilePath + file + and reads passwords from it one per line to build the overall + @passwords + Array .
def add_passwords_from_file(password_file)
    if password_file
      @passwords = Array.new()
      File.readlines(password_file).each do |password|
        @passwords.push(password.chomp)
      end
      puts "Added #{@passwords.length} passwords to the AppleDecrypter from #{password_file}"
    end
  end
def add_passwords_from_file ( password_file ) if password_file @passwords = Array . new ( ) File . readlines ( password_file ) . each do | password | @passwords . push ( password . chomp ) end puts "Added #{@passwords.length} passwords to the AppleDecrypter from #{password_file}" end end
This function takes a FilePath +file+ and reads passwords from it
one per line to build the overall +@passwords+ Array.
This function takes a FilePath + file + and reads passwords from it one per line to build the overall + @passwords + Array .
# Read in each line and add them to our list #@logger.debug("Apple Decrypter: Adding password number #{passwords.length} to our list")
password_file