From 9b0821bb20c2d9e39202fe68c825975ac663f44a Mon Sep 17 00:00:00 2001
From: philsmd <philsmd@hashcat.net>
Date: Tue, 7 Mar 2017 23:06:50 +0100
Subject: [PATCH 1/2] fixes #1162: visual indication if checkpoint quit is
 enabled

---
 docs/changes.txt |  1 +
 src/status.c     | 11 +++++++++++
 2 files changed, 12 insertions(+)

diff --git a/docs/changes.txt b/docs/changes.txt
index 530998231..b3defa74b 100644
--- a/docs/changes.txt
+++ b/docs/changes.txt
@@ -6,6 +6,7 @@
 
 - WPA cracking: Added support for WPA/WPA2 handshake AP nonce automatic error correction
 - WPA cracking: Added parameter --nonce-error-corrections to configure range of error correction
+- Added visual indicator to the status screen to indicate if the checkpoint quit feature is enabled
 
 ##
 ## Improvements
diff --git a/src/status.c b/src/status.c
index bcd01b300..303b9dd72 100644
--- a/src/status.c
+++ b/src/status.c
@@ -29,6 +29,7 @@ static const char ST_0007[] = "Quit";
 static const char ST_0008[] = "Bypass";
 static const char ST_0009[] = "Aborted (Checkpoint)";
 static const char ST_0010[] = "Aborted (Runtime)";
+static const char ST_9998[] = "Running (Checkpoint Quit requested)";
 static const char ST_9999[] = "Unknown! Bug!";
 
 static const char UNITS[7] = { ' ', 'k', 'M', 'G', 'T', 'P', 'E' };
@@ -196,6 +197,16 @@ char *status_get_status_string (const hashcat_ctx_t *hashcat_ctx)
 
   const int devices_status = status_ctx->devices_status;
 
+  // special case: running but checkpoint quit requested
+
+  if (devices_status == STATUS_RUNNING)
+  {
+    if (status_ctx->checkpoint_shutdown == true)
+    {
+      return ((char *) ST_9998);
+    }
+  }
+
   switch (devices_status)
   {
     case STATUS_INIT:               return ((char *) ST_0000);

From 269b1ee6a55fdb9b6f6b56fb7c3fb2e97b8e8fff Mon Sep 17 00:00:00 2001
From: philsmd <philsmd@hashcat.net>
Date: Wed, 8 Mar 2017 08:46:42 +0100
Subject: [PATCH 2/2] renamed ST_9998 -> ST_0011

---
 src/status.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/status.c b/src/status.c
index 303b9dd72..5b534fd90 100644
--- a/src/status.c
+++ b/src/status.c
@@ -29,7 +29,7 @@ static const char ST_0007[] = "Quit";
 static const char ST_0008[] = "Bypass";
 static const char ST_0009[] = "Aborted (Checkpoint)";
 static const char ST_0010[] = "Aborted (Runtime)";
-static const char ST_9998[] = "Running (Checkpoint Quit requested)";
+static const char ST_0011[] = "Running (Checkpoint Quit requested)";
 static const char ST_9999[] = "Unknown! Bug!";
 
 static const char UNITS[7] = { ' ', 'k', 'M', 'G', 'T', 'P', 'E' };
@@ -203,7 +203,7 @@ char *status_get_status_string (const hashcat_ctx_t *hashcat_ctx)
   {
     if (status_ctx->checkpoint_shutdown == true)
     {
-      return ((char *) ST_9998);
+      return ((char *) ST_0011);
     }
   }