Skip to content

Instantly share code, notes, and snippets.

View stuartjash's full-sized avatar

Stuart Ashenbrenner stuartjash

View GitHub Profile
@richiercyrus
richiercyrus / ESF.ipynb
Last active July 14, 2023 19:08
Juypter Notebook demonstrating usefulness of Apple's Endpoint Security Framework.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@kainjow
kainjow / libproc_example.swift
Created November 24, 2018 20:09
Swift example of C libproc API
import Darwin
// Call proc_listallpids once with nil/0 args to get the current number of pids
let initialNumPids = proc_listallpids(nil, 0)
// Allocate a buffer of these number of pids.
// Make sure to deallocate it as this class does not manage memory for us.
let buffer = UnsafeMutablePointer<pid_t>.allocate(capacity: Int(initialNumPids))
defer {
buffer.deallocate()