Skip to content

Instantly share code, notes, and snippets.

dpk dpk

Block or report user

Report or block dpk

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@ligurio
ligurio / pledge_unveil_support.md
Last active Aug 4, 2019
Support of OpenBSD pledge(2) and unveil(2) in programming languages
View pledge_unveil_support.md
View freebsd_on_mbp.md

FreeBSD on a MacBook Pro

Since 2008 or 2009 I work on Apple hardware and OS: back then I grew tired of Linux desktop (which is going to be MASSIVE NEXT YEAR, at least since 2001), and switched to something that Just Works. Six years later, it less and less Just Works, started turning into spyware and nagware, and doesn't need much less maintenance than Linux desktop — at least for my work, which is system administration and software development, probably it is better for the mythical End User person. Work needed to get software I need running is not less obscure than work I'd need to do on Linux or othe Unix-like system. I am finding myself turning away from GUI programs that I used to appreciate, and most of the time I use OSX to just run a terminal, Firefox, and Emacs. GUI that used to be nice and unintrusive, got annoying. Either I came full circle in the last 15 years of my computer usage, or the OSX experience degraded in last 5 years. Again, this is from a sysadmin/developer ki

@jblyberg
jblyberg / suid-wrapper.c
Created Oct 16, 2012
A very small C wrapper for running shell scripts suid. Pretty dangerous, but handy.
View suid-wrapper.c
#include <unistd.h>
#include <errno.h>
main( int argc, char ** argv, char ** envp )
{
if( setgid(getegid()) ) perror( "setgid" );
if( setuid(geteuid()) ) perror( "setuid" );
envp = 0; /* blocks IFS attack on non-bash shells */
system( "/path/to/bash/script", argv, envp );
perror( argv[0] );
View extract_idm_file.rb
#!/usr/bin/env ruby
require 'zlib'
require 'rexml/document'
File.open("CONTENT.tda") do |zipped_f|
File.open("CONTENT.tda.tdz", "r") do |index_f|
while record = index_f.read(8)
size = record.unpack("V*")[1]
You can’t perform that action at this time.