Skip to content

Instantly share code, notes, and snippets.

Avatar
💤
Sleeping

Allana Allana-git

💤
Sleeping
View GitHub Profile
@Allana-git
Allana-git / cpuid_rdtsc.hpp
Created Sep 18, 2021
vm cpu detection via cpuid and rdtsc
View cpuid_rdtsc.hpp
#include <iostream>
#include <thread>
constexpr std::uint32_t
dynamic_cycles = 10,
standard_sleep = 500,
vm_cycle_ratio = 100,
cycle_ratio = 75;
// -- rdtsc --
@Allana-git
Allana-git / processthreadsapi.hpp
Created Sep 14, 2021
processthreadsapi.h wrapper for c++23
View processthreadsapi.hpp
using process_information_t = PROCESS_INFORMATION;
using startup_info_t = STARTUPINFO;
using file_time_t = FILETIME; // minwinbase.h
using security_attributes_t = SECURITY_ATTRIBUTES; // minwinbase.h
struct process_threads_api_t {
auto create_thread ( security_attributes_t* thread_attributes, std::size_t stack_size, void* start_address,
void* parameter, std::int32_t creation_flags, std::int32_t* thread_id ) noexcept -> void* {
return CreateThread( thread_attributes, stack_size, reinterpret_cast <LPTHREAD_START_ROUTINE> ( start_address ), parameter, creation_flags,
reinterpret_cast <LPDWORD> ( &thread_id ) );
@Allana-git
Allana-git / injv_lib.v
Last active Sep 9, 2021
vlang win32 injector
View injv_lib.v
import cli
import os
const (
query_information = 0x0400
page_readwrite = 0x0004
create_thread = 0x0002
vm_operation = 0x0008
mem_reserve = 0x2000
mem_commit = 0x1000