Skip to content

Instantly share code, notes, and snippets.

Avatar

Morgan numinit

View GitHub Profile
@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
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 = []
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>
@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 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
@numinit
numinit / shattered_length_extension.rb
Last active Feb 24, 2017
Usage: echo -n text_to_append | ruby shattered_length_extension.rb
View shattered_length_extension.rb
#!/usr/bin/env ruby
# output format:
# => collided sha1
# => message 1 base64
# => message 2 base64
require 'base64'
require 'digest/sha1'
View test.rb
def foo a, h
[a, h]
end
foo :bar, {
a: proc do
end,
b: proc do
end
}
@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>
@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