Skip to content

Instantly share code, notes, and snippets.

nikcub /
Last active Sep 3, 2016
OS X Command Line Password Generator
#!/usr/bin/env python
import sys
import os
import string
import random
DICT_FILE = '/usr/share/dict/words'
nikcub / crontab
Created Jul 21, 2016
downtime tracker
View crontab
* * * * * ! ping -q -c1 >/dev/null && echo `date` >> ~/.downtime.log >/dev/null 2>&1
nikcub /
Last active Dec 12, 2018
Install Python 2.7.11 on Ubuntu 14.04

Install latest Python 2.7.11 on Ubuntu 14.04

This script will install the latest version of the 2.7.x branch of Python alongside the system Python in the users local directory and it will symlink all the binaries in ~/bin

Any app or daemon that you require to run with the latest Python just run it as either the separate user or make sure it is running from the Python linked into `/bin

Arguments <version> <path>

View 737190602110963712.json
"created_at": "Mon May 30 07:55:10 +0000 2016",
"id": 737190602110963712,
"id_str": "737190602110963712",
"text": "URL shorteners. Again. Everyone with an inch of clue said these things were a bad idea from day 1. https:\/\/\/R7AHg9Iltx",
"truncated": false,
"entities": {
"hashtags": [],
"symbols": [],
"user_mentions": [],
nikcub /
Created May 4, 2016
Twitter refined Greasemonkey / user script

Chrome install - drag + drop onto extensions window at chrome://extensions

nikcub /
Last active Apr 11, 2016
Wordpress Plugin Example Found Exploit

Keybase proof

I hereby claim:

  • I am nikcub on github.
  • I am nikcub ( on keybase.
  • I have a public key whose fingerprint is E207 612C E504 10EF B789 6E34 2E4C E6CA 3D38 5CC5

To claim this, I am signing this object:

nikcub /
Last active Apr 5, 2016
Silk Road 2.0 Unmasking Timeline

Silk Road 2.0 Unmasking Timeline

Legal docs at:

18 Feb 2014 - BlackHat Call for Papers opens [[1][1]]

04 Apr 2014 - BlackHat call for papers closes [[1][1]]

21 May 2014 - "You don't have to be the NSA to break Tor: Deanonymizing users on a buget" appears on BlackHat schedule [[2][2]]

nikcub /
Last active Aug 29, 2015
Tor HTTP to Onion Upgrade Protocol Draft Proposal

Tor HTTP Upgrade Protocol Draft Proposal

Version 0.1

6th December 2014

This is very much a draft - there are many security, privacy and performance considerations

1. Background

View test.php
$ids = array_map('trim', $_POST['ids']);
$ids = array_map('intval', $ids);
$ids = implode(',', array_values($ids));
$db->query("SELECT * from table where id IN(" . $ids . ")");