This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* 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 { |