Skip to content

Instantly share code, notes, and snippets.

@buzzer-re
buzzer-re / gist:f0d0e3d39702f5babe07bc53cda11589
Created September 15, 2026 23:17
JIS -> ANSI - Karabiner complex modification.
{
"title": "JIS -> ANSI (positional)",
"rules": [
{
"description": "1. Number row shifted one position, restores backtick",
"manipulators": [
{"type":"basic","from":{"key_code":"1","modifiers":{"optional":["any"]}},"to":[{"key_code":"grave_accent_and_tilde"}]},
{"type":"basic","from":{"key_code":"2","modifiers":{"optional":["any"]}},"to":[{"key_code":"1"}]},
{"type":"basic","from":{"key_code":"3","modifiers":{"optional":["any"]}},"to":[{"key_code":"2"}]},
{"type":"basic","from":{"key_code":"4","modifiers":{"optional":["any"]}},"to":[{"key_code":"3"}]},
@buzzer-re
buzzer-re / gopclntab_recovery.py
Last active May 25, 2026 14:12
Go pclntab function recovery for IDA for Golang 1.2, 1.16, 1.18 and 1.20. Wrote with Codex (GPT)
# Minimal Go pclntab function recovery for IDA.
#
# Run from IDA with File > Script file..., or copy to IDA/plugins and invoke
# Edit > Plugins > Go pclntab recover.
import re
import struct
import ida_auto
import ida_bytes
@buzzer-re
buzzer-re / accept_ida_eula.py
Created April 19, 2026 20:05
Accept IDA's EULA for headless installations
#!/usr/bin/env python3
# Exactly what is already public https://github.com/HexRaysSA/ida-hcli/blob/main/src/hcli/lib/ida/__init__.py#L316
from __future__ import annotations
import os
import sys
from pathlib import Path
@buzzer-re
buzzer-re / scan_exports.py
Created August 9, 2023 02:44
Hunt for some exported function name on a given directory
# A Python script using LIEF to search a specific exported function name in a directories
# This is useful when you don't know the DLL name but (somehow) knows the exported function name
import sys
import lief
import os
import logging
lief.logging.set_level(lief.logging.LOGGING_LEVEL.CRITICAL)
DLL_CHAR = 0x2000
@buzzer-re
buzzer-re / clean_pe_overlay.py
Last active February 18, 2023 21:50
Clean junk PE overlay
# Clean PE files that have a lot of junk after its end to avoid AV scanners and slow down analysis tools
import pefile
import sys
import os
TRESHOLD = 100
if __name__ == '__main__':
if len(sys.argv) < 2:
@buzzer-re
buzzer-re / Unicorn-Engine-Documentation-English.md
Created September 16, 2022 02:09
Unicorn Engine Documentation English (from translate)

Unicorn-Engine API Documentation

Version 2.0.0

Official API document by kabeor

PDF File

Unicorn Engine is a lightweight, multi-platform, multi-architecture CPU simulator framework, the current version is based on [Qemu](https://www.qemu. org/) 5.0.1 development, it can replace the execution of CPU simulation code, commonly used in program virtualization, malicious code analysis, Fuzzing, etc. This project is used in [Qiling Virtual Framework] (https://github.com/qilingframework/ qiling), Radare2 Reverse Analysis Framework, GEF (pwn analysis plugin for gdb), [Pwndbg] (https://github.com/pwndbg/pwndbg), Angr Symbol Execution Framework and many other famous projects.

@buzzer-re
buzzer-re / OSX-XNU syscall list
Created November 3, 2021 14:30
xnu syscall list
0 AUE_NULL ALL { int nosys(void); } { indirect syscall }
1 AUE_EXIT ALL { void exit(int rval) NO_SYSCALL_STUB; }
2 AUE_FORK ALL { int fork(void) NO_SYSCALL_STUB; }
3 AUE_NULL ALL { user_ssize_t read(int fd, user_addr_t cbuf, user_size_t nbyte); }
4 AUE_NULL ALL { user_ssize_t write(int fd, user_addr_t cbuf, user_size_t nbyte); }
5 AUE_OPEN_RWTC ALL { int open(user_addr_t path, int flags, int mode) NO_SYSCALL_STUB; }
6 AUE_CLOSE ALL { int sys_close(int fd); }
7 AUE_WAIT4 ALL { int wait4(int pid, user_addr_t status, int options, user_addr_t rusage) NO_SYSCALL_STUB; }
8 AUE_NULL ALL { int enosys(void); } { old creat }
9 AUE_LINK ALL { int link(user_addr_t path, user_addr_t link); }
@buzzer-re
buzzer-re / virustotal.py
Last active October 14, 2021 13:27
Simple VirusTotal API client class for Python projects
import os
import json
import requests
class VirusTotal:
VT_API = 'https://www.virustotal.com/api/v3'
def __init__(self, key = None, query = None, limit_query=5):
self.valid = True
self.last_err = ''
@buzzer-re
buzzer-re / .zshrc
Created October 1, 2021 01:41
Intel binaries alias compilation in Apple Silicon
alias ccintel='clang -target x86_64-apple-macos10.12'
@buzzer-re
buzzer-re / organize.sh
Created March 16, 2021 02:30
Organize your directory by the filetype
#!/bin/bash
# This will organize a whole directory with each folder containing the filetype name
path=$1
if [ -z $path ]
then
echo "Usage $0 <path>"