Skip to content

Instantly share code, notes, and snippets.

View melvyn2's full-sized avatar
🌂
🫑

Melvyn melvyn2

🌂
🫑
  • California
  • 22:36 (UTC -07:00)
View GitHub Profile
@melvyn2
melvyn2 / hw_detour.c
Last active June 27, 2023 20:01 — forked from kybernetyk/hw_breakpoint.c
x86_64 Hardware Breakpoint detours on macOS
#include <stdlib.h>
#include <stdio.h>
#include <stdbool.h>
#include <stdint.h>
#include <signal.h>
#include <mach/mach_init.h>
#include <mach/mach_port.h>
#include <mach/task.h>
#include <mach/thread_act.h>
@melvyn2
melvyn2 / build.log
Created July 20, 2022 02:22
rust/mingw-w64 linker errors on linux with Qt
[truncated]
Compiling graph v0.1.0 (/tmp/qmetaobject-rs/examples/graph)
error: linking with `x86_64-w64-mingw32-gcc` failed: exit status: 1
|
= note: "x86_64-w64-mingw32-gcc" "-fno-use-linker-plugin" "-Wl,--dynamicbase" "-Wl,--disable-auto-image-base" "-m64" "-Wl,--high-entropy-va" "/home/melvyn/.local/share/rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-pc-windows-gnu/lib/rsbegin.o" "/tmp/rustcHO2gMu/symbols.o" "/tmp/qmetaobject-rs/target/x86_64-pc-windows-gnu/debug/deps/graph-35d8356c660e069b.10fsfev1lxpcx23i.rcgu.o" "/tmp/qmetaobject-rs/target/x86_64-pc-windows-gnu/debug/deps/graph-35d8356c660e069b.10pqij5usuj14f0r.rcgu.o" "/tmp/qmetaobject-rs/target/x86_64-pc-windows-gnu/debug/deps/graph-35d8356c660e069b.15b9a1cpme5k0b1t.rcgu.o" "/tmp/qmetaobject-rs/target/x86_64-pc-windows-gnu/debug/deps/graph-35d8356c660e069b.16yia41yodp79349.rcgu.o" "/tmp/qmetaobject-rs/target/x86_64-pc-windows-gnu/debug/deps/graph-35d8356c660e069b.1cu9088vwhl34qv0.rcgu.o" "/tmp/qmetaobject-rs/target/x86_
@melvyn2
melvyn2 / convert.py
Last active December 1, 2022 10:18
Converts a json-based maFile to the NSKeyedArchiver plist, for use on iOS
import sys
import json
from bpylist import archiver
with open(sys.argv[1]) as f:
secrets = json.load(f)
print('Loaded secret dict with', len(secrets), 'keys.')
sec_dict = {}
sec_dict.update({'shared_secret': secrets['shared_secret']})