Skip to content

Instantly share code, notes, and snippets.

View gjyoung1974's full-sized avatar
🎯
Focusing

Gordon Young gjyoung1974

🎯
Focusing
View GitHub Profile
## Load the ServerManager
Import-Module ServerManager
## Install the ADCS Certification Authority Feature
Add-WindowsFeature Adcs-Cert-Authority
# Install an issuing ca with the appropriate properties
Install-AdcsCertificationAuthority -CAType EnterpriseSubordinateCa -OverwriteExistingDatabase -OverwriteExistingKey -OverwriteExistingCAinDS -CACommonName "ACME DEV Issuing Certification Authority" -CADistinguishedNameSuffix “DC=CORP, DC=ACME,DC=com” -CryptoProviderName "RSA#Microsoft Software Key Storage Provider" -KeyLength 2048 -HashAlgorithmName SHA256
[Version]
Signature = "$Windows NT$"
[PolicyStatementExtension]
Policies = ManagementPolicy
Critical = 0
[ManagementPolicy]
OID = 2.16.840.1.114171.999.9.9
Notice = "BLAHBLAH stuff about the policy"
URL = "http://pki.gordonyoung.us/ACME_Certificate_Policy_and_Certification_Practice_Statement.pdf"
<#::::::::::::::::::::::::::::::::::::::::::::::::
:: 2017 Gordon Young, gjyoung1974@gmail.com ::
:: The purpose of this script ::
:: is to perform post installation ::
:: of an AD certificate services CA ::
::::::::::::::::::::::::::::::::::::::::::::::::::#>
##
# !!! The AIA and CDP values must be edited per each unique CA !!
#################################################
# #
# A script to submit a batch of CSRs to a CA #
# #
#################################################
## put this script the directory with your certificate signing requetss
$files = Get-ChildItem ".\"
# be sure to adjust the $cmdArgs to reflect the appropriate certificate template
#!/usr/bin/python
__author__ = 'gjyoung1974@gmail.com'
import xml.etree.ElementTree as ET # leverage ElementTree to parse the response
import http.client # leverage the native HTTP Client
VoltageSDAURL = 'voltage-pp-0000.gordonyoung.us' # Set the URL For the Voltage IBA SecureData Appliance
PlaintextPAN = '4444555566662222' # Plaintext PAN to protect
ProtectionFormat = 'CC' # Data Protection Format to use
Identity = 'gyoung@gordonyoung.us' # IBE Identity
-- Table: public.persons
CREATE TABLE public.persons
(
personid integer,
lastname character varying(255) COLLATE pg_catalog."default",
firstname character varying(255) COLLATE pg_catalog."default",
address character varying(255) COLLATE pg_catalog."default",
city character varying(255) COLLATE pg_catalog."default"
)
WITH (
@gjyoung1974
gjyoung1974 / atom-config-storage.txt
Created March 5, 2017 03:43
atom-config-storage
#
@gjyoung1974
gjyoung1974 / service_now.js
Created March 3, 2017 20:26
Query service now..
// 2017 gjyoung1974@gmail.com
// A script to query service now
process.env.NODE_TLS_REJECT_UNAUTHORIZED = "0"; //ignore the issuer certificate !!NEVER DO THIS IN PROD!!!
var https = require('https');
// set up our options
var options = {
host: 'someplace.service-now.com',
port: 443,
path:'/api/now/table/sc_request',
@gjyoung1974
gjyoung1974 / call_liebsoft_erpm_api.js
Last active March 8, 2017 23:53
Call a Lieberman ERPM API and return the auth token
/*
2016 Gordon Young, gjyoung1974@gmail.com
An example for calling the LiebSoft ERPM REST API
This Javascript calls the DoLogin2 method
and returns an API token for calling further methods
*/
var http = require('https'); //Call the API over HTTPS
//ignore Self-Signed SSL Certificate in test environment *** NEVER DO THIS IN PRODUCTION ***
@gjyoung1974
gjyoung1974 / erpm_checkout_credential.js
Last active March 11, 2017 17:35
erpm_checkout_credential.js
/*
2016 Gordon Young, gjyoung1974@gmail.com
A node.js example for calling the LiebSoft ERPM REST API
This Javascript calls the DoLogin2 method
and returns an API token for calling further methods
*/
var http = require('https'); //Call the API over HTTPS
//ignore Self-Signed SSL Certificate in test environment *** NEVER DO THIS IN PRODUCTION ***