From 1e725889c191a3e46e8a12d63b719cbb93b3e53d Mon Sep 17 00:00:00 2001 From: Henrik Hautakoski Date: Tue, 18 Feb 2020 14:30:20 +0100 Subject: [PATCH] src/main.cpp: implement -m flag. --- src/main.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index 3e16602..36b0883 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -26,6 +26,7 @@ #endif /* HAVE_THREADS */ #include #include +#include "console.h" #include "string.h" #include "WIF.h" #include "crypto/ec.h" @@ -68,7 +69,7 @@ void cmd_search(const eoskeygen::strlist_t& words, int count) { void usage(const char *name) { std::cout << name - << " [ -h | --help | search [ --l33t" + << " [ -h | --help | search [ -m | --l33t" #ifdef HAVE_THREADS << " | --threads=" #endif /* HAVE_THREADS */ @@ -90,6 +91,8 @@ void usage(const char *name) { << " performs a search, finding public keys containing" << std::endl << " one or more words from (separated with ',')." << std::endl << std::endl + << " -m: Monochrome, disables all color output." + << std::endl << std::endl << " --l33t: Takes each word in and find all l33tspeak" << std::endl << " combinations of that word and uses the new list for the search." #ifdef HAVE_THREADS @@ -142,7 +145,9 @@ int main(int argc, char **argv) { eoskeygen::strlist_t words; while(p++ < argc - 1) { - if (!strcmp(argv[p], "--l33t")) { + if (!strcmp(argv[p], "-m")) { + eoskeygen::console::disable_color = true; + } else if (!strcmp(argv[p], "--l33t")) { option_l33t = true; } else if (!memcmp(argv[p], "--threads=", 10)) { #ifdef HAVE_THREADS