Skip to content

Instantly share code, notes, and snippets.

@lbreuss
lbreuss / decrypt-password.ps1
Created March 7, 2024 20:51
Encrypt and Decrypt password using Windows SecretString
<#
.SYNOPSIS
Decrypt a password via SecureString. output the plain text to STDOUT
.DESCRIPTION
Multiple input modes:
1. FILE: read encrypted string from file. named argument "-File <filepath>"
2. STDIN: read encrypted string from stdin.
3. Argument: read encrypted string from first argument.
.INPUTS
System.String. Optional. The encrypted password string via STDIN
@lbreuss
lbreuss / bloom.py
Last active January 26, 2019 13:24 — forked from marcan/bloom.py
Simple Bloom filter implementation in Python 3 (for use with the HIBP password list)
#!/usr/bin/python3
#
# Simple Bloom filter implementation in Python 3
# Copyright 2017 Hector Martin "marcan" <marcan@marcan.st>
# Licensed under the terms of the MIT license
#
# Written to be used with the Have I been pwned? password list:
# https://haveibeenpwned.com/passwords
#
# Download the pre-computed filter here (968MB, k=11, false positive p=0.0005):