Skip to content

Instantly share code, notes, and snippets.

View activeshadow's full-sized avatar

Bryan Richardson activeshadow

View GitHub Profile
@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 / 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
#!/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 / 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)