btcrecover icon indicating copy to clipboard operation
btcrecover copied to clipboard

More gracefully skip passwords that are too long to be checked via OpenCL

Open isieditors opened this issue 3 years ago • 3 comments

whenever i use leaked password lists like rockyou or top2billion, etc on coinomi wallet i receive the following error.

Interrupted after finishing password # 247187000 multiprocessing.pool.RemoteTraceback: """ Traceback (most recent call last): File "C:\Users\mycomputer\AppData\Local\Programs\Python\Python39\lib\multiprocessing\pool.py", line 125, in worker result = (True, func(*args, **kwds)) File "C:\btcrecover\btcrecover\btcrpass.py", line 7295, in return_verified_password_or_false return loaded_wallet.return_verified_password_or_false(passwords) File "C:\btcrecover\btcrecover\btcrpass.py", line 2114, in return_verified_password_or_false return self._return_verified_password_or_false_opencl(passwords) if (not isinstance(self.opencl_algo,int))
File "C:\btcrecover\btcrecover\btcrpass.py", line 2173, in _return_verified_password_or_false_opencl clResult = self.opencl_algo.cl_pbkdf2(self.opencl_context_pbkdf2_sha1, passwords, salt_and_iv, iter_count, 32) File "C:\btcrecover\lib\opencl_brute\opencl.py", line 705, in cl_pbkdf2 result = concat(self.opencl_ctx.run(bufStructs, func, iter(passwordlist), salt)) File "C:\btcrecover\lib\opencl_brute\opencl.py", line 524, in concat return [obj for lval in ll for obj in lval] File "C:\btcrecover\lib\opencl_brute\opencl.py", line 524, in return [obj for lval in ll for obj in lval] File "C:\btcrecover\lib\opencl_brute\opencl.py", line 225, in run assert paddedLenFunc(pwLen, hashBlockSize_bits // 8) <= inBufSize_bytes,
AssertionError: password #552, '\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' (length 200) exceeds the input buffer (length 128) when padded """

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "C:\btcrecover\btcrecover.py", line 39, in (password_found, not_found_msg) = btcrpass.main() File "C:\btcrecover\btcrecover\btcrpass.py", line 7861, in main for password_found, passwords_tried_last in password_found_iterator: File "C:\Users\mycomputer\AppData\Local\Programs\Python\Python39\lib\multiprocessing\pool.py", line 870, in next raise value AssertionError: password #552, '\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' (length 200) exceeds the input buffer (length 128) when padded

isieditors avatar Nov 06 '21 14:11 isieditors

This is a limitation that basically exists within the OpenCL implementation, but it would be nicer if it just CPU-checked those passwords instead in an automatic way.

3rdIteration avatar Nov 06 '21 16:11 3rdIteration

thanks for response. cant we edit file to increase that (length128 )? to something like 250 ??

isieditors avatar Nov 07 '21 21:11 isieditors

While this is true, it would be better to have it gracefully handle if the password is above the length of what can be handled via OpenCL. (Whatever this length happens to be)

3rdIteration avatar Nov 08 '21 01:11 3rdIteration