Skip to content

Instantly share code, notes, and snippets.

View HatBeardMe's full-sized avatar

Rick Egli HatBeardMe

View GitHub Profile
@HatBeardMe
HatBeardMe / README.md
Created November 1, 2023 15:58
How to renew Sophos UTM 9 licenses via CLI

If a license expires and AD authentication is disabled, you can either log into the web console via the admin credentials found in Thycotic, or if you can SSH in, do this as root.

  1. Login via SSH
  2. Create two text files
    • license.txt
      • Paste in license file contents
    • license_install.pl
      • Paste in the following Perl script
@HatBeardMe
HatBeardMe / vault-diff.sh
Last active August 17, 2018 18:07
Based on https://stackoverflow.com/a/29938712; uses a password prompt instead of permanent vault password file
#!/bin/bash
vault_file=`mktemp`
if [[ -z $1 ]]; then
echo "requires input file name, relative to repo base directory"
exit 1
else
file="$1"
fi
@HatBeardMe
HatBeardMe / _service.md
Last active October 19, 2017 21:47 — forked from naholyr/_service.md
Sample /etc/init.d script

Sample service script for debianoids

Look at LSB init scripts for more information.

Usage

Copy to /etc/init.d:

# replace "$YOUR_SERVICE_NAME" with your service's name (whenever it's not enough obvious)
@HatBeardMe
HatBeardMe / TODO
Created October 11, 2017 05:39 — forked from perrygeo/TODO
Ansible playbook for a full dev environment
TODO
implement security measures
git config
config files
full sublimetext config
set up openvpn
rdesktop and network drive to terra
set up evolution
RStudio
@HatBeardMe
HatBeardMe / status.sh
Last active March 19, 2019 17:26
Print HTTP Response Code for $1
function status { curl --location --write-out "%{http_code}\n" --silent --insecure --output /dev/null "$1" }
@HatBeardMe
HatBeardMe / pingt.sh
Created August 4, 2017 22:35
Continuously pings $1 and displays current timestamp with elapsed time
function pingt { begin=$(date +%s);ping -t $1 | while read pong; elapsed=$(($(date +'%s') - $begin));do echo "$(date +'%H:%M:%S') | Elapsed: $(printf '%4s' "$elapsed") | $pong";done }
@HatBeardMe
HatBeardMe / br-install.bat
Created May 5, 2017 23:11
Installer script for Breach Radar
@ECHO off
IF EXIST "C:\PROGRA~2\BREACH~1\unins000.exe" (
ECHO[
ECHO It seems like Breach Radar is currently installed...
ECHO[
CHOICE /M "Would you like to uninstall?"
IF ERRORLEVEL ==2 (
ECHO[
ECHO Aborting Install.
@HatBeardMe
HatBeardMe / aws-fingerprint.sh
Created March 1, 2017 17:52
Script to check AWS SSH key fingerprint
#!/bin/bash
# $1 is path to ssh key
openssl pkcs8 -in "$1" -nocrypt -topk8 -outform DER|openssl sha1 -c |awk -F"= " '{print $2}'
@HatBeardMe
HatBeardMe / DisableOneDrivePin.reg
Created January 8, 2017 21:39
Disable (hide) OneDrive Personal from Windows Explorer navigation pane
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\CLSID\{018D5C66-4533-4307-9B53-224DE2ED1FE6}]
@="OneDrive"
"System.IsPinnedToNameSpaceTree"=dword:00000000
@HatBeardMe
HatBeardMe / create_sourcelists.sh
Created December 8, 2016 22:50 — forked from cryptoniteio/create_sourcelists.sh
Script to create source lists from license key.
#!/bin/bash
echo "Please enter your new license key (It is case sensitive):"
read new_key
echo -n "Creating Source Lists"