mirror of
https://github.com/openwall/john.git
synced 2026-12-03 18:45:21 +07:00
[GH-ISSUE #1988] Multiple dynamic scripts using same dyna number should warn user. #1331
Labels
No labels
bug
core branch
documentation
enhancement
enhancement
fixed - pending verify
fuzz bug
good first issue
invalid
invalid
maintenance/cleanup
new cracking mode
new format
new tool
non-trivial
notes/external issues
portability
question
RFC / discussion
testing
WONTFIX
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
openwall/john#1331
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @jfoug on GitHub (Jan 11, 2016).
Original GitHub issue: https://github.com/openwall/john/issues/1988
I am not sure how this will be done. I think the information about duplication is already lost by the time we get to dyna loading. But I am adding this issue, just in case someone has an idea on how to do this.
@frank-dittrich commented on GitHub (Jan 11, 2016):
I guess it is the same with two List.Rules sections with the same name:
So, the second definition just overwrites the first without any warning.
Now we can label it as a core John (master) bug.
@jfoug commented on GitHub (Jan 11, 2016):
Not sure calling it a 'bug' is right. This is a 'feature', lol. It was done this way by design. For rules, it may make sense to do this. non-jumbo john does not have -rules=xxx Only -rules But for dynamic, it does not make as much since. Once a number is 'used', redefining it to some other hash would be a big usage problem.
BUT figuring this one out is NOT trivial, unless you read in dynamic.conf (and anything it loads) and parse it out, without using the config code already writing into jtr.
@frank-dittrich commented on GitHub (Jan 11, 2016):
It is the same with parameter sections.
This is the redefinition in my local config. I didn't use
[Local:Markov:Default]as a section name, that's why the MkvLvl definition is gone now. (My local definition just has Statsfile and MkvMaxLen.)And --list=listdata:section also shows the last definition:
@frank-dittrich commented on GitHub (Jan 11, 2016):
But redefining a rules section also is a big usage problem, say you just restart a session which resumes with the redefinition instead the original section...
@jfoug commented on GitHub (Jan 11, 2016):
This is just the 'common' code within configure. it will overwrite already existing lines when reading.
@frank-dittrich commented on GitHub (Jan 11, 2016):
My examples weren't about overwriting existing lines (That would be
[Local:...]sections, but about overwriting complete sections.@jfoug commented on GitHub (Jan 11, 2016):
I would be very hesitant about changing the current behavior. BUT I think a warning being written each time it happens (section) might be good to do. At least the user would be made aware that an already defined section has been replaced, and that there may be a problem with the setup to investigate.
@frank-dittrich commented on GitHub (Jan 11, 2016):
Yes sure, I'd also suggest to just print a warning (with --verbosity >= 3)
@magnumripper commented on GitHub (Jan 11, 2016):
Would we want that warning when using john-local.conf? I think not. Perhaps at verbosity > 3.
@frank-dittrich commented on GitHub (Jan 11, 2016):
I never change john.conf, just john[.-]local.conf, so a warning with verbosity > 3 would be almost useless.
BTW, it could be we have a memleak for multiple sections with the same name /just looking at cfg_add_section now, didn't tst with ASan, and may be I had one beer too much.
@jfoug commented on GitHub (Jan 11, 2016):
There will be no 'shown' memleak. Almost all conf code uses mem_alloc_tiny
@jfoug commented on GitHub (Jan 15, 2016):
The above commit has this logic:
If a non-merged section starting with 'list.' is replaced and we are not processing john-local.conf, then we always emit a warning. If we need to fine tune the output, it should be easy, but at least this is the location WHERE this warning logic needs to be placed.
@magnumripper commented on GitHub (Jan 15, 2016):
Sounds good
@jfoug commented on GitHub (Jan 15, 2016):
So this is 'good enough'. If so, this bug is closed. I know the 2 of you bounced some additional ideas around. This change does not go that far. It simply always 'warns', UNTIL you get to john-local.conf. I did not warn there, but possibly we should even warn there ?...?
@frank-dittrich commented on GitHub (Jan 15, 2016):
Why only warn when the redefinition is outside john-local.conf?
I can't see why you would want to redefine a john.conf section in john-local.conf. Any examples where this would be desired?
@frank-dittrich commented on GitHub (Jan 15, 2016):
Furthermore, without seeing a valid reason to redefine a john.conf section, I would always assume a duplicate session name and thus a redefinition of a previous session is never intended.
May be a user isn't aware that section names are not case sensitive, and uses
That's why I'd prefer to always warn about the redefinition, even with default verbosity and even if the redefinition occurs in a local config file.
@frank-dittrich commented on GitHub (Jan 16, 2016):