[GH-ISSUE #1774] SessionFileProtect problem in batch mode #1181

Closed
opened 2026-10-14 03:38:16 +07:00 by bsakaguchi · 10 comments
Owner

Originally created by @frank-dittrich on GitHub (Sep 21, 2015).
Original GitHub issue: https://github.com/openwall/john/issues/1774

Without any mode option, john will fail when switching from --single mode to --wordlist mode.
May be we need to find a place to check this before forking. Too bad it can't be in the same place as LogFileProtect check.

Originally created by @frank-dittrich on GitHub (Sep 21, 2015). Original GitHub issue: https://github.com/openwall/john/issues/1774 Without any mode option, john will fail when switching from --single mode to --wordlist mode. May be we need to find a place to check this before forking. Too bad it can't be in the same place as LogFileProtect check.
bsakaguchi 2026-10-14 03:38:16 +07:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@magnumripper commented on GitHub (Sep 21, 2015):

Or may be we can't move the SessionFileProtect checks into log_init().
While --nolog isn't a problem --stdout is (log_init isn't called for --stdout).

Maybe we can have -stdout call log_init() - but imply -nolog?

<!-- gh-comment-id:142124605 --> @magnumripper commented on GitHub (Sep 21, 2015): > Or may be we can't move the SessionFileProtect checks into log_init(). > While --nolog isn't a problem --stdout is (log_init isn't called for --stdout). Maybe we can have -stdout call log_init() - but imply -nolog?
Author
Owner

@frank-dittrich commented on GitHub (Sep 21, 2015):

That would work (and add one more core deviation).

<!-- gh-comment-id:142124893 --> @frank-dittrich commented on GitHub (Sep 21, 2015): That would work (and add one more core deviation).
Author
Owner

@magnumripper commented on GitHub (Sep 21, 2015):

That's a deviation we can live with. The really bad merge troubles are core changes to loader/cracker stuff if we deviate much (or unwisely).

<!-- gh-comment-id:142126384 --> @magnumripper commented on GitHub (Sep 21, 2015): That's a deviation we can live with. The really bad merge troubles are core changes to loader/cracker stuff if we deviate much (or unwisely).
Author
Owner

@magnumripper commented on GitHub (Oct 15, 2015):

@frank-dittrich -stdout now calls log_init(). Feel free to work with this if/when you got the time.

<!-- gh-comment-id:148532791 --> @magnumripper commented on GitHub (Oct 15, 2015): @frank-dittrich -stdout now calls log_init(). Feel free to work with this if/when you got the time.
Author
Owner

@magnumripper commented on GitHub (Nov 9, 2015):

Can't be done in log_init(). It's simply too early. I just added a hack for batch mode.

<!-- gh-comment-id:155132582 --> @magnumripper commented on GitHub (Nov 9, 2015): Can't be done in log_init(). It's simply too early. I just added a hack for batch mode.
Author
Owner

@magnumripper commented on GitHub (Nov 9, 2015):

I guess I should revert f69d8d3d.

<!-- gh-comment-id:155215880 --> @magnumripper commented on GitHub (Nov 9, 2015): I guess I should revert f69d8d3d.
Author
Owner

@frank-dittrich commented on GitHub (Nov 10, 2015):

Why is checking for an existing .rec file in log_init() too early?

<!-- gh-comment-id:155329909 --> @frank-dittrich commented on GitHub (Nov 10, 2015): Why is checking for an existing .rec file in log_init() too early?
Author
Owner

@magnumripper commented on GitHub (Nov 10, 2015):

I spent all of yesterday trying to make it work. Several problems, most stemming from the fact node number(s) are not known yet. I sort of got it working, with huge deviations from core and too messy to commit.

It's a pity though because it really bailed out immediately as opposed to after a spending a good while loading hashes and parsing pots. I still have the code, in case I get a lightbulb moment.

<!-- gh-comment-id:155344804 --> @magnumripper commented on GitHub (Nov 10, 2015): I spent all of yesterday trying to make it work. Several problems, most stemming from the fact node number(s) are not known yet. I sort of got it working, with huge deviations from core and too messy to commit. It's a pity though because it really bailed out immediately as opposed to after a spending a good while loading hashes and parsing pots. I still have the code, in case I get a lightbulb moment.
Author
Owner

@frank-dittrich commented on GitHub (Nov 10, 2015):

@magnumripper Why would we care about node numbers?
Just check for the "main" .rec file.
If that one doesn't exist, a session.2.rec file is of little use anyway, so there would be no problem overwriting it.

<!-- gh-comment-id:155349574 --> @frank-dittrich commented on GitHub (Nov 10, 2015): @magnumripper Why would we care about node numbers? Just check for the "main" .rec file. If that one doesn't exist, a session.2.rec file is of little use anyway, so there would be no problem overwriting it.
Author
Owner

@magnumripper commented on GitHub (Nov 10, 2015):

Yeah that works in the -fork case, but with MPI we already run n processes and they are almost totally unsynchronized (which is a feature and a design choice). This means the main node might create the (new) file and only then, node 163 checks for it and sees it's already there. And bails out.

Things like that. Many moving parts involved.

<!-- gh-comment-id:155532673 --> @magnumripper commented on GitHub (Nov 10, 2015): Yeah that works in the -fork case, but with MPI we already run _n_ processes and they are almost _totally unsynchronized_ (which is a feature and a design choice). This means the main node might create the (new) file and only then, node 163 checks for it and sees it's already there. And bails out. Things like that. Many moving parts involved.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
openwall/john#1181
No description provided.