Fix timing jump from [08:38:36] to [09:39:18] within 40 seconds. #2060
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Here is the log:
Apr 18 23:46:26 allen-virtual-machine aircrack-ng[4065]: [08:37:55] 4359832/98732991 keys tested (142.40 k/s) allen1
Apr 18 23:47:07 allen-virtual-machine aircrack-ng[4065]: [08:38:36] 4365840/98732991 keys tested (142.41 k/s) allen1
Apr 18 23:47:47 allen-virtual-machine aircrack-ng[4065]: [09:39:18] 4371860/98732991 keys tested (142.41 k/s) allen1
Apr 18 23:48:28 allen-virtual-machine aircrack-ng[4065]: [09:40:00] 4377876/98732991 keys tested (142.42 k/s) allen1
Apr 18 23:49:09 allen-virtual-machine aircrack-ng[4065]: [09:40:41] 4383884/98732991 keys tested (142.43 k/s) allen1
where is the error in the log?
Timing information printed by aircrack-ng is in the [::]. And, [08:38:36] is jumped to [09:39:18] in 40 seconds , with clock time from 23:47:47 to 23:47:07
what causes the error?
It is caused by lrintf() . lrintf() function doesn't set its rounding direction, resulting in 0.501 hour or so
equal to 1 hour, not 0 hour. There’s no need of lrintf(), that will make the timing code easier, and it will be ok by use of casting data type from float to int.
how to reproduce the problem and to save time?
I change the current time by using 'date -s' shell command, instead of running aircrack-ng second by second.