From 2f47e0424bfda89a11fd387da0a5898bcadde1c1 Mon Sep 17 00:00:00 2001 From: Aram Date: Tue, 3 May 2016 08:29:55 +0200 Subject: [PATCH] Organised output --- libnfc_crypto1_crack.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libnfc_crypto1_crack.c b/libnfc_crypto1_crack.c index 4f19f49..761ccd0 100644 --- a/libnfc_crypto1_crack.c +++ b/libnfc_crypto1_crack.c @@ -288,7 +288,9 @@ POSSIBILITY OF SUCH DAMAGES. #include #include #include +#ifndef __WIN32 #include +#endif #include #include @@ -523,12 +525,10 @@ void notify_status_offline(int sig){ } void notify_status_online(int sig){ - if(!space){ + if(!total_states){ printf(VT100_cleareol "Collected %zu nonces... ", nonces_collected); } else { printf(VT100_cleareol "Collected %zu nonces... leftover complexity %zu (~2^%0.2f)", nonces_collected, total_states, log(total_states) / log(2)); - } - if(total_states){ char c; if(scanf("%c", &c) == 1 || total_states < CUTOFF){ printf(" - initializing brute-force phase...\n");