Skip to content

Instantly share code, notes, and snippets.

@ghoulmann
ghoulmann / Raspi-Haste-Server.sh
Created November 1, 2012 21:37
Haste-Server Install Script for Raspian
#!/bin/bash -ex
#Check for root
LUID=$(id -u)
if [[ $LUID -ne 0 ]]; then
echo "$0 must be run as root"
exit 1
fi
@grutz
grutz / cmiyc-chall9-pfx-crack.txt
Last active December 20, 2015 22:39
CMIYC 2013: Challenge 9 PFX Cracking
grutz@beelzebubba:loop$ backup$ openssl pkcs12 -in backup/mabel.pfx
Enter Import Password:
Mac verify error: invalid password?
grutz@beelzebubba:loop$ /opt/pw-crackers/jtr/JohnTheRipper/run/pfx2john backup/mabel.pfx
mabel:$pfx$*2558*308209fa020103308209b606092a864886f70d010701a08209a7048209a33082099f3082060806092a864886f70d010701a08205f9048205f5308205f1308205ed060b2a864886f70d010c0a0102a08204fe308204fa301c060a2a864886f80be020207d0048204d8305d1ca9b208ecf652688134b1bea08c5d68657b01a28ee2405c3df2df8a098b85231b50d3d8587f3a68f7c23303cb2cd614ab69e9110fa3b9f7f6960a057c49a2f30abbbea2d4459fdef767365de4a29faed039d6c4a0662b73a32ba900dca20c64b1a63118b639e298bbc874cec74c42b5ca32b0fa0c88f5661eed640bd35e0f9fdd75b63a81eed2c64c46c94b8d2251bd67274c733f8dbcf63f3b80c86be5ea94cba8e6701498b6b6cd93dc2fb15186b00d621e2e2b69a22028aeebe1aa1ae968b39a74cbeab9ff7239dde62fe007e861cc056fd40e3bf84556ee47d692c2702ac21d3dfe1ae23d837b62ff07085b5db26cb549bf253615d16ac464a2c745d70df8cdd8e534db953097ffa2f263a588e3b27893b3f1bb0f34e981d8553ff6752
@jmazzi
jmazzi / lastpass_to_keepassx.rb
Created June 13, 2010 19:57
Convert LastPass CSV to KeePassX XML
#!/usr/bin/ruby
#
# I recommend using Pocket to do the export. It works better than the browser extensions.
require 'rubygems'
require 'htmlentities'
require 'csv'
# CHANGE THIS
input_file = '/path/to/passwords.csv'
#!/usr/bin/env python
from __future__ import print_function
import boto3
from botocore.exceptions import ClientError
import json
def main(args):
backdoor_users(get_users())
#ifndef WIN32_NO_STATUS
# define WIN32_NO_STATUS
#endif
#include <windows.h>
#include <assert.h>
#include <stdio.h>
#include <winerror.h>
#include <winternl.h>
#include <stddef.h>
#include <winnt.h>
@rodrigok
rodrigok / install.md
Last active March 8, 2017 15:37
Install Rocket.Chat in Ubuntu as Production Mode
@lokulin
lokulin / pem2plex.py
Created September 10, 2015 13:43
Convert the x509 certificate to certificate.p12 that Plex requires.
#!/usr/bin/python
import sys
import hashlib
from OpenSSL.crypto import *
def main():
if(len(sys.argv) != 4):
print sys.argv[0] + " /path/to/ssl.crt /path/to/ssl.key ProcessedMachineIdentifier"
sys.exit(0)
@millsy
millsy / p12.php
Created March 29, 2012 12:58
php asymmetric encryption/decryption using p12 file
<?php
$p12cert = array();
$file = 'https://myserver.com/myp12file.p12';
$c = file_get_contents($file);
if (openssl_pkcs12_read($c, $p12cert, '1234567890') )
{
$pkey = $p12cert['pkey']; //private key
@bitboxer
bitboxer / makeImage.sh
Created May 8, 2011 18:11
create a sparsebundle for mac os backups
#!/bin/bash
# A bash script to create a time machine disk image suitable for
# backups with OS X 10.6 (Snow Leopard)
# This script probably only works for me, so try it at your own peril!
# Use, distribute, and modify as you see fit but leave this header intact.
# (R) sunkid - September 5, 2009
#
# This will create a time machine ready disk image named with your
# computer's name with a maximum size of 600GB and copy it to
# /Volumes/backup. The image "file" (it's a directory, really) will
@ndlrx
ndlrx / dnscrypt-proxy.md
Last active March 19, 2023 17:43
Install dnscrypt-proxy on Archlinux or Manjaro

Step 1 - Install and Configure dnscrypt-proxy

sudo su
pacman -S dnscrypt-proxy
cd /etc/dnscrypt-proxy/