Add mangle to mode 60 attack 3
[hashcat.git] / include / shared.h
index a3cbc56..a9696da 100644 (file)
@@ -46,7 +46,7 @@
 #define hc_thread_mutex_delete(m)   pthread_mutex_destroy  (&m)
 #endif
 
-#ifdef OSX
+#ifdef __APPLE__
 typedef struct cpu_set
 {
   uint32_t count;
@@ -81,7 +81,7 @@ static inline int  CPU_ISSET (int num, cpu_set_t *cs) { return (cs->count & (1 <
         exit (-1); \
       } else { \
         log_info ("WARNING: %s is missing from %s shared library.", #name, #libname); \
-        return (-1); \
+        return -1; \
       } \
     } \
   }
@@ -95,7 +95,7 @@ static inline int  CPU_ISSET (int num, cpu_set_t *cs) { return (cs->count & (1 <
         exit (-1); \
       } else { \
         log_info ("WARNING: %s is missing from %s shared library.", #name, #libname); \
-        return (-1); \
+        return -1; \
       } \
     } \
   }
@@ -108,7 +108,7 @@ static inline int  CPU_ISSET (int num, cpu_set_t *cs) { return (cs->count & (1 <
       exit (-1); \
     } else { \
       log_error ("WARNING: %s at address %08x is missing from %s shared library.", #name, addr, #libname); \
-      return (-1); \
+      return -1; \
     } \
   }
 
@@ -152,15 +152,15 @@ static inline int  CPU_ISSET (int num, cpu_set_t *cs) { return (cs->count & (1 <
 #define CL_VENDOR_NV            "NVIDIA Corporation"
 #define CL_VENDOR_POCL          "The pocl project"
 
-#define VENDOR_ID_AMD           (1 << 0)
-#define VENDOR_ID_APPLE         (1 << 1)
-#define VENDOR_ID_INTEL_BEIGNET (1 << 2)
-#define VENDOR_ID_INTEL_SDK     (1 << 3)
-#define VENDOR_ID_MESA          (1 << 4)
-#define VENDOR_ID_NV            (1 << 5)
-#define VENDOR_ID_POCL          (1 << 6)
-#define VENDOR_ID_AMD_USE_INTEL (1 << 7)
-#define VENDOR_ID_GENERIC       (1 << 31)
+#define VENDOR_ID_AMD           (1u << 0)
+#define VENDOR_ID_APPLE         (1u << 1)
+#define VENDOR_ID_INTEL_BEIGNET (1u << 2)
+#define VENDOR_ID_INTEL_SDK     (1u << 3)
+#define VENDOR_ID_MESA          (1u << 4)
+#define VENDOR_ID_NV            (1u << 5)
+#define VENDOR_ID_POCL          (1u << 6)
+#define VENDOR_ID_AMD_USE_INTEL (1u << 7)
+#define VENDOR_ID_GENERIC       (1u << 31)
 
 #define BLOCK_SIZE              64
 
@@ -235,7 +235,6 @@ extern hc_thread_mutex_t mux_display;
 #define HT_00140  "sha1($salt.unicode($pass))"
 #define HT_00150  "HMAC-SHA1 (key = $pass)"
 #define HT_00160  "HMAC-SHA1 (key = $salt)"
-#define HT_00190  "sha1(LinkedIn)"
 #define HT_00200  "MySQL323"
 #define HT_00300  "MySQL4.1/MySQL5"
 #define HT_00400  "phpass, MD5(Wordpress), MD5(phpBB3), MD5(Joomla)"
@@ -468,8 +467,6 @@ extern hc_thread_mutex_t mux_display;
 #define DISPLAY_LEN_MAX_150   40 + 1 + 51
 #define DISPLAY_LEN_MIN_150H  40 + 1 + 0
 #define DISPLAY_LEN_MAX_150H  40 + 1 + 102
-#define DISPLAY_LEN_MIN_190   40
-#define DISPLAY_LEN_MAX_190   40
 #define DISPLAY_LEN_MIN_200   16
 #define DISPLAY_LEN_MAX_200   16
 #define DISPLAY_LEN_MIN_300   40
@@ -868,7 +865,6 @@ extern hc_thread_mutex_t mux_display;
 #define KERN_TYPE_SHA1_SLTPWU         140
 #define KERN_TYPE_HMACSHA1_PW         150
 #define KERN_TYPE_HMACSHA1_SLT        160
-#define KERN_TYPE_SHA1_LINKEDIN       190
 #define KERN_TYPE_MYSQL               200
 #define KERN_TYPE_MYSQL41             300
 #define KERN_TYPE_PHPASS              400
@@ -893,6 +889,7 @@ extern hc_thread_mutex_t mux_display;
 #define KERN_TYPE_HMACSHA512_PW       1750
 #define KERN_TYPE_HMACSHA512_SLT      1760
 #define KERN_TYPE_SHA512CRYPT         1800
+#define KERN_TYPE_STDOUT              2000
 #define KERN_TYPE_DCC2                2100
 #define KERN_TYPE_MD5PIX              2400
 #define KERN_TYPE_MD5ASA              2410
@@ -1551,7 +1548,6 @@ int osx1_parse_hash               (char *input_buf, uint input_len, hash_t *hash
 int osx512_parse_hash             (char *input_buf, uint input_len, hash_t *hash_buf);
 int phpass_parse_hash             (char *input_buf, uint input_len, hash_t *hash_buf);
 int sha1_parse_hash               (char *input_buf, uint input_len, hash_t *hash_buf);
-int sha1linkedin_parse_hash       (char *input_buf, uint input_len, hash_t *hash_buf);
 int sha1b64_parse_hash            (char *input_buf, uint input_len, hash_t *hash_buf);
 int sha1b64s_parse_hash           (char *input_buf, uint input_len, hash_t *hash_buf);
 int sha1s_parse_hash              (char *input_buf, uint input_len, hash_t *hash_buf);
@@ -1672,6 +1668,8 @@ int veracrypt_parse_hash_327661   (char *input_buf, uint input_len, hash_t *hash
 int veracrypt_parse_hash_655331   (char *input_buf, uint input_len, hash_t *hash_buf);
 int win8phone_parse_hash          (char *input_buf, uint input_len, hash_t *hash_buf);
 
+void naive_replace (char *s, const u8 key_char, const u8 replace_char);
+void naive_escape (char *s, size_t s_max, const u8 key_char, const u8 escape_char);
 void load_kernel (const char *kernel_file, int num_devices, size_t *kernel_lengths, const u8 **kernel_sources);
 void writeProgramBin (char *dst, u8 *binary, size_t binary_size);