Skip to content

Instantly share code, notes, and snippets.

@mboman
mboman / atomic-prereq-fix.py
Last active March 31, 2023 14:50
Filter out Atomic Red Team tests where input_arguments or get_prereq_command is references a URL or a temporary directory (Atomic Red Team Issue #2350)
import re
import xlsxwriter
from yaml import load
try:
from yaml import CLoader as Loader, CDumper as Dumper
except ImportError:
from yaml import Loader, Dumper
@mboman
mboman / dyndns53.py
Last active August 29, 2015 13:55 — forked from vrypan/dyndns53.py
#!/usr/bin/env python
from slick53 import route53
from boto.route53.exception import DNSServerError
import requests
import sys
from datetime import datetime
# Modified from https://markcaudill.me/blog/2012/07/dynamic-route53-dns-updating-with-python/
@mboman
mboman / dhcpd.conf
Created March 28, 2012 08:37 — forked from tomoconnor/dhcpd.conf
snippet to show usage of dhcp-event (don't forget to set apparmor to allowing (complain) mode)
subnet 192.168.0.0 netmask 255.255.255.0 {
range 192.168.0.100 192.168.0.200;
option broadcast-address 192.168.0.255;
option routers 192.168.0.1;
on commit {
set ClientIP = binary-to-ascii(10, 8, ".", leased-address);
set ClientMac = binary-to-ascii(16, 8, ":", substring(hardware, 1, 6));
log(concat("Commit: IP: ", ClientIP, " Mac: ", ClientMac, "Hostname: ", host-decl-name));
execute("/usr/local/bin/dhcp-event", "commit", ClientIP, ClientMac, host-decl-name);
}