A "Best of the Best Practices" (BOBP) guide to developing in Python.
- "Build tools for others that you want to be built for you." - Kenneth Reitz
- "Simplicity is alway better than functionality." - Pieter Hintjens
requests==2.4.3 | |
rsa==3.1.4 |
#!/usr/bin/env python | |
""" | |
An example demonstrating how to use xpyb (xcb bindings for Python) to take a | |
full-screen screenshot. | |
""" | |
# Meta | |
__version__ = '1.0' | |
__version_info__ = (1, 0) |
about:config settings to harden the Firefox browser. Privacy and performance enhancements.
To change these settings type 'about:config' in the url bar.
Then search the setting you would like to change and modify the value. Some settings may break certain websites from functioning and
rendering normally. Some settings may also make firefox unstable.
I am not liable for any damages/loss of data.
Not all these changes are necessary and will be dependent upon your usage and hardware. Do some research on settings if you don't understand what they do. These settings are best combined with your standard privacy extensions
(HTTPS Everywhere No longer required: Enable HTTPS-Only Mode, NoScript/Request Policy, uBlock origin, agent spoofing, Privacy Badger etc), and all plugins set to "Ask To Activate".
import functools | |
def chain(*fs, reverse=True): | |
def dec(g): | |
@functools.wraps(g) | |
def wrapper(*args, **kwargs): | |
functions = reversed(fs) if reverse else fs | |
a = lambda m, f: f(m) | |
return functools.reduce(a, functions, g(*args, **kwargs)) |
#!/usr/bin/env python3 | |
"""Easily put time restrictions on things | |
Note: Requires Python 3.x | |
Usage as a context manager: | |
``` | |
with timeout(10): | |
something_that_should_not_exceed_ten_seconds() | |
``` |
/* | |
* A PTRACE_POKEDATA variant of CVE-2016-5195 | |
* should work on RHEL 5 & 6 | |
* | |
* (un)comment correct payload (x86 or x64)! | |
* $ gcc -pthread c0w.c -o c0w | |
* $ ./c0w | |
* DirtyCow root privilege escalation | |
* Backing up /usr/bin/passwd.. to /tmp/bak | |
* mmap fa65a000 |
<html> | |
<body> | |
<script> | |
// @author: ideawu | |
// @link: http://www.ideawu.net/blog/archives/1021.html | |
var swap_count = 0; | |
var cmp_count = 0; | |
// https://gist.github.com/wintercn/c30464ed3732ee839c3eeed316d73253 | |
function wintercn_qsort(arr, start, end){ |