* License.....: MIT
*/
-#ifdef OSX
+#ifdef DARWIN
#include <stdio.h>
#endif
}
#endif
-#ifdef OSX
+#ifdef DARWIN
static struct termios savemodes;
static int havemodes = 0;
const int len = GetModuleFileName (NULL, exec_path, exec_path_len - 1);
- #elif OSX
+ #elif DARWIN
uint size = exec_path_len;
myfree (buf);
}
-#ifdef OSX
+#ifdef DARWIN
int pthread_setaffinity_np (pthread_t thread, size_t cpu_size, cpu_set_t *cpu_set)
{
int core;
if ((d = opendir (tmp_path)) != NULL)
{
- #ifdef OSX
+ #ifdef DARWIN
struct dirent e;
for (;;) {
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;
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;
}
data.devices_status = STATUS_QUIT;
}
+void naive_escape (const char *cpath_real, char *cpath_escaped, const size_t cpath_escaped_len)
+{
+ const size_t len = strlen (cpath_real);
+
+ for (size_t in = 0, out = 0; in < len; in++, out++)
+ {
+ const u8 c = cpath_real[in];
+
+ if (c == ' ')
+ {
+ cpath_escaped[out] = '\\';
+
+ out++;
+ }
+
+ if (out == cpath_escaped_len) break;
+
+ 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");
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);
}
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);