Skip to content

Instantly share code, notes, and snippets.

@alvinhochun
alvinhochun / cfguard-for-mingw-w64.md
Last active October 29, 2023 08:31
Control Flow Guard (CFG/CFGuard) for mingw-w64

Control Flow Guard (CFG/CFGuard) for mingw-w64

Control Flow Guard is a security mitigation that verifies the target address of indirect calls. It works by having the compiler insert a check at indirect call sites to verify the validity of the call target, and also the linker write the necessary data and flags into the PE/COFF image to enable the feature on Windows' end.

@hax0kartik
hax0kartik / export_symbol.idc
Last active January 24, 2024 16:06
Export symbols from IDA to a ghidra importable symbol file
#include <idc.idc>
static FuncDump(f, start)
{
auto ea, str, count, ref;
auto end;
auto teststr;
ea = start;
@georgexsh
georgexsh / goto.py
Created September 18, 2017 07:47
python goto with system trace function
import sys
def j(lineno):
frame = sys._getframe().f_back
called_from = frame
def hook(frame, event, arg):
if event == 'line' and frame == called_from:
try:
frame.f_lineno = lineno
@elmarco
elmarco / .clang-format
Created August 29, 2017 15:51
qemu .clang-format
# https://clang.llvm.org/docs/ClangFormat.html
# https://clang.llvm.org/docs/ClangFormatStyleOptions.html
---
Language: Cpp
AlignAfterOpenBracket: Align
AlignConsecutiveAssignments: false # although we like it, it creates churn
AlignConsecutiveDeclarations: false
AlignEscapedNewlinesLeft: true
AlignOperands: true
AlignTrailingComments: false # churn
@bkaradzic
bkaradzic / orthodoxc++.md
Last active July 19, 2024 23:17
Orthodox C++

Orthodox C++

What is Orthodox C++?

Orthodox C++ (sometimes referred as C+) is minimal subset of C++ that improves C, but avoids all unnecessary things from so called Modern C++. It's exactly opposite of what Modern C++ suppose to be.

Why not Modern C++?