Skip to content

Instantly share code, notes, and snippets.

@acidprime
acidprime / puppetserver.log
Created September 17, 2014 20:20
SSL Error
2014-09-17 13:04:44,199 INFO [p.s.j.jruby-puppet-service] Initializing the JRuby service
2014-09-17 13:04:44,283 INFO [p.t.s.w.jetty9-service] Initializing web server(s).
2014-09-17 13:05:05,242 INFO [puppet-server] Puppet settings initialized; run mode: master
2014-09-17 13:05:08,284 INFO [p.s.j.jruby-puppet-core] Finished creation the JRubyPuppet instance for the production environment 1 of 3
2014-09-17 13:05:08,367 INFO [p.s.c.puppet-server-config-core] Not overriding webserver settings with values from core Puppet
2014-09-17 13:05:20,918 INFO [p.p.certificate-authority] Master already initialized for SSL
2014-09-17 13:05:20,936 INFO [p.e.s.m.master-service] Master Service adding a ring handler
2014-09-17 13:05:20,951 WARN [o.e.j.s.h.ContextHandler] Empty contextPath
2014-09-17 13:05:20,966 INFO [p.s.c.certificate-authority-service] CA Service adding a ring handler
2014-09-17 13:05:20,969 WARN [o.e.j.s.h.ContextHandler] Empty contextPath
@acidprime
acidprime / lint_report.rb
Created September 3, 2014 22:42
This was pretty dirty but got the job done
#!/usr/bin/ruby
require 'rubygems'
require 'lint-report'
require 'json'
def sort_checks(breakdown)
result = breakdown.collect do |hash|
hash.collect do |name,checks|
result = Hash.new(0)
checks.each do |check|
  file { 'lookatme':
    ensure => file,
    all    => shiny,
  }
@acidprime
acidprime / post_recieve_overview.png
Last active December 25, 2015 17:29
post_recieve_overview
post_recieve_overview.png
@acidprime
acidprime / getPlatformPortName.py
Created September 12, 2013 07:17
Get the systems ethernet BSD device
#!/usr/bin/python
import re
import commands
import plistlib
from subprocess import Popen, PIPE, STDOUT
networksetup = '/usr/sbin/networksetup'
sysctl = '/usr/sbin/sysctl'
# Hardware Test for MacbookAir,*
@acidprime
acidprime / genMachineCert.py
Created September 12, 2013 01:12
Generate a new CSR sing M$ CA services
#!/System/Library/Frameworks/Python.framework/Versions/2.6/bin/python
openssl = '/usr/bin/openssl'
curl = '/usr/bin/curl'
sed = '/usr/bin/sed'
kinit = '/usr/bin/kinit'
import urllib
import re
from subprocess import Popen, PIPE, STDOUT
## Get TGT via kinit - If 2k3, use password method if 2k8
@acidprime
acidprime / makeCSRRequest.py
Last active December 22, 2015 20:39
Python Example of Openssl commands needed for CSRs needed for windows
#!/System/Library/Frameworks/Python.framework/Versions/2.6/bin/python
openssl = '/usr/bin/openssl'
from subprocess import Popen, PIPE, STDOUT
def generateUserCSR(user_name,key,csr):
arguments = [
openssl,
'req',
'-new',
'-batch',
@acidprime
acidprime / getTGTpassword.py
Created September 11, 2013 17:58
Get a 10.6 style AD Password using the bridge
#!/System/Library/Frameworks/Python.framework/Versions/2.6/bin/python
from Cocoa import NSDictionary
def getTGTpassword():
path = '/Library/Preferences/DirectoryService/ActiveDirectory.plist'
plist = NSDictionary.dictionaryWithContentsOfFile_(path)
if 'AD Computer Password' in plist:
nsdata = plist['AD Computer Password']
@acidprime
acidprime / dsMachineCert.py
Last active December 22, 2015 19:29
Extract Machine Certificate using dscl
#!/usr/bin/python
import plistlib
import binascii
from subprocess import Popen, PIPE, STDOUT
dscl = '/usr/bin/dscl'
openssl = '/usr/bin/openssl'
xxd = '/usr/bin/xxd'
@acidprime
acidprime / confignet.py
Created September 11, 2013 05:18
System Configuration Manual Key Manipulation
#!/usr/bin/python
import os # To run commands
import sys # The exits string
import plistlib # The property list library
# Command Declarations
scprefs = '/Library/Preferences/SystemConfiguration/preferences.plist'
scselect = '/usr/sbin/scselect'
network = '/usr/sbin/networksetup'
pl = plistlib.Plist.fromFile(scprefs)