[GH-ISSUE #552] Implied options should be stored in session file #235

Closed
opened 2026-10-14 02:57:27 +07:00 by bsakaguchi · 5 comments
Owner

Originally created by @magnumripper on GitHub (Apr 7, 2014).
Original GitHub issue: https://github.com/openwall/john/issues/552

Originally assigned to: @magnumripper on GitHub.

For example, if you just said --wordlist but rules were also added from a john.conf entry, this should be stored in the session file so resuming will do the right thing even if john.conf was changed inbetween. This also goes for encodings and other options.

Originally created by @magnumripper on GitHub (Apr 7, 2014). Original GitHub issue: https://github.com/openwall/john/issues/552 Originally assigned to: @magnumripper on GitHub. For example, if you just said --wordlist but rules were also added from a john.conf entry, this should be stored in the session file so resuming will do the right thing even if john.conf was changed inbetween. This also goes for encodings and other options.
bsakaguchi 2026-10-14 02:57:27 +07:00
Author
Owner

@frank-dittrich commented on GitHub (Apr 8, 2014):

I am not so convinced this is a good idea.
Even in core john, you can cause similar problems if you change the rules in the [List.Rules:Wordlist] section, or if you change the contents of the wordlist file after interrupting a session and restoring it.
May be this should be discussed on john-dev or john-users.

<!-- gh-comment-id:39872235 --> @frank-dittrich commented on GitHub (Apr 8, 2014): I am not so convinced this is a good idea. Even in core john, you can cause similar problems if you change the rules in the [List.Rules:Wordlist] section, or if you change the contents of the wordlist file after interrupting a session and restoring it. May be this should be discussed on john-dev or john-users.
Author
Owner

@magnumripper commented on GitHub (Apr 8, 2014):

Yes but core john has a whole lot less parameters to tweak. And it does fill in some things - at least one: If you start a session without the --format option, it will add one to the session file, with the format that was auto-selected.

Also, Solar has expressed (a long time ago) that he thinks Jumbo should do this for some options. I can't recall what he referred to at the time.

<!-- gh-comment-id:39899412 --> @magnumripper commented on GitHub (Apr 8, 2014): Yes but core john has a whole lot less parameters to tweak. And it does fill in some things - at least one: If you start a session without the --format option, it will add one to the session file, with the format that was auto-selected. Also, Solar has expressed (a long time ago) that he thinks Jumbo should do this for some options. I can't recall what he referred to at the time.
Author
Owner

@frank-dittrich commented on GitHub (Apr 8, 2014):

So you are talking about parameters that can be specified as config file options and via john's command line options? Not some random other options like user defined character classes etc.
That would mean you wouldn't need to bump the rec file version.

<!-- gh-comment-id:39907007 --> @frank-dittrich commented on GitHub (Apr 8, 2014): So you are talking about parameters that can be specified as config file options and via john's command line options? Not some random other options like user defined character classes etc. That would mean you wouldn't need to bump the rec file version.
Author
Owner

@magnumripper commented on GitHub (Apr 8, 2014):

Exactly. If john.conf says default wordlist is rockyou.txt and you just used -wo then it should be stored as -wo:rockyou.txt in the session file. If I gave no --encoding but a default encoding was used from john.conf, an -encoding:whatever line should be added.

Actually, if you just said -wo it should ideally be stored as -wordlist=filename in the session file, in case a newer version make -wo ambigous. This recently happened with using -i for incremental (now -inc is minimum needed). But that might need a new function in getopt.c.

<!-- gh-comment-id:39910639 --> @magnumripper commented on GitHub (Apr 8, 2014): Exactly. If john.conf says default wordlist is rockyou.txt and you just used `-wo` then it should be stored as `-wo:rockyou.txt` in the session file. If I gave no `--encoding` but a default encoding was used from john.conf, an `-encoding:whatever` line should be added. Actually, if you just said `-wo` it should ideally be stored as `-wordlist=filename` in the session file, in case a newer version make `-wo` ambigous. This recently happened with using `-i` for incremental (now `-inc` is minimum needed). But that might need a new function in getopt.c.
Author
Owner

@magnumripper commented on GitHub (Apr 14, 2014):

Fixed in #565 (once it's merged)

<!-- gh-comment-id:40420967 --> @magnumripper commented on GitHub (Apr 14, 2014): Fixed in #565 (once it's merged)
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#235
No description provided.