#define KERNEL_COMBS 1024
#define KERNEL_BFS 1024
#define KERNEL_THREADS_MAX 256
-#define KERNEL_THREADS_MAX_CPU 16
+#define KERNEL_THREADS_MAX_CPU 1
#define POWERTUNE_ENABLE 0
#define LOGFILE_DISABLE 0
#define SCRYPT_TMTO 0
if (data.devices_status == STATUS_INIT) return;
if (data.devices_status == STATUS_STARTING) return;
+ // in this case some required buffers are free'd, ascii_digest() would run into segfault
+ if (data.shutdown_inner == 1) return;
+
if (data.machine_readable == 1)
{
status_display_machine_readable ();
}
else
{
- char display_etc[32] = { 0 };
+ char display_etc[32] = { 0 };
+ char display_runtime[32] = { 0 };
struct tm tm_etc;
+ struct tm tm_runtime;
struct tm *tmp = NULL;
#ifdef WIN
-
tmp = _gmtime64 (&sec_etc);
-
#else
-
tmp = gmtime (&sec_etc);
-
#endif
if (tmp != NULL)
{
- memset (&tm_etc, 0, sizeof (tm_etc));
-
memcpy (&tm_etc, tmp, sizeof (tm_etc));
format_timer_display (&tm_etc, display_etc, sizeof (display_etc));
if (etc[etc_len - 1] == '\n') etc[etc_len - 1] = 0;
if (etc[etc_len - 2] == '\r') etc[etc_len - 2] = 0;
- log_info ("Time.Estimated.: %s (%s)", etc, display_etc);
+ if (data.runtime)
+ {
+ time_t runtime_cur;
+
+ time (&runtime_cur);
+
+ #ifdef WIN
+
+ __time64_t runtime_left = data.proc_start + data.runtime - runtime_cur;
+
+ tmp = _gmtime64 (&runtime_left);
+
+ #else
+
+ time_t runtime_left = data.proc_start + data.runtime - runtime_cur;
+
+ tmp = gmtime (&runtime_left);
+
+ #endif
+
+ if ((tmp != NULL) && (runtime_left > 0) && (runtime_left < sec_etc))
+ {
+ memcpy (&tm_runtime, tmp, sizeof (tm_runtime));
+
+ format_timer_display (&tm_runtime, display_runtime, sizeof (display_runtime));
+
+ log_info ("Time.Estimated.: %s (%s), but limited (%s)", etc, display_etc, display_runtime);
+ }
+ else
+ {
+ log_info ("Time.Estimated.: %s (%s), but limit exceeded", etc, display_etc);
+ }
+ }
+ else
+ {
+ log_info ("Time.Estimated.: %s (%s)", etc, display_etc);
+ }
}
}
}
if (data.devices_status == STATUS_INIT) return;
if (data.devices_status == STATUS_STARTING) return;
+ if (data.shutdown_inner == 1) return;
+
if (data.machine_readable == 1)
{
status_benchmark_automate ();
char *exec_path = get_exec_path ();
- #ifdef LINUX
+ #if defined(LINUX) || defined(__APPLE__)
char *resolved_install_folder = realpath (INSTALL_FOLDER, NULL);
char *resolved_exec_path = realpath (exec_path, NULL);
uint kernel_threads = MIN (KERNEL_THREADS_MAX, device_param->device_maxworkgroup_size);
+ if (hash_mode == 8900) kernel_threads = 64; // Scrypt
+ if (hash_mode == 9300) kernel_threads = 64; // Scrypt
+
if (device_param->device_type & CL_DEVICE_TYPE_CPU)
{
kernel_threads = KERNEL_THREADS_MAX_CPU;
if (hash_mode == 3000) kernel_threads = 64; // DES
if (hash_mode == 3200) kernel_threads = 8; // Blowfish
if (hash_mode == 7500) kernel_threads = 64; // RC4
- if (hash_mode == 8900) kernel_threads = 64; // Scrypt
if (hash_mode == 9000) kernel_threads = 8; // Blowfish
- if (hash_mode == 9300) kernel_threads = 64; // Scrypt
if (hash_mode == 9700) kernel_threads = 64; // RC4
if (hash_mode == 9710) kernel_threads = 64; // RC4
if (hash_mode == 9800) kernel_threads = 64; // RC4
}
}
- data.scrypt_tmp_size = (128 * scrypt_r);
+ data.scrypt_tmp_size = (128 * scrypt_r * scrypt_p);
device_param->kernel_accel_min = 1;
device_param->kernel_accel_max = 8;
return -1;
}
- if (quiet == 0) log_info ("SCRYPT tmto optimizer value set to: %u, mem: %u\n", data.scrypt_tmto_final, size_scrypt);
+ if (quiet == 0) log_info ("SCRYPT tmto optimizer value set to: %u, mem: %llu\n", data.scrypt_tmto_final, (unsigned long long int) size_scrypt);
}
size_t size_scrypt4 = size_scrypt / 4;
mask = mask + str_pos + 1;
}
+
+ /**
+ * What follows is a very special case where "\," is within the mask field of a line in a .hcmask file only because otherwise (without the "\")
+ * it would be interpreted as a custom charset definition.
+ *
+ * We need to replace all "\," with just "," within the mask (but allow the special case "\\," which means "\" followed by ",")
+ * Note: "\\" is not needed to replace all "\" within the mask! The meaning of "\\" within a line containing the string "\\," is just to allow "\" followed by ","
+ */
+
+ uint mask_len_cur = strlen (mask);
+
+ uint mask_out_pos = 0;
+ char mask_prev = 0;
+
+ for (uint mask_iter = 0; mask_iter < mask_len_cur; mask_iter++, mask_out_pos++)
+ {
+ if (mask[mask_iter] == ',')
+ {
+ if (mask_prev == '\\')
+ {
+ mask_out_pos -= 1; // this means: skip the previous "\"
+ }
+ }
+
+ mask_prev = mask[mask_iter];
+
+ mask[mask_out_pos] = mask[mask_iter];
+ }
+
+ mask[mask_out_pos] = '\0';
}
if ((attack_mode == ATTACK_MODE_HYBRID1) || (attack_mode == ATTACK_MODE_HYBRID2))