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 / 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
@NSkelsey
NSkelsey / server-infra.md
Last active November 18, 2015 16:34
Ombuds Server Infrastructure

The physical infrastructure for Ombuds

4k up to 5k to spend.

We want 3 isolated computing environments to provide 3 different services.

  1. A build server for android and binary releases
  2. A web-host for soapbox and ombuds static sites
  3. An ombfullnode behind a TOR hidden service
@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 / gist:db6544058d3579bc40f0
Last active August 29, 2015 14:16
plot-pointcoin.conf
; saba
addpeer=52.11.86.96
; peter
addpeer=52.10.98.211
; Laurence
addpeer=54.164.199.124
; Anat
@NSkelsey
NSkelsey / support.go
Created February 9, 2015 08:17
Supporting functions for a simple block template miner
// These functions have been shamelessly taken from https://github.com/btcsuite/btcd/blob/master/mining.go
package support
import (
"math/rand"
"github.com/PointCoin/btcnet"
"github.com/PointCoin/btcutil"
"github.com/PointCoin/btcwire"