Skip to content

Instantly share code, notes, and snippets.

View CraigWilsonOZ's full-sized avatar
🏠
Working from home

Craig CraigWilsonOZ

🏠
Working from home
View GitHub Profile
@CraigWilsonOZ
CraigWilsonOZ / bootstrap-server.sh
Last active May 28, 2026 05:15
Ubuntu 26.04 LTS server bootstrap script - SSH hardening, UFW, fastfetch, Tokyo Black theme
#!/bin/bash
#==============================================================================
# Streamlined System Initialisation and Configuration Script
#
# Author: Craig Wilson
# Version: 1.0
# Last Modified: 28/05/2026
#
# Description:
@CraigWilsonOZ
CraigWilsonOZ / test-cpu.sh
Created July 12, 2025 02:57
CPU basic test script to report on CPU performance on Debian based systems
#!/usr/bin/env bash
set -euo pipefail
###############
## Variables ##
###############
# Timestamp and host/model for log filename
timestamp=$(date +"%Y%m%d_%H%M%S")
hostname=$(hostname)
# Detect CPU model (short)
@CraigWilsonOZ
CraigWilsonOZ / setup-fabric-local.sh
Last active July 8, 2025 09:50
Minecraft Fabric Server Setup Script (Local Workstation Edition)
#!/bin/bash
#==============================================================================
# Minecraft Fabric Server Setup Script (Local Workstation Edition)
#
# Original Author: Craig Wilson
# Modified for Local Use
# Version: 2.1-local
# Last Modified: 2025-07-08
#
@CraigWilsonOZ
CraigWilsonOZ / setup-fabric.sh
Last active September 7, 2026 04:30
Minecraft Fabric Server Setup Script
#!/bin/bash
#==============================================================================
# Minecraft Fabric Server Setup Script
#
# Author: Craig Wilson
# Version: 2.1 (Fabric Edition)
# Last Modified: 2025-07-05
#
# Description:
@CraigWilsonOZ
CraigWilsonOZ / config-server.sh
Last active August 12, 2025 19:41
Ubuntu Streamlined System Initialization and Configuration Script
#!/bin/bash
#==============================================================================
# Streamlined System Initialization and Configuration Script
#
# Author: Craig Wilson
# Version: 1.2
# Last Modified: 2025-07-05
#
# Description:
@CraigWilsonOZ
CraigWilsonOZ / setup-minecraft.sh
Last active July 5, 2025 20:06
Minecraft: Java Edition server on Ubuntu setup script
#!/bin/bash
#==============================================================================
# Minecraft Java Server Setup Script
#
# Author: Craig Wilson
# Version: 1.2
# Last Modified: 2025-06-21
#
# Description:
@CraigWilsonOZ
CraigWilsonOZ / DVWA-Authentication-Script.txt
Last active July 5, 2025 20:30
DVWA-Authentication-Script
function authenticate(helper, paramsValues, credentials) {
var loginUrl = paramsValues.get("Login URL");
var csrfTokenName = paramsValues.get("CSRF Field");
var csrfTokenValue = extractInputFieldValue(getPageContent(helper, loginUrl), csrfTokenName);
var postData = paramsValues.get("POST Data");
postData = postData.replace('{%username%}', encodeURIComponent(credentials.getParam("Username")));
postData = postData.replace('{%password%}', encodeURIComponent(credentials.getParam("Password")));
postData = postData.replace('{%' + csrfTokenName + '%}', encodeURIComponent(csrfTokenValue));
var msg = sendAndReceive(helper, loginUrl, postData);
return msg;