Skip to content

Instantly share code, notes, and snippets.

View ToBeHH's full-sized avatar

Tobias Schulz-Hess ToBeHH

View GitHub Profile
@ToBeHH
ToBeHH / passwordDemo.sh
Created June 24, 2025 11:55
Password hacking speed demo
#!/bin/bash
# Password Demo Script - Educational purposes only
# Demonstrates password hashing and cracking with hashcat
# Usage: ./passwordDemo.sh [hash_type]
# hash_type: md5 (default), sha256, bcrypt
# Set hash algorithm based on parameter or default to md5
hash_type=${1:-md5}
@ToBeHH
ToBeHH / userdata.sh
Created August 28, 2024 07:22
AWS EC2 User-Data to install Apache (httpd) webserver and create an index.html file with machine's metadata (use Amazon Linux)
#!/bin/bash -ex
# -e: End script on error
# -x: Print commands as you execute
# Update the instance's package manager and install the webserver
yum update -y
yum install -y httpd
# Start and enable the Apache web server to start automatically on boot
systemctl start httpd
@ToBeHH
ToBeHH / FizzBuzz.kt
Last active November 24, 2023 12:22
One FizzBuzz solution, written in Kotlin
/**
* Check, if the given number is fully dividable by another number.
*
* Actually, the code is rather short, but I find the .isDividableBy()
* much nicer to read than the actual syntax.
*
* @param div The other number to check.
* @return true, if it is fully dividable, false otherwise
*/
fun Int.isDividableBy(div: Int): Boolean {