You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: password_cracker.rb
    path of file: ./repos/metasploit-framework/lib/msf/core/auxiliary
    
    the code of the file until where you have to start completion: # -*- coding: binary -*-

require 'open3'
    
    def john_lm_upper_to_ntlm(pwd, hash)
      pwd = pwd.upcase
      hash = hash.upcase
      Rex::Text.permute_case(pwd).each do |str|
        if hash == Rex::Proto::NTLM::Crypt.ntlm_hash(str).unpack('H*')[0].upcase
          return str
        end
      end