Skip to content

Instantly share code, notes, and snippets.

View grahamhelton's full-sized avatar

Graham Helton grahamhelton

View GitHub Profile
@grahamhelton
grahamhelton / dockerload.sh
Last active May 30, 2024 23:55
Build tool into docker image
# Install certipy
apt update -y &> /dev/null && apt upgrade -y &> /dev/null && apt install -y python3 python3-pip &> /dev/null && pip3 install certipy-ad &> /dev/null ; echo -e "\033[0;32m - Certipy installed \033[0m"
# List containers, identify container id
sudo docker container ls
# Stage the current container into an image
sudo docker commit <container_id> <image_name>
# Save the image as a .tar file
@grahamhelton
grahamhelton / getsha1
Created January 21, 2024 04:41
Grabs the sha1sum of a remote github repo and then prints the nixos configuration to download it on rebuild
if [ $# -ne 2 ]
then
echo "Usage: getsha1 <github_url> <path_to_store_file>
IE: getsha1 https://github.com/danielmiessler/SecLists Documents/wordlists/seclists"
exit
fi
github="$1"
sha1=$(git ls-remote $1 | awk '{print $1}' | head -n 1)
echo "
home.file = {