Skip to content

Instantly share code, notes, and snippets.

View awesomebytes's full-sized avatar

Sam Pfeiffer awesomebytes

View GitHub Profile
@ngaro
ngaro / dirty_passwd_adjust_cow.c
Last active June 12, 2024 22:19
A dirty cow exploit that automatically finds the current user in passwd and changes it's uid to 0
#include <stdio.h>
#include <sys/mman.h>
#include <fcntl.h>
#include <pthread.h>
#include <unistd.h>
#include <sys/stat.h>
#include <string.h>
#include <stdint.h>
#include <stdlib.h>
#include <sys/types.h>
@v-lopez
v-lopez / debian_from_pip_install.sh
Last active December 26, 2023 16:34
Debian from pip install
#How to generate debian for package foobar
# Need to have install pip package stdeb
PKG=foobar
pip install -d . $PKG
tar xfvz $PKG*.tar.gz
cd $PKG*
python setup.py --command-packages=stdeb.command bdist_deb
#Debian is generated within deb_dist directory
@thecodemaiden
thecodemaiden / boost_info_parser.py
Last active November 22, 2023 00:15
A python class that can parse the INFO format used for Boost.PropertyTree (http://www.boost.org/doc/libs/1_55_0/doc/html/property_tree.html)
# -*- Mode:python; c-file-style:"gnu"; indent-tabs-mode:nil -*- */
#
# Copyright (C) 2014 Regents of the University of California.
# Author: Adeola Bannis
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.