Instantly share code, notes, and snippets.

zeffy

  • China
View GitHub Profile
@zeffy
zeffy / DPAPI.cpp
Last active Feb 5, 2019
thin wrapper around CryptProtectData/CryptUnprotectData
View DPAPI.cpp
#include "DPAPI.hpp"
#include <Windows.h>
#include <intsafe.h>
#include <dpapi.h>
#include <cstdlib>
#include <vector>
//
bool DPAPI::ProtectImpl(
@zeffy
zeffy / recursion_guard.hpp
Last active Jan 30, 2019
Takes a TLS index from TlsAlloc and allows you to guard sections of code against recursion. Useful when hooking low level APIs.
View recursion_guard.hpp
#include "pch.h"
class recursion_guard
{
private:
DWORD dw;
public:
recursion_guard(DWORD dwTlsIndex) : dw(dwTlsIndex)
{
View UnfuckVS16.bat
@echo off
fltmc >nul 2>&1 || (
echo This batch script requires administrator privileges. Right-click on
echo the script and select "Run as administrator".
goto :die
)
rem Change this path if you are using VS15
set "VS_INSTALL_DIR=%ProgramFiles(x86)%\Microsoft Visual Studio\2019\Preview"
View uBO filter for eeeeeeeeeeee... spam.md

uBO filters for "starred" notifications and trending repositories of spam projects like this and this...

github.com##.news div.watch_started:has(a:has-text(/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee/))
github.com##.Collection article.Story:has(a:has-text(/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee/))
@zeffy
zeffy / bnsdat.bt
Last active Sep 30, 2018
Blade & Soul .dat file template for 010 Editor
View bnsdat.bt
//------------------------------------------------
//--- 010 Editor v8.0.1 Binary Template
//
// File: BNSDat.bt
// Authors: zeffy
// Version: 20180912
// Purpose: Parse BNSDAT archives.
// Category: Archives
// File Mask: *.dat
// ID Bytes: 55 4F 53 45 44 41 4C 42
@zeffy
zeffy / hex_dump.c
Last active Feb 9, 2019
Dump byte arrays and data structures to hex with ASCII (32- and 64-bit support)
View hex_dump.c
#include <stdlib.h>
#include <stdint.h>
#include <stdbool.h>
#ifdef _WIN64
#define ui3264toa_s _ui64toa_s
#else
#define ui3264toa_s _ultoa_s
#endif