Skip to content

Instantly share code, notes, and snippets.

@gamozolabs
gamozolabs / proc_mem.py
Last active June 19, 2024 07:09
IDA Python loader for /proc/pid/mem without debugging a process
import re, subprocess, idaapi, ida_segment, ida_kernwin
# To install this, simply put it in your ida_install/loaders folder and open
# a `/proc/<pid>/mem` file!
#
# You might need to set `echo 0 > /proc/sys/kernel/yama/ptrace_scope` if you
# want to be able to dump processes depending on your system configuration.
# Check if the file is supported by our loader
def accept_file(li, filename):
@a0rtega
a0rtega / hexrays_allthethings.py
Last active March 28, 2025 04:03
IDA plugin to decompile all functions at once to cache the result and avoid IDA's on-the-fly decompilation
# Installation: Copy hexrays_allthethings.py to the plugins/ directory of IDA, restart IDA
# Usage: Edit->Plugins->"Run Hex-Rays decompiler on all functions" or use Ctrl+9
# Tested in IDA 7.6, Python 3
# https://github.com/a0rtega
import ida_kernwin, ida_idaapi, ida_auto
import tempfile, os
class HexRaysAllTheThingsPlugin(ida_idaapi.plugin_t):
flags = ida_idaapi.PLUGIN_KEEP
@SheldonWangRJT
SheldonWangRJT / Convert .mov or .MP4 to .gif.md
Last active April 28, 2025 07:08
Convert Movie(.mov) file to Gif(.gif) file in one command line in Mac Terminal

This notes is written by Sheldon. You can find me with #iOSBySheldon in Github, Youtube, Facebook, etc.

Need

Convert .mov/.MP4 to .gif

Reason

As a developer, I feel better to upload a short video when I create the pull request to show other viewers what I did in this PR. I tried .mov format directly got after finishing recording screen using Quicktime, however, gif offers preview in most web pages, and has smaller file size.

This is not limited to developer, anyone has this need can use this method to convert the files.

@olivierlemoal
olivierlemoal / idadif3.py
Last active January 19, 2023 17:48
Python 3 port of idadif.py
#!/usr/bin/env python3
# Small IDA .dif patcher
import re
import struct
from binascii import unhexlify
from sys import argv, exit
def patch(file, dif, revert=False):
code = open(file, 'rb').read()
@atdt
atdt / jenkins.js
Created April 7, 2012 17:28
An implementation of Jenkins's one-at-a-time hash
// An implementation of Jenkins's one-at-a-time hash
// <http://en.wikipedia.org/wiki/Jenkins_hash_function>
function hashString(key) {
var hash = 0, i = key.length;
while (i--) {
hash += key.charCodeAt(i);
hash += (hash << 10);
hash ^= (hash >> 6);
}