Skip to content

Instantly share code, notes, and snippets.

@psifertex
psifertex / binexport_binja.zsh
Last active May 1, 2024 02:13
BinExport build script for Binary Ninja (macOS + Linux Only)
#!/usr/bin/env zsh
# Note:
# CMake, Clang, clang-format, Ninja, git and sed are required to build
#
# Note that currently there is a bug (https://github.com/google/binexport/issues/117)
# that requires applying this patch, remove when resolved
#
if [ -d ~/Downloads ]
@galenbwill
galenbwill / 1_Snippet_Instructions.txt
Last active September 28, 2022 18:17 — forked from psifertex/1_Snippet_Instructions.txt
my current collection of snippets
Welcome to Jordan's grab-bag of common Binary Ninja Snippets.
These snippest are meant to run with the Binary Ninja Snippets Plugin
(http://github.com/Vector35/snippets) though they can all also be pasted
directly into the python console or turned into stand-alone plugins if needed.
To install the entire collection at once, just install the Snippets plugin via
the plugin manager (CMD/CTL-SHIFT-M), confirm the Snippet Editor works
(Tool/Snippets/Snippet Editor), and unzip this bundle (Download ZIP above) into
your Snippets folder.
@psifertex
psifertex / 1_Snippet_Instructions.txt
Last active April 9, 2024 11:10
my current collection of snippets
Welcome to Jordan's grab-bag of common Binary Ninja Snippets.
These snippest are meant to run with the Binary Ninja Snippets Plugin
(http://github.com/Vector35/snippets) though they can all also be pasted
directly into the python console or turned into stand-alone plugins if needed.
To install the entire collection at once, just install the Snippets plugin via
the plugin manager (CMD/CTL-SHIFT-M), confirm the Snippet Editor works
(Tool/Snippets/Snippet Editor), and unzip this bundle (Download ZIP above) into
your Snippets folder.
@tprynn
tprynn / util.js
Last active February 1, 2022 13:34
Frida utility functions
module.exports = {
hexStringToIntArray: function(str) {
var res = []
for(var i = 0; i < str.length; i += 2) {
res.push(parseInt(str.substring(i, i+2), 16))
}
return res
},
byteArrayToHexString: function(array) {
@bNull
bNull / gist:7684598
Created November 27, 2013 23:01
python hexdump
def hexdump(src, length=16, sep='.'):
"""Modified from: https://gist.github.com/7h3rAm/5603718
"""
FILTER = ''.join([(len(repr(chr(x))) == 3) and chr(x) or sep for x in range(256)])
lines = []
for c in xrange(0, len(src), length):
chars = src[c:c+length]
hex = ' '.join(["%02x" % ord(x) for x in chars])
if len(hex) > 24:
hex = "%s %s" % (hex[:24], hex[24:])
@bNull
bNull / gist:6003874
Last active August 1, 2021 07:43
IDA Python script that will allow you to highlight a range of bytes and turn it into dwords (for manually fixing up tables or whatever).
# hotkey_utils.py - bNull
#
# Some useful shortcuts for binding to hotkeys. Current output/hotkeys:
#
# [+] Bound make_dwords to Ctrl-Alt-D
# [+] Bound make_cstrings to Ctrl-Alt-A
# [+] Bound make_offset to Ctrl-Alt-O
import idaapi
import idc