Skip to content

Instantly share code, notes, and snippets.

View emptymonkey's full-sized avatar
🎨
Focusing

empty emptymonkey

🎨
Focusing
View GitHub Profile
@emptymonkey
emptymonkey / gist:7d3cb6caef94fa951a65d12e8d3cf3c0
Created May 10, 2018 00:10
Read implies Execute and Linker/Loader suid abuse.
# First, let's demonstrate that read implies execute.
cp /usr/bin/id .
ls -l ./id
./id
chmod a-x ./id
ls -l id
readelf -l ./id | grep "program interpreter"
ls -l /lib64/ld-linux-x86-64.so.2
ls -l /lib/x86_64-linux-gnu/ld-2.23.so
@emptymonkey
emptymonkey / dictionary.js
Created January 25, 2020 20:57 — forked from arimai/dictionary.js
Read and parse files using streams in node.js to build a dictionary object mapping word=>frequency.
const fs = require('fs');
const Parse = require('./parser');
//constructor
function CreateDictionary(){
this.dictionary = {};
}
// reads files from directory, wait for files to get parsed and then return dictionary
CreateDictionary.prototype.parseDirectory = function(dirpath){
return new Promise((resolve,reject) => {
@emptymonkey
emptymonkey / cheat_sheet.txt
Created June 12, 2022 04:48
GDB cheat sheet
GDB commands by function - simple guide
---------------------------------------
More important commands have a (*) by them.
Startup
% gdb -help print startup help, show switches
*% gdb object normal debug
*% gdb object core core debug (must specify core file)
%% gdb object pid attach to running process
% gdb use file command to load object