This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#pragma once | |
template< class type_t > constexpr bool is_pointer = false; | |
template< class type_t > constexpr bool is_pointer< type_t* > = true; | |
#define _field( rva, type, name )\ | |
auto name( )\ | |
{\ | |
if constexpr ( is_pointer< type > )\ | |
{\ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#pragma once | |
namespace uti | |
{ | |
static constexpr std::uint32_t fnv1_basis = 0x811c9dc5; | |
static constexpr std::uint32_t fnv1_prime = 0x01000193; | |
[[ nodiscard ]] | |
constexpr std::uint32_t fnv1_hash_ct( const char* string, const std::uint32_t basis = fnv1_basis ) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#pragma once | |
// | |
// https://www.intel.com/content/dam/www/public/us/en/documents/manuals/64-ia-32-architectures-software-developer-vol-3a-part-1-manual.pdf | |
// | |
namespace os | |
{ | |
union virtual_address_t | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#pragma once | |
namespace os | |
{ | |
enum e_image_signature: const std::uint16_t | |
{ | |
dos_magic = 0x5a4d, // 'MZ' | |
nts_magic = 0x4550, // 'PE00' | |
opt_magic = 0x020b | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <thread> | |
constexpr std::uint32_t | |
dynamic_cycles = 10, | |
standard_sleep = 500, | |
vm_cycle_ratio = 100, | |
cycle_ratio = 75; | |
// -- rdtsc -- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import cli | |
import os | |
const ( | |
query_information = 0x0400 | |
page_readwrite = 0x0004 | |
create_thread = 0x0002 | |
vm_operation = 0x0008 | |
mem_reserve = 0x2000 | |
mem_commit = 0x1000 |