Update user_options.c function parameters
This commit is contained in:
14
src/main.c
14
src/main.c
@@ -24,11 +24,9 @@ int main (int argc, char **argv)
|
||||
|
||||
hashcat_ctx_init (hashcat_ctx);
|
||||
|
||||
// initialize the user options with some defaults (you can override them)
|
||||
// initialize the user options with some defaults (you can override them later)
|
||||
|
||||
user_options_t *user_options = hashcat_ctx->user_options;
|
||||
|
||||
user_options_init (user_options);
|
||||
user_options_init (hashcat_ctx);
|
||||
|
||||
// initialize the session via getops for commandline use or
|
||||
// alternatively you can set the user_options directly
|
||||
@@ -60,16 +58,18 @@ int main (int argc, char **argv)
|
||||
|
||||
// parse commandline parameters and check them
|
||||
|
||||
const int rc_options_getopt = user_options_getopt (user_options, argc, argv);
|
||||
const int rc_options_getopt = user_options_getopt (hashcat_ctx, argc, argv);
|
||||
|
||||
if (rc_options_getopt == -1) return -1;
|
||||
|
||||
const int rc_options_sanity = user_options_sanity (user_options);
|
||||
const int rc_options_sanity = user_options_sanity (hashcat_ctx);
|
||||
|
||||
if (rc_options_sanity == -1) return -1;
|
||||
|
||||
// some early exits
|
||||
|
||||
user_options_t *user_options = hashcat_ctx->user_options;
|
||||
|
||||
if (user_options->version == true)
|
||||
{
|
||||
printf ("%s\n", VERSION_TAG);
|
||||
@@ -113,6 +113,8 @@ int main (int argc, char **argv)
|
||||
|
||||
char *hc_argv[] = { hash, mask, NULL };
|
||||
|
||||
user_options_t *user_options = hashcat_ctx->user_options;
|
||||
|
||||
user_options->hc_argv = hc_argv;
|
||||
user_options->hc_argc = 2;
|
||||
user_options->quiet = true;
|
||||
|
||||
Reference in New Issue
Block a user