Skip to content

Instantly share code, notes, and snippets.

View misson20000's full-sized avatar
🤔

misson20000 misson20000

🤔
View GitHub Profile

things that will confuse you about ghidra if you're like me

Pointers are the wrong size in archives

Certain data types are "dynamically sized", such as pointers and a lot of the built-in integer types (looking at ulong). This means that their sizes depend on the context they're used in. In a program, your pointers will be the correct size for the architecture. Unfortunately, archives are not associated with a program and fall back on the defaults, where pointers are 4 bytes long. If you use a pointer in a struct and associate it into a program, the pointer will

@misson20000
misson20000 / exploit.rb
Created May 16, 2019 21:15
Exploit for A Dark Room on the Switch
# load with $ffi.eval($ffi.http_get("http://host.domain/path/to/exploit.rb"))
if $ffi
# if we're running under A Dark Room
$text = []
def tick(g)
y = 200
$text.each do |t|
g.labels << [20, y, t, 1, 0, 0, 0, 0]

m20k's list of bad ideas™

  • Tools
    • Charm: "A Hex Editor That Doesn't Suck." (~4/10/2020)
  • RE Projects
    • Oculus quest controllers. (1/13/2020)
  • Switch Stuff
    • Twili maintenance. (4/13/2020)
    • Lakebed: emulator-based testing rig for stratosphere (9/10/2019)
    • Build a rigorous test suite for rtld, capturing the differences between all the versions, and reimplement using the same test suite. misson20000/freertld (1/15/2019)
  • Reimplement LM using a ring-buffer to allow multiple-producer multiple-consumer log buffering. Add code to Twili for reading this out. (1/15/2019)
@misson20000
misson20000 / themeslaughter.user.js
Last active August 29, 2015 14:18
Ludum Dare Theme Slaughter Key Shortcuts
// ==UserScript==
// @name Ludum Dare Theme Slaughter Keyshortcuts
// @namespace xenotoad.net
// @include http://ludumdare.com/theme/*
// @version 1
// @grant none
// ==/UserScript==
// A: Good
// S: Slaughter
// ==UserScript==
// @name Colorku
// @namespace xenotoad.net
// @include http://show.websudoku.com/
// @version 1
// @grant none
// ==/UserScript==
var sudokuValues = document.getElementById("cheat").value;