Skip to content

Instantly share code, notes, and snippets.

@NSkelsey
NSkelsey / evil_user_agent.zeek
Created September 22, 2020 15:26
Simple zeek script
@load base/protocols/http
module EvilUserAgents;
export {
const evil_user_agents = /curl\/[0-9.]+/ &redef;
}
event HTTP::log_http(rec: HTTP::Info)
{
@NSkelsey
NSkelsey / periodic_sender.go
Last active June 11, 2019 16:54
Periodic Pointcoin sender
package main
import (
"flag"
"fmt"
"io/ioutil"
"log"
"github.com/PointCoin/btcnet"
"github.com/PointCoin/btcrpcclient"
@NSkelsey
NSkelsey / bitcoin.conf
Created October 10, 2014 20:57
supervisor bitcoin configuration
[program:bitcoin]
command = /usr/local/bin/bitcoind --datadir=/home/ubuntu/.bitcoin
user = ubuntu
directory = /home/ubuntu/
startsecs=20
autostart=true
autorestart=true
startretries=1
redirect_stderr=true
logfile_maxbytes = 50MB
@NSkelsey
NSkelsey / NASA-error-log-08-09-17.txt
Created August 16, 2017 21:29
A processed version of the error log the National Super Alliance published on Aug 9th 2017
08/03/2017 00:37:55,8erver,Jnknown,A self—generated certificate was successfully loaded for encryption.
08/03/2017 00:41:52, spid57,.nknown, Setting database option ANSI_ PADDING to OFF for database IEBC_ PRESIDENTIAL2017.
08/03/2017 04:00:52,5pid54,anknown,Setting database option MULTI_USER to UN for database IEBC_KITUI_COUNTY.
08/03/2017 04:02:19,5pid54,anknown,Setting database option COMPATIBILITY_LEVEL to 100 for database IEBC_NYERI_COUNTY.
08/03/2017 04:02:40,5pid54,snknown,Setting database option ANSI_NULLS to OFF for database IEBC_KIRINYAGA_COUNTY.
08/03/2017 04:02:58, spid54,snknown, Setting database option ANSI_ PADDING to OFF for database IEBC_ MURANGA_ COUNTY.
08/03/2017 04:07:16,5pid53,anknown,Setting database option DISABLE_BROKER to ON for database IEBC_NAROK_COUNTY.
08/03/2017 04:10:25,5pid53,snknown,Setting database option ARITHABORT to OFF for database IEBC_MIGORI_COUNTY.
08/03/2017 09:05:23,Logon,Unknown,Login failed for user 'msando'. Reason: The password of the account must be changed. [CL
#!/bin/bash
set -x
set -e
TT=`tty`
BASE='http://localhost:8082'
printf 'Logging into service %s\n\n' $BASE
@NSkelsey
NSkelsey / get_exit_relays.py
Last active February 14, 2017 16:42
Retrieves the list of exit relays from a local tor daemon. Requires twisted and txtorcon. Adapted from txtorsocks/examples/get_info.py
#!/usr/bin/env python
import sys
import io
from twisted.internet import reactor, defer
from txtorcon import TorInfo, build_local_tor_connection, Router
def error(x):
print "ERROR", x
@NSkelsey
NSkelsey / sidechannel.py
Created January 10, 2017 12:07
Demonstrates lack of resolution in timing side channels
#!/usr/bin/env python
import string
import random
import timeit
#from globaleaks.handlers import authentication
from globaleaks.security import check_password, hash_password
guesses = 1000000
@NSkelsey
NSkelsey / bcnBrandInjection.js
Last active July 15, 2016 06:53
Bustia Etica Changes
var bcnBrandInjection = bcnBrandInjection || {};
(function (bcnBrandInjection, context) {
/*!
* @preserve Qwery - A selector engine
* https://github.com/ded/qwery
* (c) Dustin Diaz 2014 | License MIT
*/
(function(e,t,n){typeof module!="undefined"&&module.exports?module.exports=n():typeof define=="function"&&define.amd?define(n):t[e]=n()})("qwery",this,function(){function o(e){return[].slice.call(e,0)}function u(e){var t;return e&&typeof e=="object"&&(t=e.nodeType)&&(t==1||t==9)}function a(e){return typeof e=="object"&&isFinite(e.length)}function f(e){for(var t=[],n=0,r=e.length;n<r;++n)a(e[n])?t=t.concat(e[n]):t[t.length]=e[n];return t}function l(e){var t=[],n,r;e:for(n=0;n<e.length;n++){for(r=0;r<t.length;r++)if(t[r]==e[n])continue e;t[t.length]=e[n]}return t}function c(e){return e?typeof e=="string"?h(e)[0]:!e[i]&&a(e)?e[0]:e:t}function h(r,i){var l,h=c(i);return!h||!r?[]:r===n||u(r)?!i||r!==n&&u(h)&&s(r,h)?[r]:[]:r&&a(r)?f(r):t.getElementsByClassName&&r=="string"&&(l=r.match(e))?o(h.getEl
Vagrant.configure("2") do |config|
config.vm.box = "precise64"
config.vm.box_url = "http://files.vagrantup.com/precise64.box"
config.vm.network :private_network, ip: "192.168.56.101"
config.ssh.forward_agent = true
config.vm.provider :virtualbox do |v|
v.customize ["modifyvm", :id, "--natdnshostresolver1", "on"]
v.customize ["modifyvm", :id, "--memory", 1024]
@NSkelsey
NSkelsey / config.inc.php
Created September 17, 2013 05:37
sample config.inc.php
<?php
/**
* The configuration file that drives The State Decoded.
*
* PHP version 5
*
* @author Waldo Jaquith <waldo at jaquith.org>
* @copyright 2010-2013 Waldo Jaquith
* @license http://www.gnu.org/licenses/gpl.html GPL 3