Skip to content

Instantly share code, notes, and snippets.

@ngaro
ngaro / dirty_passwd_adjust_cow.c
Last active November 20, 2023 03:44
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>
@saxicek
saxicek / ct.py
Last active January 31, 2016 16:22
iVysilani RTMP -> HLS
#!/usr/bin/env python3
#
# částečně inspirováno ctsream od petr_p
__author__ = "Jakub Lužný"
__desc__ = "ČT (iVysílání)"
__url__ = r"https?://www\.ceskatelevize\.cz/(porady|ivysilani)/.+"
import re,os.path, urllib.request, urllib.parse, json, http.cookiejar, logging
import xml.etree.ElementTree as ElementTree
#!/bin/bash
# $Id: dm-cache-status,v 1.1 2014/08/19 09:02:46 oernii Exp $
# Status
# ------
#
# <metadata block size> <#used metadata blocks>/<#total metadata blocks>
# <cache block size> <#used cache blocks>/<#total cache blocks>
# <#read hits> <#read misses> <#write hits> <#write misses>
# <#demotions> <#promotions> <#dirty> <#features> <features>*