This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# decrypt_dbvis.py ~ gerry@twitter.com | |
# DbVisualizer uses PBEWithMD5AndDES with a static key to store passwords. | |
# This is a quick hack to extract and decrypt credentials from DbVisualizer config files. | |
# Tested against DbVisualizer Free 9.0.9 and 9.2.10 | |
""" | |
[2014-03-25 02:05:30][not-the-sea workspace]$ security/p/gerry/misc/decrypt_dbvis.py | |
[+] DbVisualizer Password Extractor and Decryptor (@gerryeisenhaur) | |
[+] Additional Usage Options: | |
[+] security/p/gerry/misc/decrypt_dbvis.py <config filename> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Sync Homebrew installations between Macs via Dropbox | |
# | |
BREW="/usr/local/bin/brew" | |
# first get local settings | |
echo "Reading local settings ..." | |
rm -f /tmp/brew-sync.* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let healthStore = HKHealthStore() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env groovy | |
// 1.) Start ActiveMQ on localhost (...or other hosts) | |
// 2.) Run with ./amqtransceiver.groovy -t --inqueue one --outqueue two --activemqurl tcp://localhost:61616 | |
@Grab(group='org.apache.activemq', module='activemq-core', version='5.7.0') | |
@Grab(group='commons-io', module='commons-io', version='1.2') | |
@Grab(group='org.apache.geronimo.specs', module='geronimo-jms_1.1_spec', version='1.1.1') | |
@Grab(group='org.apache.qpid', module='qpid-amqp-1-0-client-jms', version='0.30') | |
@Grab(group='ch.qos.logback', module='logback-classic', version='1.1.5') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env groovy | |
//@GrabConfig(systemClassLoader=true) | |
@Grab(group='ch.qos.logback', module='logback-classic', version='1.1.2') | |
@Grab(group='org.apache.pdfbox', module='pdfbox', version='2.0.0-RC3') | |
import org.apache.pdfbox.pdfwriter.* | |
import org.apache.pdfbox.pdmodel.* | |
import org.apache.pdfbox.pdmodel.font.* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env groovy -cp ./activemq-client-5.12.0.jar:./logback-classic-1.1.3.jar | |
@Grab(group='ch.qos.logback', module='logback-classic', version='1.1.5') | |
@Grab(group='ch.qos.logback', module='logback-core', version='1.1.5') | |
@Grab(group='org.slf4j', module='slf4j-api', version='1.7.16') | |
@Grab(group='org.apache.activemq', module='activemq-core', version='5.7.0') | |
@Grab(group='org.apache.qpid', module='qpid-amqp-1-0-client-jms', version='0.30') | |
@Grab(group='commons-io', module='commons-io', version='1.2') | |
@Grab(group='org.apache.geronimo.specs', module='geronimo-jms_1.1_spec', version='1.1.1') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env groovy | |
import java.nio.file.attribute.BasicFileAttributes | |
TEXT_LEN = 9999 * 2 | |
TEST_TEXT = "Alfa Beta" | |
def text = "" | |
def ratio = TEXT_LEN / TEST_TEXT.length() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env groovy | |
// Run with: groovy MakeLargeCsvFile.groovy -r 12 --file a.csv | |
import groovy.text.SimpleTemplateEngine | |
def appName = this.getClass().getName() | |
def cli = new CliBuilder(usage:"${appName} --rows <row count> --file <path_to_file>") | |
cli.with { | |
r(longOpt: 'rows', 'expected row count', args: 1, required: true) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env groovy | |
import groovy.io.FileType | |
def printelnerr = System.err.&println | |
def appName = this.getClass().getName() | |
def cli = new CliBuilder(usage:"${appName} --basedir <path_to_dir> --diffdir <path_to_dir> [--pattern old/new]") | |
cli.with { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env groovy | |
@Grab(group='commons-codec', module='commons-codec', version='1.10') | |
import org.apache.commons.codec.binary.Base64 | |
def plainText = "PasswordText" | |
def encodedText = new String(Base64.encodeBase64(plainText.getBytes())) | |
def decodedText = new String(Base64.decodeBase64(encodedText.getBytes())) |
OlderNewer