Skip to content

Instantly share code, notes, and snippets.

Avatar

Luc Gommans lgommans

View GitHub Profile
@lgommans
lgommans / rainbowtable.py
Created Oct 24, 2017
A toy rainbow table script
View rainbowtable.py
#!/usr/bin/env python3
import sys
from hashlib import md5
from base64 import b64encode
from binascii import hexlify, unhexlify
from time import time
def reduction_function(hash, max_password_length):
View getanswers.py
#!/usr/bin/env python3
triviafile = 'trivia.csv'
apiurl = 'https://opentdb.com/'
sleep_between_requests = 0.1
questionsPerRequest = 50
import requests, os, hashlib, json, sys, csv, urllib, time
unquote = urllib.parse.unquote
View base-convert.py
#!/usr/bin/env python3
import string, math, sys
ibase = '0123456789'
ival = sys.argv[1]
obase = '0123456789abcdef'
obase = string.digits + string.ascii_lowercase
obase = string.printable[:94].replace(',', '')
@lgommans
lgommans / btrfs-bitrot-backups-test.sh
Created Oct 27, 2018
Test backup solution for bit-rot detection
View btrfs-bitrot-backups-test.sh
#!/usr/bin/env bash
### Run this script in an otherwise empty directory. It currently tests rsync and restic on btrfs. ###
### Tested on Debian Buster with restic 0.9.2, rsync 3.1.2, and btrfs-progs 4.17. ###
if [ "x$(sudo whoami)" != "xroot" ]; then
echo "No root, cannot use (u)mount."
exit 1
fi
@lgommans
lgommans / git-basics.txt
Created Feb 22, 2018
Git and Github basics
View git-basics.txt
==== Creating repositories ====
Git has repositories. Github is a platform which keeps a copy of the
repository for you, and additionally makes it accessible through a website.
One can create a new repository by using the command "git init". You
then have a local repository, which is located in the .git/ folder, to
which you can do whatever you like. When you're ready to upload your
repository to Github for the first time, you need to:
View gist:fdbd86fbbd3667479ee56b8bf29db241
I copy/pasted the following as required by Keybase.
### Keybase proof
I hereby claim:
* I am lgommans on github.
* I am luc (https://keybase.io/luc) on keybase.
* I have a public key whose fingerprint is 60CE 8AF6 E465 D1CB 5279 7CB1 B523 8646 7CE5 CCB7
You can’t perform that action at this time.