Skip to content

Instantly share code, notes, and snippets.

@CurtisLeeBolin
CurtisLeeBolin / ssha512hash.py
Last active June 3, 2018 12:48
Creates a salted SHA512 hash
#!/usr/bin/env python3
import crypt
print(
crypt.crypt(
input(),
crypt.mksalt(
crypt.METHOD_SHA512
)
curl -v -X POST -H "Content-Type: application/json" -d '{"jsonrpc":"2.0","method":"Input.SendText","params":{"text":"This is the text we want to send","done":false},"id":1}' http://host:port/jsonrpc
@CurtisLeeBolin
CurtisLeeBolin / tlsGen.sh
Last active January 5, 2016 17:23
tls gen
#!/bin/bash
# tlsGen.sh
#
# Instructions:
# ./tlsGen.sh <domain>
domain=$1
openssl req -new -x509 -extensions v3_req -newkey rsa:8192 -nodes -days 3650 \
-subj "/O=${domain}/CN=*.${domain}/subjectAltName=DNS:*.${domain}/" \
#!/bin/bash
pattern="$@"
outputDir="0transcoded"
mkdir "${outputDir}"
for each in ${pattern}; do
fileName="${each%.*}"
@CurtisLeeBolin
CurtisLeeBolin / UD.js
Created December 7, 2014 08:02
JS IRC Bot Command
'ud': function(from, to, argArray) {
var help = 'ud - defines words using the Urban Dictionary.\n ud <word or phrase to define>';
var url = 'http://api.urbandictionary.com/v0/define?term=' + argArray.join('%20');
request(url, function (error, response, body) {
if (!error && response.statusCode == 200) {
definitions = JSON.parse(body);
if (definitions.result_type != 'no_results') {
bot.say(to, 'Urban Dictionary: ' + argArray.join(' ') + ' - ' + definitions.list[0].definition);
} else {
bot.say(to, 'Urban Dictionary: No result for ' + argArray.join(' ') + '.');