Implemented brute-force attack algorithm