Skip to content

Instantly share code, notes, and snippets.

View mrexodia's full-sized avatar
🍍

Duncan Ogilvie mrexodia

🍍
View GitHub Profile
@Boerde
Boerde / githook-astyle.sh
Last active August 13, 2017 01:00 — forked from kblomqvist/githook-astyle.sh
Git post-commit hook to check C/C++ source file format using astyle (Artistic Style) + automatic creation of a commit with a fix
#!/bin/bash
# Installation:
# cd my_gitproject
# wget -O pre-commit.sh http://tinyurl.com/mkovs45
# ln -s ../../pre-commit.sh .git/hooks/pre-commit
# chmod +x pre-commit.sh
function have_uncommitted()
{
lines=$(git diff --name-only | wc -l)
if(GlobalVariable* GA = M.getGlobalVariable("llvm.global.annotations")) {
// the first operand holds the metadata
for (Value *AOp : GA->operands()) {
// all metadata are stored in an array of struct of metadata
if (ConstantArray *CA = dyn_cast<ConstantArray>(AOp)) {
// so iterate over the operands
for (Value *CAOp : CA->operands()) {
// get the struct, which holds a pointer to the annotated function
// as first field, and the annotation as second field
if (ConstantStruct *CS = dyn_cast<ConstantStruct>(CAOp)) {

To get the docker images:

docker pull klee/klee

docker pull angr/angr

KLEE

Start docker:

@ldzm
ldzm / libclang_show_ast.py
Created November 4, 2016 14:27 — forked from anonymous/libclang_show_ast.py
Show the AST of a translation unit with libclang and python
# inspired by http://eli.thegreenplace.net/2011/07/03/parsing-c-in-python-with-clang/
import sys
import clang.cindex
def verbose(*args, **kwargs):
'''filter predicate for show_ast: show all'''
return True
def no_system_includes(cursor, level):
'''filter predicate for show_ast: filter out verbose stuff from system include files'''
@Jinmo
Jinmo / jni_all.h
Created May 26, 2017 07:36
Useful when reversing JNI on IDA Pro
/*
* Copyright (c) 1996, 1998, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
/*
* Module Name:
* WorkingSetWatch.cpp
*
* Abstract:
* Tracks page faults that occur within the process.
*
* NOTE: This is not compatible with Wow64 and must be run as a 64-bit
* program on x64 and a 32-bit program on x86.
*
@magjac
magjac / README.md
Last active September 21, 2024 15:25
d3-graphviz demo application showing association of SVG elements with DOT source elements

Open the console to see detalied info about what's going on

@mgeeky
mgeeky / dtpscan.py
Last active February 27, 2026 18:45
DTP Scanner - simple script trying to determine type of configured switchport and DTP negotation mode in order to assist in VLAN Hopping attacks.
#!/usr/bin/python
#
# Simple script showing configuration of the DTP protocol on
# the switch's port. This reconessaince will be helpful for performing
# VLAN Hopping attacks.
#
# Mariusz B. / mgeeky, '18
#
@kingseva
kingseva / allocterminal.cpp
Created January 27, 2018 15:11
Example redirecting cout/stdout to allocated terminal in GUI programs.
#include "rang.hpp"
#include <windows.h>
#include <cstdlib>
void BindStdHandlesToConsole()
{
//TODO: Add Error checking.
// Redirect the CRT standard input, output, and error handles to the console
@atar-axis
atar-axis / win_re_processes.txt
Last active July 29, 2024 18:00
List of filenames and Window ClassNames related to reverse engineering (which malware may look for)
Filename : ClassName - Program
Debuggers/Disassemblers:
---
OLLYDBG.exe : OllyDbg - OllyDbg
x32dbg.exe : (Qt5QWindowIcon) - x32Dbg
x64dbg.exe : (Qt5QWindowIcon) - x64Dbg
x96dbg.exe : (#32770) - x32/x64Dbg Launcher
idag.exe : TIdaWindow - IDA native Windows (deprecated)