Update terminal.c function parameters

pull/533/head
jsteube 8 years ago
parent 52068e25d5
commit 0ea8b6f3d0

@ -23,8 +23,8 @@
#include <windows.h>
#endif // _WIN
void welcome_screen (const user_options_t *user_options, const time_t proc_start, const char *version_tag);
void goodbye_screen (const user_options_t *user_options, const time_t proc_start, const time_t proc_stop);
void welcome_screen (hashcat_ctx_t *hashcat_ctx, const time_t proc_start, const char *version_tag);
void goodbye_screen (hashcat_ctx_t *hashcat_ctx, const time_t proc_start, const time_t proc_stop);
int setup_console ();

@ -24,10 +24,6 @@ int main (int argc, char **argv)
hashcat_ctx_init (hashcat_ctx);
// initialize the user options with some defaults (you can override them later)
user_options_init (hashcat_ctx);
// initialize the session via getops for commandline use or
// alternatively you can set the user_options directly
@ -56,6 +52,10 @@ int main (int argc, char **argv)
if (rc_console == -1) return -1;
// initialize the user options with some defaults (you can override them later)
user_options_init (hashcat_ctx);
// parse commandline parameters and check them
const int rc_options_getopt = user_options_getopt (hashcat_ctx, argc, argv);
@ -90,7 +90,7 @@ int main (int argc, char **argv)
time (&proc_start);
welcome_screen (user_options, proc_start, VERSION_TAG);
welcome_screen (hashcat_ctx, proc_start, VERSION_TAG);
// now run hashcat
@ -102,7 +102,7 @@ int main (int argc, char **argv)
time (&proc_stop);
goodbye_screen (user_options, proc_start, proc_stop);
goodbye_screen (hashcat_ctx, proc_start, proc_stop);
}
else
{
@ -113,6 +113,12 @@ int main (int argc, char **argv)
char *hc_argv[] = { hash, mask, NULL };
// initialize the user options with some defaults (you can override them later)
user_options_init (hashcat_ctx);
// your own stuff
user_options_t *user_options = hashcat_ctx->user_options;
user_options->hc_argv = hc_argv;

@ -15,8 +15,10 @@
const char *PROMPT = "[s]tatus [p]ause [r]esume [b]ypass [c]heckpoint [q]uit => ";
void welcome_screen (const user_options_t *user_options, const time_t proc_start, const char *version_tag)
void welcome_screen (hashcat_ctx_t *hashcat_ctx, const time_t proc_start, const char *version_tag)
{
user_options_t *user_options = hashcat_ctx->user_options;
if (user_options->quiet == true) return;
if (user_options->keyspace == true) return;
if (user_options->stdout_flag == true) return;
@ -47,8 +49,10 @@ void welcome_screen (const user_options_t *user_options, const time_t proc_start
}
}
void goodbye_screen (const user_options_t *user_options, const time_t proc_start, const time_t proc_stop)
void goodbye_screen (hashcat_ctx_t *hashcat_ctx, const time_t proc_start, const time_t proc_stop)
{
const user_options_t *user_options = hashcat_ctx->user_options;
if (user_options->quiet == true) return;
if (user_options->keyspace == true) return;
if (user_options->stdout_flag == true) return;

Loading…
Cancel
Save