Changed time span to +-1 day

This commit is contained in:
wiire-a 2017-10-08 18:23:28 +02:00
parent 6c145761c3
commit cbcbbd143b
2 changed files with 4 additions and 4 deletions

View File

@ -342,7 +342,7 @@ usage_err:
if (is_mode_selected(RTL819x)) { /* Ignore --start and --end otherwise */ if (is_mode_selected(RTL819x)) { /* Ignore --start and --end otherwise */
wps->start = t_start.tv_sec; wps->start = t_start.tv_sec + SEC_PER_DAY; /* Extra 1 day */
wps->end = t_start.tv_sec - MODE3_DAYS * SEC_PER_DAY; wps->end = t_start.tv_sec - MODE3_DAYS * SEC_PER_DAY;
/* Attributes --start and --end can be switched start > end or end > start */ /* Attributes --start and --end can be switched start > end or end > start */
@ -379,7 +379,7 @@ usage_err:
} }
} else { } else {
if (wps->bruteforce) { if (wps->bruteforce) {
wps->start += SEC_PER_DAY >> 1; /* Extra 12 hour span */ wps->start += SEC_PER_DAY; /* Extra 1 day */
wps->end = 0; wps->end = 0;
} }
} }
@ -432,7 +432,7 @@ usage_err:
goto memory_err; goto memory_err;
memcpy(wps->authkey, buffer, WPS_AUTHKEY_LEN); memcpy(wps->authkey, buffer, WPS_AUTHKEY_LEN);
if (wps->verbosity > 2) { if (wps->verbosity > 2) {
wps->wrapkey = malloc(WPS_KEYWRAPKEY_LEN); wps->wrapkey = malloc(WPS_KEYWRAPKEY_LEN);
if (!wps->wrapkey) if (!wps->wrapkey)

View File

@ -31,7 +31,7 @@
/* Modes constants */ /* Modes constants */
#define MODE_LEN 5 #define MODE_LEN 5
#define MODE3_DAYS 3 #define MODE3_DAYS 1
#define MODE3_TRIES 3 #define MODE3_TRIES 3
#define SEC_PER_DAY 86400 #define SEC_PER_DAY 86400