Skip to content

Instantly share code, notes, and snippets.

@lucashalbert
lucashalbert / Uninstall-SEP.ps1
Created January 6, 2021 15:23
Script is designed to test if Sophos Endoint Protection is installed and proceed with uninstall.
<#
.SYNOPSIS
Script is designed to test if Sophos Endoint Protection is installed and proceed with uninstall.
.DESCRIPTION
Uninstall Sophos Endpoint Protection.
.INPUTS
none
@lucashalbert
lucashalbert / Install-GraylogSidecar.ps1
Created January 6, 2021 13:42
Script to automate the installation of the Graylog Sidecar.
<#
.SYNOPSIS
Install-GraylogSidecar.ps1 - Script to automate the installation of the Graylog Sidecar.
.DESCRIPTION
Automates the installation of the Graylog Sidecar.
.OUTPUTS
Results are output to the PowerShell window.
.PARAMETER installer
Specify the path to the Graylog Sidecar installer
.PARAMETER server
@lucashalbert
lucashalbert / ipa-import-dns-zone.sh
Created October 14, 2019 20:38
Script to import an existing BIND DNS zone to IPA
#!/bin/bash
print_version() {
cat <<EOF
####################################################################################
#
# Author: Lucas Halbert <contactme@lhalbert.xyz>
# Date: 10/14/2019
# Last Edited: 10/14/2019
# Version: 2019.10.14
# Description: Parse a BIND DNS zone (minus the SOA) and import directly to IPA
@lucashalbert
lucashalbert / createChrootedHome.sh
Created March 27, 2019 16:50
Creates a new home directory with the specified owner and group. Sets advanced ACLs and sticky bits.
#!/bin/bash
print_version() {
cat <<EOF
####################################################################################
#
# Author: Lucas Halbert <contactme@lhalbert.xyz>
# Date: 12/13/2016
# Last Edited: 03/27/2019
# Version: 2019.03.27
# Description: Creates a new directory with the specified owner and
@lucashalbert
lucashalbert / slapd-backup.sh
Last active March 19, 2019 13:42
Performs a backup of the entire slapd DIT. Can be run from cron
#!/bin/bash
print_version() {
cat <<EOF
####################################################################################
#
# Author: Lucas Halbert <contactme@lhalbert.xyz>
# Date: 01.23.2018
# Last Edited: 01.23.2018
# Version: 2018.01.23
# Description: Performs a backup of the entire slapd DIT. Can be run from cron
@lucashalbert
lucashalbert / regenerate_ssh_host_keys.sh
Last active March 19, 2019 13:42
Script to regenerate SSH host keys
#!/bin/bash
print_version() {
cat <<EOF
####################################################################################
#
# Author: Lucas Halbert <contactme@lhalbert.xyz>
# Date: 10/21/2015
# Last Edited: 10/21/2015
# Version: 2015.10.21
# Description: Regenerate SSH host keys
@lucashalbert
lucashalbert / configure_k8s.sh
Created March 7, 2019 17:31
Script to install and configure kubernetes on CentOS-7
#######################
# === All Systems === #
#######################
# Ensure system is fully patched
sudo yum -y makecache fast
sudo yum -y update
# Disable swap
sudo swapoff -a
@lucashalbert
lucashalbert / bind-util.sh
Last active March 19, 2019 13:42
Utilizes named and DNSSEC utilities to assist in generating KSKs and ZSKs as well as assisting in signing DNS zones with DNSSEC. This utility also has the ability to leverage rndc commands for reloading/refreshing zones on local and remote bind servers.
#!/bin/bash
print_version() {
cat <<EOF
##########################################################################
#
# Author: Lucas Halbert <contactme@lhalbert.xyz>
# Date: 04/29/2016
# Last Edited: 03/07/2019
# Version: 2019.03.07
# Description: Utilizes named and DNSSEC utilities to assist in
@lucashalbert
lucashalbert / Get-VMwareSnapshots.ps1
Last active April 8, 2019 14:36
Creates an HTML snapshot report from the specified vSphere/vCenter server.
<#
####################################################################################
#
# Author: Lucas Halbert <contactme@lhalbert.xyz>
# Date Written: 4/24/2018
# Date Modified: 04/08/2019
# Version: 2019.04.08
# Description: Creates an HTML snapshot report from the specified
# vSphere/vCenter server. This script requires that the VMware
# PowerCLI module to be installed and loaded.
@lucashalbert
lucashalbert / Chrome-thisisunsafe.ahk
Created March 5, 2019 19:47
AutoHotKey script to send the string "thisisunsafe" when navigating to an "unsafe" page in Chrome.
; AutoHotKey script to send the string "thisisunsafe" when navigating to an "unsafe" page in Chrome.
#F5::Send, thisisunsafe