Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mask mode tests #23

Open
magnumripper opened this issue Nov 5, 2014 · 8 comments
Open

Mask mode tests #23

magnumripper opened this issue Nov 5, 2014 · 8 comments

Comments

@magnumripper
Copy link
Member

See openwall/john#841 for lots of very small tests that TS should verify (if there is a mask mode present at all). They will ensure ranges and placeholders are parsed (or not) correctly, when things are escaped.

@magnumripper
Copy link
Member Author

Also, we should run a short mask mode test on the normal test files.

For example, using -1=?u?d -mask=?1?1?1?1?1 against LM_tst.in should crack exactly 900 passwords. And another run adding -min-len=0 to the above (yes it should be tested separately) should crack exactly 1000.

For slower modes we can run simpler (even just ?d for very slow ones) and/or shorter masks. There is no need to test other formats. We are testing the mode, not the format.

@magnumripper
Copy link
Member Author

This is btw part of #12

@jfoug
Copy link
Collaborator

jfoug commented Nov 11, 2015

Should this be an external perl script (like the dyna-compiler test suite fuzzer???)

I think an external would be better than incorporated into the current TS. What we 'could' do, is to spawn these external script, from within the TS script, without having to 'overload' the current script, with additional complexity, doing things that are quite different than all current testing.

@magnumripper
Copy link
Member Author

Yes I think so. Actually I think the priority is to establish manual tests that should be made. When that is done, we almost don't need them automated (testing only needed when changing mask mode) but at the same time it would be easy to do so.

@jfoug
Copy link
Collaborator

jfoug commented Nov 11, 2015

But placing them into a script is not a bad idea. It provides a simple regression test, to make sure changes do not break something. It is really all that the test suite is. Just a regression tool, once all formats are in it.

@magnumripper
Copy link
Member Author

True. Also, I really liked the design of the resume tests. One generic doOneRestore() function, and a number of calls to it. That ended up really well. We could do something similar, perhaps even come up with a single generic function that can test most modes.

@jfoug
Copy link
Collaborator

jfoug commented Nov 11, 2015

The whole TS is like that. There is a 'core' function, and we simply call that, based upon the *.dat file, and user input whittling that data down. That core function may be a 'loop',

@jfoug
Copy link
Collaborator

jfoug commented Mar 21, 2016

See #75 I have a plan on testing the rules, and I think I can do something similar to test mask mode. I will know more once I get the rules tester working. Right now, it is just an idea that popped into my head on a way to do it ;)

magnumripper added a commit that referenced this issue Mar 15, 2021
We do this by dropping last letter of wordlist and add -mask=?w?a

See #23
magnumripper added a commit that referenced this issue Mar 15, 2021
We do this by dropping last letter of wordlist and add -mask=?w?a

See #23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants