Skip to content

Instantly share code, notes, and snippets.

Avatar

Morgan numinit

View GitHub Profile
@numinit
numinit / dtext.c
Last active Jan 25, 2021
Dumps in-memory text segments by single-stepping with ptrace. Usage: dtext <program> [args...]
View dtext.c
/* Dumps in-memory text segments by single-stepping with ptrace.
* Usage: dtext <program> [args...]
*/
#define _GNU_SOURCE
#include <stdio.h>
#include <unistd.h>
#include <stdbool.h>
#include <stdlib.h>
View 0001-Add-quirks-for-Yuan-Yuan-Enterprises-capture-cards.patch
From b8425aaca49e8f88d114426626cd8266e1e37d34 Mon Sep 17 00:00:00 2001
From: Morgan Jones <me@numin.it>
Date: Sun, 13 Mar 2016 00:56:04 +0000
Subject: [PATCH] Add quirks for Yuan Yuan Enterprises capture cards
---
drivers/pci/quirks.c | 7 +++++++
include/linux/pci_ids.h | 4 ++++
2 files changed, 11 insertions(+)
@numinit
numinit / example-output.txt
Last active Jul 9, 2019
Point this script at a subfolder in your PUBG demos directory. Doesn't get all events (there are more in the UE4 checkpoint files), but will print some interesting stats about your match.
View example-output.txt
# ruby pubg-summarize.rb /mnt/c/Users/numinit/AppData/Local/TslGame/Saved/Demos/match.bro.official.2017-pre6.na.squad-fpp.2017.12.16.8585b819-02de-428e-bf07-19d9e721b782__USER__76561198040786185
Playing squad-fpp on Desert_Main - took 29.96 minutes
0.00: Weather: Clear, level Weather_Desert_Clear, weight 3
0.00: Map Desert_Main, weather Weather_Desert_Clear, region na, recorded by Hobocop, 0 players, 0 teams
=> Player senord, team 26 (ranked 0), 0 headshots, 0 kills, 0.00 damage, longest kill 0.00m, 0.00km covered
=> Player groxers, team 26 (ranked 0), 0 headshots, 0 kills, 0.00 damage, longest kill 0.00m, 0.00km covered
=> Player Hobocop, team 26 (ranked 0), 0 headshots, 0 kills, 0.00 damage, longest kill 0.00m, 0.15km covered
101.89: Berry-o knocked out UnnamedPone
105.52: Datidol knocked out T3lamon
@numinit
numinit / numinit.clr
Last active Sep 13, 2018
my IDA colors
View numinit.clr
[DISASM]
000000 //Instruction
aaaaaa //Directive
f3c5ff //Macro name
7e6082 //Register name
666666 //Other keywords
ffffff //Dummy data name
b9ebeb //Dummy code name
b9ebeb //Dummy unexplored name
bbecff //Hidden name
View img2webgl.py
from PIL import Image
import sys
def maskify(filename):
im = Image.open(filename)
px = im.load()
width, height = im.size
stride = 32
rows = []
@numinit
numinit / dexstrings.c
Last active Jul 1, 2017
dexstrings - see older revisions for what it used to output before I made it less verbose
View dexstrings.c
/*
* gcc -Os -odexstrings dexstrings.c
* ./dexstrings /path/to/dex.dex
*/
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#include <ctype.h>
@numinit
numinit / food.c
Last active Jun 25, 2017
Google CTF: solving food the hard way
View food.c
/* Made for the Google 2017 CTF
* Author: Morgan Jones <me at numin dot it>
*
* Compile: clang -std=gnu99 -fopenmp -O3 -funroll-loops -fomit-frame-pointer -ofood food.c
* Run: ./food <start percentage> <end percentage> [num threads=autodetect]
*/
#include <unistd.h>
#include <stdint.h>
#include <stdio.h>
View foodfight.c
#include <stdio.h>
#include <stdlib.h>
#include <dlfcn.h>
#include <stdint.h>
#include <unistd.h>
#include <stddef.h>
#include <stdbool.h>
#include <signal.h>
#include <jni.h>
View kryptos.rb
#!/usr/bin/env ruby
# usage: echo <string> | ruby kryptos.rb
# assumes you have a spreadsheet or something open
# with the top left character (space) at column A, row 1
k4 = <<EOF.chomp.lines.map(&:chomp)
OBKR
UOXOGHULBSOLIFBBWFLRVQQPRNGKSSO
TWTQSJQSSEKZZWATJKLUDIAWINFBNYP