Skip to content

Instantly share code, notes, and snippets.

Avatar

Colin Cogle rhymeswithmogul

View GitHub Profile
View openpgp.md
@rhymeswithmogul
rhymeswithmogul / pygopherd-ipv6.patch
Created Dec 1, 2021
Add IPv6 support to PyGopherD 3.0.0 because I'm a little insane.
View pygopherd-ipv6.patch
--- /tmp/server.py 2021-11-29 00:36:15.635976398 +0000
+++ server.py 2021-11-29 01:34:51.548265273 +0000
@@ -38,7 +38,7 @@
self.socket.setsockopt(socket.SOL_SOCKET, socket.SO_RCVTIMEO, timeout)
self.socket.setsockopt(socket.SOL_SOCKET, socket.SO_SNDTIMEO, timeout)
- host, port = self.socket.getsockname()
+ host, port, flowinfo, scopeid = self.socket.getsockname()
if self.config.has_option("pygopherd", "servername"):
self.server_name = self.config.get("pygopherd", "servername")
@rhymeswithmogul
rhymeswithmogul / Compress-Assets.ps1
Last active Dec 1, 2021
Generate statically-compressed assets for NGINX
View Compress-Assets.ps1
#!/usr/bin/env pwsh
<#PSScriptInfo
.VERSION 1.0.0
.GUID ca796623-622f-44ad-89f0-111c147eba79
.AUTHOR Colin Cogle
.COPYRIGHT © 2021 Colin Cogle. Licensed under the Affero GPL, version 3 or later.
.TAGS nginx, gzip, Brotli, compression
.LICENSEURI https://www.gnu.org/licenses/agpl-3.0.en.html
.PROJECTURI https://gist.github.com/rhymeswithmogul/20d5cb31a4c90c3a21d9175b1564669d
#>
@rhymeswithmogul
rhymeswithmogul / Disable-PrintSpooler.ps1
Last active Aug 29, 2021
Disable Print Spooler to protect against PrintNightmare
View Disable-PrintSpooler.ps1
<#PSScriptInfo
.VERSION 1.0.8
.GUID c77c6ecf-69d1-4bb3-bbc2-ea3d8aa91297
.AUTHOR Colin Cogle
.COPYRIGHT (c) 2021 Colin Cogle. All Rights Reserved. Licensed under the AGPL, version 3 or later.
.TAGS PrintNightmare, print, printer, spooler, security, DC, ADDS, CVE
.LICENSEURI https://www.gnu.org/licenses/agpl-3.0.en.html
.PROJECTURI https://gist.github.com/rhymeswithmogul/088e5b6ba075cbe3e0f17222797fd3aa
.EXTERNALMODULEDEPENDENCIES Microsoft.PowerShell.Management
.RELEASENOTES This minor version doesn't try to disable an already-disabled service.
@rhymeswithmogul
rhymeswithmogul / Revert-M365AppsFrom2104.ps1
Last active May 12, 2021
There are severe Outlook issues with version 2104. (Install-Script Revert-M365AppsFrom2104)
View Revert-M365AppsFrom2104.ps1
<#PSScriptInfo
.VERSION 1.0.1
.GUID ea95d532-3b54-48b0-97ef-45f16237e277
.AUTHOR Colin Cogle
.COPYRIGHT (c) 2021 Colin Cogle. All Rights Reserved. Licensed under the AGPLv3.
.TAGS Microsoft, screwed, up, again, 2104, Office, 2016, 2019, Current Channel, Outlook, bug, email, M365, update, devops-fail
.LICENSEURI https://www.gnu.org/licenses/agpl-3.0.en.html
.PROJECTURI https://gist.github.com/rhymeswithmogul/f6d5c37ed3058802e9cb94e637e989c9
.RELEASENOTES Documentation updates, link to PowerShell Gallery, remove swearing for broader public release.
#>
@rhymeswithmogul
rhymeswithmogul / DomainAnalyzer.ps1
Last active Jun 8, 2021
A large smattering of random lookups for discovery purposes.
View DomainAnalyzer.ps1
<#PSScriptInfo
Colin's untitled domain analyzer
Copyright (c) 2021 Colin Cogle.
This program is free software: you can redistribute it and/or modify it under
the terms of the GNU Affero General Public License as published by the Free
Software Foundation, either version 3 of the License, or (at your option) any
later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY
@rhymeswithmogul
rhymeswithmogul / FlashKiller.ps1
Last active Dec 15, 2020
A script to download and install KB4577586, the update to remove and block Adobe Flash Player. `Install-Script FlashKiller`
View FlashKiller.ps1
<#PSScriptInfo
.VERSION 1.0
.GUID d3aa9909-cd37-4154-81d2-7e6ef3c776ce
.AUTHOR Colin Cogle
.COPYRIGHT (c) 2020 Colin Cogle. All rights reserved.
.TAGS Adobe, Flash, Player, swf, killer, KB4577586
.LICENSEURI https://www.gnu.org/licenses/agpl-3.0.en.html
.PROJECTURI https://gist.github.com/rhymeswithmogul/1346f32de625962b17adc713d0ac350c
#>
@rhymeswithmogul
rhymeswithmogul / Mitigate-MsNrpcVulnerability.ps1
Last active Aug 18, 2020
Protect your domain against CVE-2020-1472 before Microsoft does it for you.
View Mitigate-MsNrpcVulnerability.ps1
<#
.NOTES
Mitigate-MsNrpcVulnerability.ps1, version 1.0.3 (2020-08-18)
Copyright (c) 2020 Colin Cogle <colin@colincogle.name>
Downloaded from https://gist.github.com/rhymeswithmogul/da05c08d0b854d568e7b98a38e449324
This program is free software: you can redistribute it and/or modify it under
the terms of the GNU Affero General Public License as published by the Free
Software Foundation, either version 3 of the License, or (at your option) any
View Apply-SIGredMitigation.ps1
<#
.NOTES
Apply-SIGredMitigation.ps1, version 1.0.1
Copyright (C) 2020 Colin Cogle <colin@colincogle.name>
Downloaded from https://gist.github.com/rhymeswithmogul/36a815c3c8336bfab3b0ef3bbe7955c3
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version.
@rhymeswithmogul
rhymeswithmogul / Find-SSDTimeBombs.ps1
Last active May 12, 2021
Check your HPE SSD's for the 32,768-hour time bomb and the 40,000-hour time bomb.
View Find-SSDTimeBombs.ps1
<#
.NOTES
Find-SSDTimeBombs.ps1, version 1.0.1
Copyright (c) 2020 Colin Cogle <colin@colincogle.name>.
This program is free software: you can redistribute it and/or modify it under
the terms of the GNU Affero General Public License as published by the Free
Software Foundation, either version 3 of the License, or (at your option) any
later version.