mirror of
https://github.com/wiire-a/pixiewps.git
synced 2025-07-27 15:54:29 +02:00
fix endless loop when seed wraps around from 0 to 0xffffffff
the issue could be experienced when the full brute-force space till the unix epoch was searched. test with: --start 02/1970 --end 01/1970
This commit is contained in:
parent
80f7774e98
commit
1e69706bb9
@ -106,9 +106,14 @@ static void* crack_thread(void *arg) {
|
|||||||
DEBUG_PRINT("Seed found");
|
DEBUG_PRINT("Seed found");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(seed == 0) break;
|
||||||
|
|
||||||
seed--;
|
seed--;
|
||||||
|
|
||||||
if(seed < j->start - SECS_PER_JOB_BLOCK) {
|
if(seed < j->start - SECS_PER_JOB_BLOCK) {
|
||||||
j->start -= SECS_PER_JOB_BLOCK * job_control.jobs;
|
long long tmp = j->start - SECS_PER_JOB_BLOCK * job_control.jobs;
|
||||||
|
if(tmp < 0) break;
|
||||||
|
j->start = tmp;
|
||||||
seed = j->start;
|
seed = j->start;
|
||||||
if (seed < limit) break;
|
if (seed < limit) break;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user