Skip to content

Instantly share code, notes, and snippets.

View JackZielke's full-sized avatar

Jack Zielke JackZielke

View GitHub Profile
@JackZielke
JackZielke / primel.sh
Last active February 26, 2022 16:57
Help find prime numbers for Primel https://converged.yt/primel/
#!/bin/bash
if test ! -e 5_digit_primes.txt.xz; then
echo 5_digit_primes.txt.xz does not exist
echo $0 requires this file
echo Please generate it with the following command
echo "seq 10007 99991|factor|grep '^\([^:]*\): \1$'|cut -d: -f1|xz -9e >5_digit_primes.txt.xz"
exit 2
fi
@JackZielke
JackZielke / pass.php
Created August 20, 2017 21:19
Generate a visual copy and paste friendly random password using OpenSSL and PHP
#!/usr/bin/php
<?php
$length = 10;
if ($argc > 1) {
if ($argv[1] == '-h' || $argv[1] == '--help') {
echo basename($argv[0]) . ' [-h|--help] [length]' . PHP_EOL;
echo 'length defaults to 10' . PHP_EOL;
exit;
@JackZielke
JackZielke / staticpass.sh
Last active August 19, 2017 17:24
Use random binary data to create various non-biased passwords
#!/bin/sh
# Source of random data
#DEV=/dev/urandom
#DEV=/dev/random
#DEV=/dev/hwrng
DEV=/var/run/rtl_entropy.fifo
# Remap unused characters
# OWASP will no longer look like alphanum