Skip to content

Instantly share code, notes, and snippets.

View chriscz's full-sized avatar
🍎
vs 🍊

Chris Coetzee chriscz

🍎
vs 🍊
  • Activitar
  • Brisbane, Australia
  • 18:36 (UTC +10:00)
View GitHub Profile
@chriscz
chriscz / filemonitor.py
Last active April 8, 2022 15:20
Python snippet for monitoring where files were opened
# This is free and unencumbered software released into the public domain.
#
# Anyone is free to copy, modify, publish, use, compile, sell, or
# distribute this software, either in source code form or as a compiled
# binary, for any purpose, commercial or non-commercial, and by any
# means.
#
# In jurisdictions that recognize copyright laws, the author or authors
# of this software dedicate any and all copyright interest in the
# software to the public domain. We make this dedication for the benefit
@chriscz
chriscz / mucow.c
Last active November 14, 2021 21:07
Dirty COW PoC with multipage support
/*
* Multipage COW PoC
*/
#include <fcntl.h>
#include <pthread.h>
#include <string.h>
#include <stdio.h>
#include <stdint.h>
#include <sys/mman.h>
#include <sys/stat.h>
@chriscz
chriscz / timewn.py
Last active January 6, 2021 02:35
A python script to notify you of your current TimeWarrior task
#!/usr/bin/env python
# Notifies the user of the curently active TimeWarrior task every m minutes (default 10min).
# Requirements
# - python 2.7
# - pynotify
# Usage:
# python timewn.py [optional seconds]
import sys
import pynotify