This file contains hidden or 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
#ifndef _HSR_H_ | |
#define _HSR_H_ | |
#pragma once | |
#define HSRA(x) __hsr_a("\0" x) | |
#define HSRW(x) __hsr_w(L"\0" x) | |
#ifdef __cplusplus | |
extern "C" { | |
#endif |
This file contains hidden or 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 "bin2c.hpp" | |
#include <sstream> | |
#include <algorithm> | |
#include <iomanip> | |
#include <iostream> | |
#include <math.h> | |
void bin2c(std::string& out, const std::string& name, uint8_t* buffer, size_t size, size_t align) { | |
if (align % 2 != 0) | |
align = 1; |
This file contains hidden or 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 | |
#ifndef XS_H | |
#define XS_H | |
#include <stdint.h> | |
#include <intrin.h> | |
#include <stdio.h> | |
#ifdef __cplusplus | |
extern "C" { |
This file contains hidden or 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 | |
typedef union _variant { | |
bool b; | |
const bool cb; | |
bool* pb; | |
const bool* pcb; | |
char c; | |
char* pc; |
This file contains hidden or 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
- splitmix64 | |
- xoshiro256+ | |
- xoshiro256++ | |
- xoshiro256** |
This file contains hidden or 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
snprintf: https://github.com/mpaland/printf |
This file contains hidden or 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 "hwbp.h" | |
#include <deque> | |
#include <set> | |
#include <assert.h> | |
#include <TlHelp32.h> | |
#define DEBUG_GET_LOCAL_ENABLE(i,dr7) ((dr7 >> (i * 2)) & 0x1) | |
#define DEBUG_GET_CONDITION(i,dr7) ((dr7 >> (16 + i * 4)) & 0x3) | |
#define DEBUG_GET_LENGTH(i,dr7) ((dr7 >> (18 + i * 4)) & 0x3) |
This file contains hidden or 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
/* | |
base64.cpp and base64.h | |
base64 encoding and decoding with C++. | |
More information at | |
https://renenyffenegger.ch/notes/development/Base64/Encoding-and-decoding-base-64-with-cpp | |
Version: 2.rc.04 (release candidate) | |
Copyright (C) 2004-2017, 2020 René Nyffenegger |
This file contains hidden or 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
function var_dump(v) | |
function table_dump(val,num) | |
local space = ""; | |
if num == nil then | |
num = 0; | |
else | |
for i = 0, num - 1 do | |
space = space .. " "; | |
end |
This file contains hidden or 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 <Windows.h> | |
#include <iostream> | |
int main() | |
{ | |
MEMORY_BASIC_INFORMATION memBasicInfo; | |
DWORD64 curAddress = 0; | |
HANDLE hConsole = GetStdHandle( STD_OUTPUT_HANDLE ); | |
RtlSecureZeroMemory( &memBasicInfo, sizeof( MEMORY_BASIC_INFORMATION ) ); |