Skip to content

Instantly share code, notes, and snippets.

View xorcare's full-sized avatar

Vasiliy Vasilyuk xorcare

View GitHub Profile
@xorcare
xorcare / pgbench.sh
Created October 21, 2021 15:11
A script for measuring the performance of sql queries with the generation of a report in the form of a MarkDown file.
#!/usr/bin/env bash
if [ -z "$PGHOST" ]; then
export PGHOST=localhost
fi
if [ -z "$PGPORT" ]; then
export PGPORT=5432
fi
@xorcare
xorcare / crack-keepassxc.sh
Created November 14, 2021 19:25
Brute force a KeepassXC database file with a dictionary attack
#!/bin/sh
# Usage: ./crack-keepassxc.sh passwords.kdbx dict.txt
#
# The dictionary file can be generated with:
# https://github.com/TimurKiyivinski/permutatify
while read -r password; do
echo "Using password: \"$password\""
echo "$password" | keepassxc-cli db-info "$1" && exit 0
@xorcare
xorcare / gen.go
Last active January 31, 2022 18:26
Modified source code for article Pointers Might Not be Ideal as Arguments
// gen.go
// This code is derived from the article
// https://golang.design/research/pointer-params
// and modified to fit my needs.
package main
import (
"bytes"