Skip to content

Instantly share code, notes, and snippets.

View rtc-dmcnish's full-sized avatar

Doug McNish rtc-dmcnish

View GitHub Profile
@rtc-dmcnish
rtc-dmcnish / gist:7bf468bedea893d009978de3aaf079e9
Created September 26, 2025 13:45
Spawn containers for L2 testing
#!/bin/bash
# Create Docker network
docker network create \
--driver=bridge \
--subnet=192.168.88.0/24 \
--gateway=192.168.88.1 \
--opt com.docker.network.bridge.name=br-lab \
labnet
@rtc-dmcnish
rtc-dmcnish / nmap.xsl
Last active May 15, 2025 18:31
NMAP XML to CSV transform
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="text"/>
<xsl:template match="/nmaprun">
IP,State,Reason,Hostname
<xsl:for-each select="host">
<xsl:value-of select="address/@addr"/>,<xsl:value-of select="status/@state"/>,<xsl:value-of select="status/@reason"/>,<xsl:value-of select="hostnames/hostname/@name"/>,