Skip to content

Instantly share code, notes, and snippets.

View filipposc5's full-sized avatar

Filippos Chalvatzoglou filipposc5

View GitHub Profile
@filipposc5
filipposc5 / gist:ad4d529ac54fb09ce86de37b721a1baa
Last active March 21, 2017 16:59 — forked from sawicki-maciej/gist:1242279
This D-trace script lists all run programs with their arguments/pid and ppid(edited) - works with OSX
#!/usr/sbin/dtrace -C -s
#pragma D option quiet
proc:::exec-success,proc::posix_spawn:exec-success,proc::__mac_execve:exec-success
{
this->isx64=(curproc->p_flag & P_LP64)!=0;
#define SELECT_64_86(x64, x86) (this->isx64 ? (x64) : (x86))
#define GET_POINTER(base, offset) (user_addr_t)SELECT_64_86(*(uint64_t*)((base)+sizeof(uint64_t)*(offset)), *(uint32_t*)((base)+sizeof(uint32_t)*(offset)))
@filipposc5
filipposc5 / git-crypt-delete
Last active October 12, 2015 14:48 — forked from ashb/git-crypt-delete
git-crypt-delete
#!/bin/bash
set -o pipefail
case "$1" in
--list|-l)
list_only=1
;;
--dry-run|-n)