Skip to content

Instantly share code, notes, and snippets.

@nikcub
nikcub / genpass.py
Last active September 3, 2016 02:30
OS X Command Line Password Generator
#!/usr/bin/env python
import sys
import os
import string
import random
DICT_FILE = '/usr/share/dict/words'
DEFAULT_LENGTH = 24
@nikcub
nikcub / crontab
Created July 21, 2016 02:34
downtime tracker
* * * * * ! ping -q -c1 www.google.com >/dev/null && echo `date` >> ~/.downtime.log >/dev/null 2>&1
@nikcub
nikcub / README.md
Last active December 12, 2018 16:14
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

install-python.sh <version> <path>

{
"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:\/\/t.co\/R7AHg9Iltx",
"truncated": false,
"entities": {
"hashtags": [],
"symbols": [],
"user_mentions": [],
@nikcub
nikcub / README.md
Created May 4, 2016 22:06
Twitter refined Greasemonkey / user script

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

@nikcub
nikcub / README.md
Last active April 11, 2016 19:14
Wordpress Plugin Example Found Exploit
@nikcub
nikcub / keybase.md
Created March 9, 2015 22:58
keybase.md

Keybase proof

I hereby claim:

  • I am nikcub on github.
  • I am nikcub (https://keybase.io/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
nikcub / sr2.md
Last active April 5, 2016 15:44
Silk Road 2.0 Unmasking Timeline

Silk Road 2.0 Unmasking Timeline

Legal docs at: http://files.nikcub.com/sr/

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
nikcub / tor-upgrade.md
Last active August 29, 2015 14:10
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

$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 . ")");