{
if (data.devices_status == STATUS_PAUSED)
{
- float ms_paused;
+ double ms_paused;
hc_timer_get (data.timer_paused, ms_paused);
fclose (fp);
- char new_cwd[1024] = { 0 };
-
- char *nwd = getcwd (new_cwd, sizeof (new_cwd));
-
- if (nwd == NULL)
- {
- log_error ("Restore file is corrupted");
- }
-
- if (strncmp (new_cwd, rd->cwd, sizeof (new_cwd)) != 0)
- {
- if (getcwd (rd->cwd, sizeof (rd->cwd)) == NULL)
- {
- log_error ("ERROR: could not determine current user path: %s", strerror (errno));
-
- exit (-1);
- }
-
- log_info ("WARNING: Found old restore file, updating path to %s...", new_cwd);
- }
+ log_info ("INFO: Changing current working directory to the path found within the .restore file: '%s'", rd->cwd);
if (chdir (rd->cwd))
{
- log_error ("ERROR: cannot chdir to %s: %s", rd->cwd, strerror (errno));
+ log_error ("ERROR: The directory '%s' does not exist. It is needed to restore (--restore) the session.\n"
+ " You could either create this directory (or link it) or update the .restore file using e.g. the analyze_hc_restore.pl tool:\n"
+ " https://github.com/philsmd/analyze_hc_restore\n"
+ " The directory must be relative to (or contain) all files/folders mentioned within the command line.", rd->cwd);
exit (-1);
}
if (ch == 0) continue;
- #ifdef _POSIX
- if (ch != '\n')
- #endif
+ //https://github.com/hashcat/oclHashcat/issues/302
+ //#ifdef _POSIX
+ //if (ch != '\n')
+ //#endif
hc_thread_mutex_lock (mux_display);
switch (ch)
{
case 's':
+ case '\r':
case '\n':
log_info ("");
break;
}
+ //https://github.com/hashcat/oclHashcat/issues/302
+ //#ifdef _POSIX
+ //if (ch != '\n')
+ //#endif
+
hc_thread_mutex_unlock (mux_display);
}