Skip to content

Instantly share code, notes, and snippets.

View gjyoung1974's full-sized avatar
🎯
Focusing

Gordon Young gjyoung1974

🎯
Focusing
View GitHub Profile
import subprocess
import docker
from kubernetes import client, config
from tenable.cs import ContainerSecurity
from jira import JIRA
dockerClient = docker.from_env()
config.load_kube_config()
v1 = client.CoreV1Api()
@gjyoung1974
gjyoung1974 / Call_Soap_API.js
Created October 24, 2016 02:36
Call a SOAP API from Javascript
//post to a SOAP API
var http = require('http');
var s_Pan = '378282246310005'; //get the unprotected PAN from the form
var s_DPFormat = 'CC'; //get the data protection Format
var s_Identity = 'user@domain.com'; //get the data protection Format
var s_AuthInfo = 'p3ssw3rd'; //get the data protection Format
//Marshal up a ProtectFormattedData SOAP Mesage:
var soapRequest =
@gjyoung1974
gjyoung1974 / direwolf.conf
Created May 7, 2023 22:50
Direwolf Config
ADEVICE plughw:1,0
PTT cm108 -3 /dev/hidraw0
ACHANNELS 1
CHANNEL 0
MYCALL N8VNP-0
MODEM 1200
AGWPORT 8000
KISSPORT 8001
@gjyoung1974
gjyoung1974 / default.xml
Created May 1, 2023 22:06
TOPAZ Regional Wireless Cooperative (TRWC) SDRTrunk playlist
<playlist version="4">
<channel system="TOPAZ Regional Wireless Cooperative (TRWC)" name="Mesa-Gilbert-Apache-Junction" enabled="false" site=" Mesa Simulcast" order="1">
<alias_list_name></alias_list_name>
<source_configuration type="sourceConfigTunerMultipleFrequency" preferred_tuner="RTL-2832/R820T 00000001" frequency_rotation_delay="400" source_type="TUNER_MULTIPLE_FREQUENCIES">
<frequency>852750000</frequency>
<frequency>852825000</frequency>
<frequency>853275000</frequency>
<frequency>853350000</frequency>
<frequency>852075000</frequency>
<frequency>852250000</frequency>
@gjyoung1974
gjyoung1974 / keys.pub
Created January 26, 2023 22:22
Keys.pub key
BEGIN MESSAGE.
f10uukHLRJIGQy1 QiwsWViJKJPtUKB QGKV48JMS5HzmZ8 VTfMQN9yVA14dxH
t9aEcoYRG0dyeOw beHtJu5cCd8TCKq 6Xr2MZHgg4XUcyE aoAgCoijh8Qurco
xLbV96C8DQqSqYz ITFvxooLcOdBwam JPhnkqv6YS4XzSY FUH9RHFNZfJxc84
DJxReaMKkylEWX2 X111VnbzeB1Gxvn qtXa50aLMzWSiL.
END MESSAGE.
#!/usr/bin/python
"""
Implements an RFC 5424 compliant SysLog agent/client on MSFT Windows Server.
We live in a Internet world, Windows needs Syslog for WinEVT...
"""
import socket
import json
import win32con
import win32event
@gjyoung1974
gjyoung1974 / aws_cli_cheat_sheet.txt
Created March 30, 2019 01:52
AWS CLI Cheat sheet
# Count total EBS based storage in AWS
aws ec2 describe-volumes | jq "[.Volumes[].Size] | add"
# Count total EBS storage with a tag filter
aws ec2 describe-volumes --filters "Name=tag:Name,Values=CloudEndure Volume qjenc" | jq "[.Volumes[].Size] | add"
# Describe instances concisely
aws ec2 describe-instances | jq '[.Reservations | .[] | .Instances | .[] | {InstanceId: .InstanceId, State: .State, SubnetId: .SubnetId, VpcId: .VpcId, Name: (.Tags[]|select(.Key=="Name")|.Value)}]'
# Wait until $instance_id is running and then immediately stop it again
aws ec2 wait instance-running --instance-id $instance_id && aws ec2 stop-instances --instance-id $instance_id
# Get 10th instance in the account
<!-- This file is modified by @sickcodes from https://github.com/kholia/OSX-KVM/tree/master/OpenCore-Catalina -->
<!-- The modifications are placeholders for: {{DEVICE_MODEL}}, {{SERIAL}}, {{BOARD_SERIAL}}, {{UUID}}, {{ROM}}, {{WIDTH}}, {{HEIGHT}} -->
<!-- All credit for this file https://github.com/kholia/OSX-KVM/blob/master/CREDITS.md -->
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>ACPI</key>
<dict>
<key>Add</key>
@gjyoung1974
gjyoung1974 / Dockerfile
Created October 18, 2020 02:29
Dockerfile.loki
# customize Colide Fleet by adding FluentBit
####
# Buildtime container:
####
FROM debian:buster as builder
LABEL maintainer="security@acme.com"
LABEL purpose="osquery"
@gjyoung1974
gjyoung1974 / gist:71e253ef3b858081e9d369037148768c
Created September 22, 2020 17:09
shamirs_secret_sharing_algorithm.py
# shamirs_secret_sharing_algorithm.py
from __future__ import division
from __future__ import print_function
import random
import functools
# 12th Mersenne Prime
# (for this application we want a known prime number as close as