go-toybox

command module
v0.0.0-...-2a3068f Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 9, 2017 License: MPL-2.0 Imports: 88 Imported by: 0

README

go-toybox

Random Go code samples written over the years. Use at your own risk. Some code may not be running at all.

Documentation

Overview

+build gencsr

This is a simple script to generate test CSRs. It should not be part of the main build.

PLEASE DO NOT CHECK IN

Look for file IOCs on the local system

Version: MPL 1.1/GPL 2.0/LGPL 2.1

The contents of this file are subject to the Mozilla Public License Version 1.1 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.mozilla.org/MPL/

Software distributed under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License.

The Initial Developer of the Original Code is Mozilla Corporation Portions created by the Initial Developer are Copyright (C) 2012 the Initial Developer. All Rights Reserved.

Contributor(s): Julien Vehent jvehent@mozilla.com [:ulfr]

Alternatively, the contents of this file may be used under the terms of either the GNU General Public License Version 2 or later (the "GPL"), or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), in which case the provisions of the GPL or the LGPL are applicable instead of those above. If you wish to allow use of your version of this file only under the terms of either the GPL or the LGPL, and not to allow others to use your version of this file under the terms of the MPL, indicate your decision by deleting the provisions above and replace them with the notice and other provisions required by the GPL or the LGPL. If you do not delete the provisions above, a recipient may use your version of this file under the terms of any one of the MPL, the GPL or the LGPL.

watch a set of directories for file system events

Get all the MD5 from a dir
  jvehent - ulfr - 2013

Requires:

# yum install libpcap-devel

then

$ go get -u code.google.com/p/gopacket/pcap

sample code to download content from S3 bucket by version

export AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY in your environment

then run $ go run s3down_by_version.go us-east-1 mybucket myfolder/mykey zG77EWreHU9Jqswz1QA6mEKP4QaeUlLa

					  { region} {bucket} {..doc key...} {.........version ID...........}
	{
	  AcceptRanges: "bytes",
	  Body: buffer(0xc20836cf00),
	  ContentLength: 887,
	  ContentType: "application/octet-stream",
	  ETag: "\"0e2a5820fdb608ff3ff8f0bdda6ee378\"",
	  LastModified: 2015-05-13 13:54:28 +0000 UTC,
	  Metadata: {
	  },
	  ServerSideEncryption: "AES256",
	  VersionID: "zG77EWreHU9Jqswz1QA6mEKP4QaeUlLa"
	}
	-----BEGIN RSA PRIVATE KEY-----
	MIICXAIBAAKBgQCsqIsQOkcNQamH+JHJL8vQI0OjvyPnL3oN0uLnCSKU5e166L+W
	...
	-----END RSA PRIVATE KEY-----

 Get all the MD5 from a dir
   jvehent - ulfr - 2013

 Get all the MD5 from a dir
   jvehent - ulfr - 2013

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL