Skip to content

Instantly share code, notes, and snippets.

@sbingner
sbingner / Update-ACMECerts.ps1
Created May 4, 2019 09:16
letsEncrypt cert updates for Exchange
import-module ACMESharp
#
# Script parameters
#
$domain = "mail.yourdomain.com"
$sans = @("autodiscover.yourdomain.com")
$exchangeServers = @("EX01", "EX02", "EX03");
$iissitename = "Default Web Site"
@sbingner
sbingner / copyBootHash.c
Last active July 17, 2018 08:38
copyBootHash
char *copyBootHash(void) {
unsigned char buf[1024];
uint32_t length = 1024;
io_registry_entry_t chosen = IORegistryEntryFromPath(kIOMasterPortDefault, "IODeviceTree:/chosen");
if (!MACH_PORT_VALID(chosen)) {
printf("Unable to get IODeviceTree:/chosen port\n");
return NULL;
}
@sbingner
sbingner / startSSL.pl
Last active April 28, 2016 11:31
StartSSL Certificate Creation
#!/usr/bin/perl
# USAGE: startSSL.pl DOMAIN1 DOMAIN2 ...
#
# Requires:
# - client.crt and client.key in same directory as startSSL.pl
# - DOMAIN.csr in the current directory for each domain (in PEM format)
#
# Outputs: DOMAIN.crt to current directory in PEM format
#