From 1708898eedc8a94f2641a5508ebaedf07e666e56 Mon Sep 17 00:00:00 2001 From: jsteube Date: Fri, 9 Jun 2017 17:34:09 +0200 Subject: [PATCH] Add a missing sanity check on startup to disallow the use of increment in combination with -s and -l Fixes https://github.com/hashcat/maskprocessor/issues/8 --- CHANGES | 20 ++++++++++++-------- src/mp.c | 14 ++++++++++++++ 2 files changed, 26 insertions(+), 8 deletions(-) diff --git a/CHANGES b/CHANGES index 5773ed1..00c1805 100644 --- a/CHANGES +++ b/CHANGES @@ -1,8 +1,12 @@ -* v0.72 -> v0.73: - -- Open Source the project -- License is MIT -- Moved repository to github: https://github.com/jsteube/maskprocessor -- Added CHANGES -- Added LICENSE -- Added README.md +* v0.73 -> xxx: + +- Add a missing sanity check on startup to disallow the use of increment in combination with -s and -l + +* v0.72 -> v0.73: + +- Open Source the project +- License is MIT +- Moved repository to github: https://github.com/jsteube/maskprocessor +- Added CHANGES +- Added LICENSE +- Added README.md diff --git a/src/mp.c b/src/mp.c index 4244702..3ce7729 100644 --- a/src/mp.c +++ b/src/mp.c @@ -490,6 +490,20 @@ int main (int argc, char *argv[]) return (-1); } + if (increment && start_at) + { + fprintf (stderr, "--increment can not be used with --start-at\n"); + + return (-1); + } + + if (increment && stop_at) + { + fprintf (stderr, "--increment can not be used with --stop-at\n"); + + return (-1); + } + /* buffers */ char *mp_sys[6];