Skip to content

Instantly share code, notes, and snippets.

View gjyoung1974's full-sized avatar
🎯
Focusing

Gordon Young gjyoung1974

🎯
Focusing
View GitHub Profile
@gjyoung1974
gjyoung1974 / erpm_get_shared_password.ps1
Created March 12, 2017 20:32
erpm_get_shared_password.ps1
Get-LSSharedCredential -AuthenticationToken "" -AccountName "svc.tomcat" -SharedCredentialList "tomcat_passwords" -SystemName "tomcat01" -Comment "test"
@gjyoung1974
gjyoung1974 / ERPM_API_Load_Test.xml
Last active March 20, 2017 13:45
JMeter Load testing script for Lieberman's ERPM platform
<?xml version="1.0" encoding="UTF-8"?>
<jmeterTestPlan version="1.2" properties="3.1" jmeter="3.1 r1770033">
<hashTree>
<TestPlan guiclass="TestPlanGui" testclass="TestPlan" testname="ERPM_API_Key_Thread_Load_Test" enabled="true">
<stringProp name="TestPlan.comments"></stringProp>
<boolProp name="TestPlan.functional_mode">false</boolProp>
<boolProp name="TestPlan.serialize_threadgroups">false</boolProp>
<elementProp name="TestPlan.user_defined_variables" elementType="Arguments" guiclass="ArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
<collectionProp name="Arguments.arguments"/>
</elementProp>
@gjyoung1974
gjyoung1974 / TLS_Hardening_Windows.ps1
Last active March 20, 2017 19:35
Windows TLS Hardening
# Harden Windows TLS
param([bool]$allowReboot = $false)
Function UpdateRegistryPath($path){
if(test-path $path){
return $false
}
write-Host "Creating registry path: $path"
@gjyoung1974
gjyoung1974 / harden-tls.ps1
Last active March 29, 2017 22:38
harden-tls.ps1
# Copyleft 2017, Gordon Young
# A script to harden MSFT Windows SCHANNEL's TLS provider
# Version 1.0
# install a an ECDSA cert with a resonable cure and turn off the weakc protocols crypto & cipher suites.
Write-Host 'Configuring IIS with SSL/TLS Deployment Best Practices...'
Write-Host '--------------------------------------------------------------------------------'
# Disable Multi-Protocol Unified Hello
<!-- PostGreSQL DB Config with plaintext password -->
<!-- <Resource
auth="Container"
driverClassName="org.postgresql.Driver"
maxIdle="10"
maxTotal="20"
maxWaitMillis="-1"
name="jdbc/postgres"
password="password"
type="javax.sql.DataSource"
@gjyoung1974
gjyoung1974 / read_reg_multi_sz_test.js
Created March 30, 2017 19:21
test a registry key for a given value via javascript
// Gordon Young 2017 gjyoung1974@gmail.com
// This script :
// 1. Reads the given MSFT Windows registry subkey value reg_multi_sz data type
// 2. Compares it to the provided expected setting
// if the configured setting is compliant the script returns 'pass',
// if the setting is non-compliant the script returns 'fail'
//The registry path we want to test
var hklm = 0x80000002, KeyName = "System\\CurrentControlSet\\Services\\LanManServer\\Parameters", ValueName = "NullSessionPipes";
//Java using the Javax JSP stuff:
//************************************************
package org.drg00n.util.dtmf;
import javax.sound.sampled.AudioFormat;
import javax.sound.sampled.AudioSystem;
import javax.sound.sampled.SourceDataLine;
/*Implement a DTMF dialer with javax’s DSP
@gjyoung1974
gjyoung1974 / listen-port.ps1
Created April 7, 2017 18:05
TCP Port listener & echo server
# A stupid TCP Listener
# telnet or netcat to the port
# type something and hit enter
# the typed bytes are echoed by this script
function listen-port ($port) {
$endpoint = new-object System.Net.IPEndPoint ([system.net.ipaddress]::any, $port)
$listener = new-object System.Net.Sockets.TcpListener $endpoint
$listener.start()
@gjyoung1974
gjyoung1974 / AutoPublish.ps1
Last active April 14, 2017 15:22
Autopublisher for PKI CRLs
#########################################################
#
# AutoPublish.ps1
# 2017 Gordon Young gjyoung1974@gmail.com
#
# This script copies local X.509v2 CRL files from A CA's local disk
# to remote UNC Paths only if local file is newer than remote
#
# Note: Outcome of this script is writen to local windows event log
# Application Event Log, "CRL Publish Script" event ID 5000
node {
def mvnHome
stage('Preparation') { // for display purposes
// Get some code from a GitHub repository
git 'https://github.com/gjyoung1974/Secure_Connection_Pool.git'
// Get the Maven tool.
// ** NOTE: This 'M3' Maven tool must be configured
// ** in the global configuration.
mvnHome = tool 'M3'
}