HollowsHunter
Scans all running processes. Recognizes and dumps a variety of potentially malicious implants (replaced/implanted PEs, shellcodes, hooks, in-memory patches).
Toggle main menu visibility
Loading...
Searching...
No Matches
term_util.h
Go to the documentation of this file.
1
#pragma once
2
3
#include <iostream>
4
#include <windows.h>
5
#include <mutex>
6
#include <string>
7
8
extern
std::mutex
g_stdOutMutex
;
9
10
#define BLACK 0
11
#define DARK_BLUE 1
12
#define DARK_GREEN 2
13
#define DARK_CYAN 3
14
#define DARK_RED 4
15
#define DARK_MAGENTA 5
16
#define BROWN 6
17
#define SILVER 7
18
#define GRAY 8
19
#define BLUE 9
20
#define LIME 0xA
21
#define CYAN 0xB
22
#define RED 0xC
23
#define MAGENTA 0xD
24
#define YELLOW 0xE
25
#define WHITE 0xF
26
27
#define MAKE_COLOR(fg_color, bg_color) (fg_color | (bg_color << 4))
28
#define GET_BG_COLOR(color) (color >> 4)
29
30
#define YELLOW_ON_BLACK MAKE_COLOR(YELLOW, BLACK)
31
#define RED_ON_BLACK MAKE_COLOR(RED, BLACK)
32
33
34
namespace
hh
{
35
namespace
util
{
36
bool
get_current_color
(
int
descriptor, WORD& color);
37
38
WORD
set_color
(WORD color);
39
40
// sets a color and returns the previous color:
41
void
print_in_color
(WORD color,
const
std::string& text);
42
43
std::string
wstring_to_utf8
(
const
std::wstring& wstr);
44
45
std::wstring
utf8_to_wstring
(
const
std::string& utf8);
46
47
};
// util
48
};
//hh
49
hh::util::get_current_color
bool get_current_color(int descriptor, WORD &color)
Definition
term_util.cpp:12
hh::util::print_in_color
void print_in_color(WORD color, const std::string &text)
Definition
term_util.cpp:34
hh::util::utf8_to_wstring
std::wstring utf8_to_wstring(const std::string &utf8)
Definition
term_util.cpp:83
hh::util::set_color
WORD set_color(WORD color)
Definition
term_util.cpp:21
hh::util::wstring_to_utf8
std::string wstring_to_utf8(const std::wstring &wstr)
Definition
term_util.cpp:40
hh
Definition
term_util.h:34
util
Definition
etw_settings.cpp:14
g_stdOutMutex
std::mutex g_stdOutMutex
Definition
term_util.cpp:10
Generated by
1.17.0