For excessively paranoid client authentication.
Updated Apr 5 2019:
because this is a gist from 2011 that people stumble into and maybe you should AES instead of 3DES in the year of our lord 2019.
some other notes:
Sample Puppet Deployment using r10k, dynamic environments and hiera to manage macs. No puppet master needed.
This example uses dayglojesus's 'managedmac' module: https://github.com/dayglojesus/managedmac which is well documented here. http://dayglojesus.github.io/managedmac/
The Hiera data is public here (with scrambled passwords etc): https://github.com/groob/hieradata_public
The environment repo is here: https://github.com/whitby/puppet-environment
Function WSUSUpdate { | |
$Criteria = "IsInstalled=0 and Type='Software'" | |
$Searcher = New-Object -ComObject Microsoft.Update.Searcher | |
try { | |
$SearchResult = $Searcher.Search($Criteria).Updates | |
if ($SearchResult.Count -eq 0) { | |
Write-Output "There are no applicable updates." | |
exit | |
} | |
else { |
# Key considerations for algorithm "RSA" ≥ 2048-bit
openssl genrsa -out server.key 2048
# Key considerations for algorithm "ECDSA" ≥ secp384r1
# List ECDSA the supported curves (openssl ecparam -list_curves)
### | |
### | |
### UPDATE: For Win 11, I recommend using this tool in place of this script: | |
### https://christitus.com/windows-tool/ | |
### https://github.com/ChrisTitusTech/winutil | |
### https://www.youtube.com/watch?v=6UQZ5oQg8XA | |
### iwr -useb https://christitus.com/win | iex | |
### | |
### |
import objc | |
from Foundation import NSBundle | |
# Predefine some opaque types | |
DASessionRef = objc.createOpaquePointerType('DASessionRef', b'^{__DASession=}', None) | |
DADiskRef = objc.createOpaquePointerType('DADiskRef', b'^{__DADisk=}', None) | |
# Load DiskManagement framework classes | |
DiskManagment = objc.loadBundle('DiskManagment', globals(), bundle_path='/System/Library/PrivateFrameworks/DiskManagement.framework') |
#!/bin/bash | |
OVPN_FILE="${1}" | |
OUTPUT_PREFIX="${2}" | |
if [ ! -e "${OVPN_FILE}" ]; then | |
echo "File not found: ${OVPN_FILE}" | |
exit 1 | |
fi |
import objc | |
from Foundation import NSBundle | |
IOKit = NSBundle.bundleWithIdentifier_('com.apple.framework.IOKit') | |
functions = [("IOServiceGetMatchingService", b"II@"), | |
("IOServiceMatching", b"@*"), | |
("IORegistryEntryCreateCFProperties", b"IIo^@@I"), | |
("IOPSCopyPowerSourcesByType", b"@I"), | |
("IOPSCopyPowerSourcesInfo", b"@"), |
'use strict'; | |
exports.handler = (event, context, callback) => { | |
// Get request and request headers | |
const request = event.Records[0].cf.request; | |
const headers = request.headers; | |
// Configure authentication | |
const authUser = 'user'; | |
const authPass = 'pass'; |
from nibbler import * | |
from Foundation import NSTimer, NSObject | |
from AppKit import NSApplication | |
n = Nibbler('/Users/frogor/Desktop/sweet.nib') | |
def test2(): | |
print "hi (politely quit)" | |
n.quit() |