Skip to content

Instantly share code, notes, and snippets.

View activeshadow's full-sized avatar

Bryan Richardson activeshadow

View GitHub Profile
@activeshadow
activeshadow / gist:2e14bf889d9d216713b6
Last active October 19, 2017 16:43
PostgreSQL Errors
CREATE TABLE network_info (
network CIDR NOT NULL,
some_info TEXT NULL,
PRIMARY KEY (network)
);
CREATE TABLE ipaddr_info (
ipaddr INET NOT NULL,
some_info INT NULL,
PRIMARY KEY (ipaddr, some_info)
#!/bin/bash
#Standard update from repos.
apt-get update && apt-get upgrade -y && apt-get dist-upgrade -y
#Update the Exploit Database.
mkdir -p /root/Downloads && cd /root/Downloads
wget https://github.com/offensive-security/exploit-database/archive/master.zip
@activeshadow
activeshadow / cities.csv
Last active August 29, 2015 14:15
Map w/ Location Markers as SVG Paths
code city country lat lon
ZNZ ZANZIBAR TANZANIA -6.13 39.31
TYO TOKYO JAPAN 35.68 139.76
AKL AUCKLAND NEW ZEALAND -36.85 174.78
BKK BANGKOK THAILAND 13.75 100.48
DEL DELHI INDIA 29.01 77.38
SIN SINGAPORE SINGAPOR 1.36 103.75
BSB BRASILIA BRAZIL -15.67 -47.43
RIO RIO DE JANEIRO BRAZIL -22.90 -43.24
YTO TORONTO CANADA 43.64 -79.40
@activeshadow
activeshadow / create-ports-table.rb
Created May 10, 2015 01:49
Generate Markdown table of open ports from Nmap scan results
host_addr = %r{Host: (\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})}
open_port = %r{([0-9]+)/open/}
ports = {}
ARGV.each do |f|
File.foreach(f) do |l|
l.scan(host_addr) do |a|
l.scan(open_port) do |p|
ports[a.first] = [] unless ports.key?(a.first)
@activeshadow
activeshadow / embed.rb
Created May 10, 2015 01:50
Embed all images directly in HTML file (OS X)
require 'base64'
require 'fileutils'
img = /img src="(.*)" /
File.open("#{ARGV[0]}.html") do |i|
File.open("#{ARGV[0]}-embedded.html", 'w') do |o|
i.each_line do |l|
if match = img.match(l)
location = match[1]
Created kernel and initrd images using the following:
$ cd /opt/minimega && ./bin/vmbetter -branch unstable -level debug misc/vmbetter_configs/miniccc.conf
$ mv /opt/minimega/miniccc.* /root/
Configured a VM as follows:
minimega$ vm config
minibuntu: Current VM configuration:
Memory: 2048
@activeshadow
activeshadow / kubelet.log
Created March 28, 2017 19:35
Kubelet Journal Logs
-- Logs begin at Mon 2017-02-06 21:28:04 UTC, end at Mon 2017-03-27 12:54:33 UTC. --
Mar 19 00:23:24 minion systemd[1]: Starting Kubernetes Kubelet...
Mar 19 00:23:24 minion systemd[1]: Started Kubernetes Kubelet.
Mar 19 00:23:25 minion kubelet[1604]: Flag --api-servers has been deprecated, Use --kubeconfig instead. Will be removed in a future version.
Mar 19 00:23:26 minion kubelet[1604]: I0319 00:23:26.100099 1604 docker.go:375] Connecting to docker on unix:///var/run/docker.sock
Mar 19 00:23:26 minion kubelet[1604]: I0319 00:23:26.100213 1604 docker.go:395] Start docker client with request timeout=2m0s
Mar 19 00:23:26 minion kubelet[1604]: E0319 00:23:26.100747 1604 cni.go:163] error updating cni config: No networks found in /etc/cni/net.d
Mar 19 00:23:26 minion kubelet[1604]: I0319 00:23:26.115026 1604 manager.go:143] cAdvisor running in container: "/system.slice/kubelet.service"
Mar 19 00:23:26 minion kubelet[1604]: W0319 00:23:26.141903 1604 manager.go:151] unable to connect to Rkt api se
@activeshadow
activeshadow / keybase.md
Created October 5, 2017 05:30
keybase.md

Keybase proof

I hereby claim:

  • I am activeshadow on github.
  • I am activeshadow (https://keybase.io/activeshadow) on keybase.
  • I have a public key ASC4M-MbQ1LamSq6o76mT6h_gQj9ZSDsy9b2U0ZmnlGDywo

To claim this, I am signing this object:

@activeshadow
activeshadow / kops.log
Created October 23, 2017 19:03
kops GCE error logs
➜ ~ kops create cluster k8s.darkcubed.io --zones $ZONES --master-zones $ZONES --node-count 10 --project ${PROJECT} --authorization RBAC --cloud gce --ssh-public-key ~/.ssh/id_ed25519.pub -v 10 --yes
I1020 15:58:33.349589 22722 gsfs.go:179] Reading file "gs://darkcubed-kops/k8s.darkcubed.io/config"
I1020 15:58:34.513984 22722 channel.go:92] resolving "stable" against default channel location "https://raw.githubusercontent.com/kubernetes/kops/master/channels/"
I1020 15:58:34.514059 22722 channel.go:97] Loading channel from "https://raw.githubusercontent.com/kubernetes/kops/master/channels/stable"
I1020 15:58:34.514086 22722 context.go:132] Performing HTTP request: GET https://raw.githubusercontent.com/kubernetes/kops/master/channels/stable
I1020 15:58:34.898258 22722 channel.go:106] Channel contents: spec:
images:
# We put the "legacy" version first, for kops versions that don't support versions ( < 1.5.0 )
- name: kope.io/k8s-1.4-debian-jessie-amd64-hvm-ebs-2017-07-28
providerID: aws
@activeshadow
activeshadow / kops-create-cluster.log
Created October 23, 2017 21:13
kops complete logs
I1023 14:55:44.078531 25308 gsfs.go:138] Reading file "gs://foobar-kops/simple.k8s.local/config"
I1023 14:55:45.200012 25308 channel.go:92] resolving "stable" against default channel location "https://raw.githubusercontent.com/kubernetes/kops/master/channels/"
I1023 14:55:45.200204 25308 channel.go:97] Loading channel from "https://raw.githubusercontent.com/kubernetes/kops/master/channels/stable"
I1023 14:55:45.200274 25308 context.go:132] Performing HTTP request: GET https://raw.githubusercontent.com/kubernetes/kops/master/channels/stable
I1023 14:55:45.444546 25308 channel.go:106] Channel contents: spec:
images:
# We put the "legacy" version first, for kops versions that don't support versions ( < 1.5.0 )
- name: kope.io/k8s-1.4-debian-jessie-amd64-hvm-ebs-2017-07-28
providerID: aws
kubernetesVersion: ">=1.4.0 <1.5.0"