mirror of
https://github.com/eosswedenorg/antelope-keygen
synced 2026-06-17 03:50:03 +02:00
src/key_search_helpers.cpp: in key_search_result() use console colors to highlight the found word.
This commit is contained in:
parent
075144c72b
commit
97b834d11e
1 changed files with 7 additions and 1 deletions
|
|
@ -1,6 +1,7 @@
|
|||
|
||||
#include <iostream>
|
||||
#include "WIF.h"
|
||||
#include "console.h"
|
||||
#include "key_search_helpers.h"
|
||||
|
||||
void key_search_result(const struct ec_keypair* key, const struct key_result* result) {
|
||||
|
|
@ -11,7 +12,12 @@ void key_search_result(const struct ec_keypair* key, const struct key_result* re
|
|||
std::cout << "----" << std::endl;
|
||||
std::cout << "Found: " << word << std::endl;
|
||||
|
||||
std::cout << "Public: " << pub << std::endl;
|
||||
std::cout << "Public: "
|
||||
<< pub.substr(0, result->pos)
|
||||
<< console::fg(console::red, console::bold) << word << console::reset
|
||||
<< pub.substr(result->pos + result->len)
|
||||
<< std::endl;
|
||||
|
||||
std::cout << "Private: " << wif_priv_encode(key->secret) << std::endl;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue