This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python3 | |
""" | |
dyndns_cloudflare | |
This is a Python 3.8+ script that will attempt to identify a computer's external IPv4 and "static" (non RFC 4941) IPv6 | |
addresses to then update Cloudflare DNS entries. It currently supports A, AAAA, and the new HTTPS DNS record types. For | |
HTTPS records, it will embed the "ipv4hints" and "ipv6hints" values into the record along with the ALPN specified in the | |
config. It has optional support for saving the IPv4 and IPv6 addresses from the last run of the program to avoid | |
unnecessary updates. | |
**Note that it only updates DNS records: the records must already exist and it will not delete any records. If you add more |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
""" | |
caddy_autoupgrade | |
This is a simplistic Python 3.8+ script that will download the latest available version of Caddy (with plugins!), | |
compare to the existing Caddy, and will replace/upgrade if the downloaded version is different. It also has rudimentary | |
systemd support to stop and restart the service after upgrade. | |
It was written by Brian Turek (https://github.com/Caligatio) and released under the Unlicense (https://unlicense.org/). | |
""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# GROK Custom Patterns (add to patterns directory and reference in GROK filter for iptables events): | |
# GROK Patterns for iptables Logging Format | |
# | |
# Created 6 Aug 2016 by Brian Turek <[email protected]> | |
# Most of this was taken from another source but now I cannot find it for credit | |
# | |
# Usage: Use the IPTABLES pattern | |
NETFILTERMAC %{MAC:dest_mac}:%{MAC:src_mac}:%{ETHTYPE:ethtype} | |
ETHTYPE (?:(?:[A-Fa-f0-9]{2}):(?:[A-Fa-f0-9]{2})) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# GROK Custom Patterns (add to patterns directory and reference in GROK filter for pfSense events): | |
# GROK Patterns for pfSense 2.3 Logging Format | |
# | |
# Created 27 Jan 2015 by J. Pisano (Handles TCP, UDP, and ICMP log entries) | |
# Edited 14 Feb 2015 by Elijah Paul [email protected] | |
# Edited 10 Mar 2015 by Bernd Zeimetz <[email protected]> | |
# Edited 6 Aug 2016 by Brian Turek <[email protected]> | |
# taken from https://gist.github.com/elijahpaul/3d80030ac3e8138848b5 | |
# - adding PFSENSE_IGMP_DATA | |
# - moved and tweaked IPv4 ECN pattern (ecn is a WORD, not INT) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from httplib import HTTPSConnection | |
import urllib2 | |
import socket | |
import ssl | |
class VerifiedHTTPSConnection(HTTPSConnection): | |
''' | |
Modified version of the httplib.HTTPSConnection class that forces server | |
certificate validation | |
''' |