HollowsHunter
Scans all running processes. Recognizes and dumps a variety of potentially malicious implants (replaced/implanted PEs, shellcodes, hooks, in-memory patches).
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
8extern 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
34namespace 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
bool get_current_color(int descriptor, WORD &color)
Definition term_util.cpp:12
void print_in_color(WORD color, const std::string &text)
Definition term_util.cpp:34
std::wstring utf8_to_wstring(const std::string &utf8)
Definition term_util.cpp:83
WORD set_color(WORD color)
Definition term_util.cpp:21
std::string wstring_to_utf8(const std::wstring &wstr)
Definition term_util.cpp:40
Definition term_util.h:34
std::mutex g_stdOutMutex
Definition term_util.cpp:10