Skip to content

Instantly share code, notes, and snippets.

View mrexodia's full-sized avatar
❤️
‌‌

Duncan Ogilvie mrexodia

❤️
‌‌
View GitHub Profile
@mrexodia
mrexodia / bzexcluderules_editable.xml
Created March 9, 2023 09:38
Backblaze exclusions
View bzexcluderules_editable.xml
<?xml version="1.0" encoding="UTF-8" ?>
<bzexclusions>
<!-- Editable Exclusions: You may edit this file. WARNING: ONLY FOR ADVANCED USERS! -->
<!-- To restore the defaults, remove this file (it will return).-->
<!-- -->
<!-- Rule 1: All the excludefname_rule below are case insensitive. -->
<!-- -->
<!-- Rule 2: a file must match ALL criteria on the line to be excluded from backup. -->
@mrexodia
mrexodia / IDAReferences.java
Last active May 5, 2023 23:12
Actually nice to use references for Ghidra
View IDAReferences.java
// Emulate IDA's xref window
//@author Duncan Ogilvie
//@category Analysis
//@keybinding X
//@menupath Navigation.IDA References
//@toolbar
// Reference: https://www.reddit.com/r/ghidra/comments/h07yoo/comment/fukuj1c
import ghidra.app.cmd.data.CreateArrayCmd;
import ghidra.app.decompiler.ClangFuncNameToken;
@mrexodia
mrexodia / main.cpp
Last active January 15, 2023 22:18
Remote<T>
View main.cpp
#include <cstdio>
#include <cstdint>
#include <cstring>
#include <type_traits>
#include <Windows.h>
void read_memory(const void* address, void* dst, size_t len)
{
printf("read_memory(%p, %zu)\n", address, len);
@mrexodia
mrexodia / # ccls - 2021-12-19_20-28-26.txt
Created December 19, 2021 19:37
ccls on macOS 10.15.7 - Homebrew build logs
View # ccls - 2021-12-19_20-28-26.txt
Homebrew build logs for ccls on macOS 10.15.7
Build date: 2021-12-19 20:28:26
@mrexodia
mrexodia / LowUtilities.cpp
Last active September 20, 2023 08:09 — forked from D4stiny/LowUtilities.cpp
A dependency-less implementation of GetModuleHandle and GetProcAddress.
View LowUtilities.cpp
//
// An implementation of GetModuleHandle and GetProcAddress that works with manually mapped modules, forwarded exports,
// without a CRT standard library, and uses no Windows API or dependencies.
//
// Author: Bill Demirkapi
// License: MIT, appended at the bottom of this document if you care about licensing and want to credit me in your own project.
//
#include <Windows.h>
#include <winternl.h>
@mrexodia
mrexodia / IntelPIN.cmake
Last active May 9, 2023 15:15
IntelPIN.cmake
View IntelPIN.cmake
# Website: https://software.intel.com/content/www/us/en/develop/articles/pin-a-binary-instrumentation-tool-downloads.html
# License: https://software.intel.com/sites/landingpage/pintool/pinlicense.txt
# This snippet: https://gist.github.com/mrexodia/f61fead0108603d04b2ca0ab045e0952
# TODO: lunix support
# Thanks to Francesco for showing me this method
CPMAddPackage(
NAME IntelPIN
VERSION 3.18
URL https://software.intel.com/sites/landingpage/pintool/downloads/pin-3.18-98332-gaebd7b1e6-msvc-windows.zip
View gist:84ab907ea678d86e37227ddfef8c56e2
https://www103.zippyshare.com/v/bcTx7d5Y/file.html
View regexmagic.h
// License: public domain/CC0
#include <regex>
#include <string>
#include <cstdio>
#include <utility>
#include <climits>
#include <cinttypes>
bool parseNumber(const char* str, uint64_t& result, int radix = 0)
{
@mrexodia
mrexodia / capslayer.ahk
Created November 24, 2019 23:27
capslayer.ahk
View capslayer.ahk
; Source: https://www.autohotkey.com/boards/viewtopic.php?p=131059#p131059
CapsLock::
; KeyWait, CapsLock ; wait for Capslock to be released
; KeyWait, CapsLock, D T0.2 ; and pressed again within 0.2 seconds
; if ErrorLevel
; return
; else if (A_PriorKey = "CapsLock")
; SetCapsLockState, % GetKeyState("CapsLock","T") ? "Off" : "On"
return
@mrexodia
mrexodia / reverseshell.cpp
Last active November 5, 2023 13:17
Reverse shell winapi c++ windows cmd. Useful for debugging production environments.
View reverseshell.cpp
#include <winsock2.h>
#include <windows.h>
#include <ws2tcpip.h>
#pragma comment(lib, "Ws2_32.lib")
/*
THIS IS FOR DEBUGGING ONLY, DO NOT RUN THIS CODE IN PRODUCTION UNDER ANY CIRCUMSTANCE!
https://github.com/dev-frog/C-Reverse-Shell/blob/master/re.cpp
https://github.com/tudorthe1ntruder/reverse-shell-poc/blob/master/rs.c
https://eternallybored.org/misc/netcat/