Remove workaround with multiple include folders; Instead use a naive escape function
[hashcat.git] / src / shared.c
index 7af0bd0..5f99c73 100644 (file)
@@ -5903,7 +5903,6 @@ char *strhashtype (const uint hash_mode)
     case   141: return ((char *) HT_00141); break;
     case   150: return ((char *) HT_00150); break;
     case   160: return ((char *) HT_00160); break;
-    case   190: return ((char *) HT_00190); break;
     case   200: return ((char *) HT_00200); break;
     case   300: return ((char *) HT_00300); break;
     case   400: return ((char *) HT_00400); break;
@@ -9176,7 +9175,7 @@ void stop_at_checkpoint ()
 
   if (data.restore_disable == 1)
   {
-    log_info ("WARNING: This feature is disabled when --restore-disable was specified");
+    log_info ("WARNING: This feature is disabled when --restore-disable is specified");
 
     return;
   }
@@ -9221,6 +9220,29 @@ void myquit ()
   data.devices_status = STATUS_QUIT;
 }
 
+void naive_escape (const char *cpath_real, char *cpath_escaped)
+{
+  const size_t len = MIN (strlen (cpath_real), 1024);
+
+  for (size_t in = 0, out = 0; in < len; in++, out++)
+  {
+    const u8 c = cpath_real[in];
+
+    if (c == ' ')
+    {
+      #if _WIN
+      cpath_escaped[out] = '^';
+      #else
+      cpath_escaped[out] = '\\';
+      #endif
+
+      out++;
+    }
+
+    cpath_escaped[out] = c;
+  }
+}
+
 void load_kernel (const char *kernel_file, int num_devices, size_t *kernel_lengths, const u8 **kernel_sources)
 {
   FILE *fp = fopen (kernel_file, "rb");
@@ -10505,7 +10527,7 @@ int wpa_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf)
 
   if (salt_len > 36)
   {
-    log_info ("WARNING: The length of the ESSID is too long. The hccap file may be invalid or corrupted");
+    log_info ("WARNING: The ESSID length is too long, the hccap file may be invalid or corrupted");
 
     return (PARSER_SALT_LENGTH);
   }
@@ -12005,21 +12027,6 @@ int sha1_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf)
   return (PARSER_OK);
 }
 
-int sha1linkedin_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf)
-{
-  if ((input_len < DISPLAY_LEN_MIN_100) || (input_len > DISPLAY_LEN_MAX_100)) return (PARSER_GLOBAL_LENGTH);
-
-  u32 *digest = (u32 *) hash_buf->digest;
-
-  digest[0] = hex_to_u32 ((const u8 *) &input_buf[ 0]);
-  digest[1] = hex_to_u32 ((const u8 *) &input_buf[ 8]);
-  digest[2] = hex_to_u32 ((const u8 *) &input_buf[16]);
-  digest[3] = hex_to_u32 ((const u8 *) &input_buf[24]);
-  digest[4] = hex_to_u32 ((const u8 *) &input_buf[32]);
-
-  return (PARSER_OK);
-}
-
 int sha1axcrypt_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf)
 {
   if ((input_len < DISPLAY_LEN_MIN_13300) || (input_len > DISPLAY_LEN_MAX_13300)) return (PARSER_GLOBAL_LENGTH);