Wes Winham winhamwr@gmail.com
There are many tutorials floating around the web that almost get you a dynamic VPN in EC2. The goal of this tutorial is to be a one-stop-shop for this specific setup.
Wes Winham winhamwr@gmail.com
There are many tutorials floating around the web that almost get you a dynamic VPN in EC2. The goal of this tutorial is to be a one-stop-shop for this specific setup.
import boto | |
import sys | |
ec2 = boto.connect_ec2() | |
elb = boto.connect_elb() | |
load_balancer = elb.get_all_load_balancers(load_balancer_names=[sys.argv[1]])[0] | |
health = load_balancer.get_instance_health() | |
instances = ec2.get_only_instances(instance_ids=[instance.id for instance in load_balancer.instances]) |
#!/bin/sh | |
USERNAME=shostakovich | |
mkdir ~/tmp | |
cd ~/tmp | |
# Install GCC + Git | |
curl https://github.com/downloads/kennethreitz/osx-gcc-installer/GCC-10.7-v2.pkg > GCC-10.7-v2.pkg | |
sudo installer -pkg GCC-10.7-v2.pkg -target / |
A how-to for ssh-agent forwarding via Paramiko. Specifically, I used Paramiko v1.15.2 in this example.
Paramiko's docs do not document the API required to do ssh-agent forwarding. I ended up finding out how by reading pull requests for ssh-agent forwarding features in frameworks that use Paramiko under the covers, like fabric and ansible.
Besides attempting to document this process here, I've opened a bug with Paramiko to document this API in their official docs.
#!/bin/sh | |
# this script does absolutely ZERO error checking. however, it worked | |
# for me on a RHEL 6.3 machine on 2012-08-08. clearly, the version numbers | |
# and/or URLs should be made variables. cheers, zmil...@cs.wisc.edu | |
mkdir mosh | |
cd mosh |
#!/usr/bin/env ruby | |
# | |
# Proof-of-Concept exploit for Rails Remote Code Execution (CVE-2013-0333) | |
# | |
# ## Advisory | |
# | |
# https://groups.google.com/forum/?fromgroups=#!topic/rubyonrails-security/1h2DR63ViGo | |
# | |
# ## Caveats | |
# |
Attribute VB_Name = "Kai32" | |
'-=====================================================- | |
' -= +------------------------------------------------+ =- | |
' -= | |\ =- | |
' -= | |¯¯|\ |¯¯|\ |¯¯|\ |¯¯¯¯¯¯|\ |¯¯¯¯¯¯|\ |\\ =- | |
' -= | | |\/ /\| |__|\||__|| |\||___ |\| |\\| =- | |
' -= | | |/ /\/ |¯¯¯¯¯|\ \\\\| \\|¯ |\| /¯¯___/\| |\\| =- | |
' -= | | /\/ | |\||¯¯|\ |¯¯|| |\|| ¯¯¯|\ |\\| =- | |
' -= | | \/ | | |\|| |\||______|\||______|\| |\\| =- | |
' -= | | |\ \ | |\|| |\| \\\\\\\\| \\\\\\\\| |\\| =- |
require "cgi" | |
class AkamaiTokenConfig | |
attr_accessor :window, :session_id, :data, :salt, :field_delimiter, :early_url_encoding, :ip | |
attr_reader :start_time, :hash_strategy, :acl, :url | |
def initialize(config={}) | |
@ip = '' | |
self.start_time = Time.now.to_i | |
self.acl = '/*' |
#!/usr/bin/env ruby | |
require 'net/telnet' | |
require 'terminal-table' | |
tbl = Terminal::Table.new headings: %w(id expires cache_key bytes) | |
localhost = Net::Telnet::new("Host" => "localhost", "Port" => 11211, "Timeout" => 3) | |
matches = localhost.cmd("String" => "stats items", "Match" => /^END/).scan(/STAT items:(\d+):number (\d+)/) | |
slabs = matches.inject([]) { |items, item| items << Hash[*['id','items'].zip(item).flatten]; items } |
#!/usr/bin/env python | |
import npyscreen, curses | |
# Incorporates code | |
# from http://www.binarytides.com/python-socket-server-code-example/ | |
# Socket server in python using select function | |
import socket, select | |
class MyTestApp(npyscreen.NPSAppManaged): | |
# socket code |