Skip to content

Instantly share code, notes, and snippets.

View yaleman's full-sized avatar
🦀
Terribl. Really terribl.

James Hodgkinson yaleman

🦀
Terribl. Really terribl.
View GitHub Profile
@yaleman
yaleman / gist:3896818
Created October 16, 2012 01:41
I'm going to hell for this...
for plugin in self._init_plugins:
# I'm sure I'll go to hell for this.
exec( "import {}".format( plugin ) )
print "Loading plugin {}".format( plugin )
eval( 'self.register_plugin( {} )'.format( self._init_plugins[plugin] ) )
# Get-openfiles.ps1
# Connects to a remote server and queries users with open folders
# Created: 2016-02-12
# Created by: James Hodgkinson based on work from Jeff Patton
# TODO: Make this runnable from the command line
$hostname = CHANGETHIS
$pathtocheck = CHANGETHISTOO

Keybase proof

I hereby claim:

  • I am yaleman on github.
  • I am yaleman (https://keybase.io/yaleman) on keybase.
  • I have a public key whose fingerprint is E16C DFB6 6729 AC29 DD43 B575 23A3 EC25 B08C 49D7

To claim this, I am signing this object:

@yaleman
yaleman / ticketbleed.go
Last active February 11, 2017 01:36
Ticketbleed tester, modified to accept command line target.
/* ticketbleed.go - tests for ticketbleed session ticket reuse bug in F5 TLS
based on @FiloSottile's post https://gist.github.com/FiloSottile/fc7822b1f5b475a25e58d77d1b394860
set for testing :443 only
usage:
$ go run ticketbleed.go example.com
or to compile it:
$ go build ticketbleed.go
$ ./ticketbleed example.com
@yaleman
yaleman / build-openssl.sh
Last active September 13, 2018 01:11
OpenSSL build script
#!/bin/bash
URL="https://www.openssl.org/source/openssl-1.1.1.tar.gz"
BUILDDIR=$(mktemp -d)
echo "Downloading OpenSSL Package..."
wget -O "$BUILDDIR/openssl.tar.gz" $URL
cd $BUILDDIR
echo "Extracting package..."
tar zxf openssl.tar.gz
// led bank 1 enable pin
int EnA = 10;
// led bank 2 enable pin
int EnB = 5;
int In1 = 9;
int In2 = 8;
int In3 = 7;
{"cert":"-----BEGIN CERTIFICATE-----\nMIIEBzCCAu+gAwIBAgIUGKrmD9ERazNqkSq07aI4U1a05SEwDQYJKoZIhvcNAQEL\nBQAwYjELMAkGA1UEBhMCQVUxEzARBgNVBAgTClF1ZWVuc2xhbmQxETAPBgNVBAcT\nCEJyaXNiYW5lMRowGAYDVQQKExFUZXJtaW5hbCBPdXRjb21lczEPMA0GA1UECxMG\nU3BsdW5rMB4XDTE5MDQxMzA3NDUwMFoXDTIwMDQxMjA3NDUwMFowaTELMAkGA1UE\nBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBGcmFuY2lz\nY28xHzAdBgNVBAoTFkludGVybmV0IFdpZGdldHMsIEluYy4xDDAKBgNVBAsTA1dX\nVzCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAL2EKiAS1L6fkuRGFrf5\nuXvWxKAi0m4Ko/ms693wzKCgjQ5QPuv/VFgjcZEF6CxdQv/PUDb/ntSbxoWqzigB\n9Do4+dUoj1cYabFYsk0t3jUGVuN8Yk1Quzj9A3pNyfHK9M0c2oGxcr4WuyjdLSp2\niE/1m7dR33SLmKk+TdPSgn3T0+euh/nk6d0weVmfPN17S1UQ4SBBf40GSq42e47h\n+wvwW4RQs9R1VdbQolUKBhppZpokXPcSJZYPGqqDIILSf9YMHmMpmylT0+D6ini0\ndL2tvm1/NMgLhKi7np8qTxxMJlfIcOwy3PMcrRVNRD3a73eZJDqrUQJnM/68tXa/\ns6sCAwEAAaOBrTCBqjAOBgNVHQ8BAf8EBAMCBaAwHQYDVR0lBBYwFAYIKwYBBQUH\nAwEGCCsGAQUFBwMCMAwGA1UdEwEB/wQCMAAwHQYDVR0OBBYEFDv0oZWlfY8K8Gg2\nn9rInFKaWuaiMB8GA1UdIwQYMBaAFCVIOxOWZ1xtCvOeMQjNC1VN89FKMCsGA1
@yaleman
yaleman / splunk_config_check_github_action.yaml
Created September 5, 2020 23:33
Basic splunk config checking in github actions
name: CI
# Controls when the action will run. Runs on any PR or push, just to be sure.
on: [push, pull_request]
jobs:
test:
# The type of runner that the job will run on
runs-on: ubuntu-latest
strategy:
Dec 19 12:37:51 examplehost.example.com vector[32612]: Dec 19 12:37:51.826 ERROR journald-server: vector::internal_events::journald: Invalid record from journald, discarding. error=Error("invalid type: sequence, expected a string", line: 0, column: 0) text={"NM_LOG_LEVEL":"INFO","CODE_FILE":"src/dhcp/nm-dhcp-manager.c","_GID":"0","TIMESTAMP_BOOTTIME":"18.959871","NM_LOG_DOMAINS":"DHCP4,DHCP6","_SYSTEMD_CGROUP":"/system.slice/NetworkManager.service","_HOSTNAME":"examplehost.example.com","_EXE":"/usr/sbin/NetworkManager","__MONOTONIC_TIMESTAMP":"18961107","_UID":"0","SYSLOG_IDENTIFIER":"NetworkManager","PRIORITY":"6","_SELINUX_CONTEXT":"unconfined\n","_SYSTEMD_UNIT":"NetworkManager.service","__REALTIME_TIMESTAMP":"1608278027602895","_SYSTEMD_SLICE":"system.slice","_TRANSPORT":"journal","_SYSTEMD_INVOCATION_ID":"17968fd190504ff3acabe5731b392a88","_CAP_EFFECTIVE":"200534e2","_BOOT_ID":"b192515498e94e54b058109b5f9ed701","_COMM":"NetworkManager","_CMDLINE":"/usr/sbin/NetworkManager --no-daemon","SYSLOG_PID":"778","
$ sudo -u vector RUST_BACKTRACE=full vector -vvv --config-yaml /etc/vector/vector.yaml
Dec 19 12:49:48.569 INFO vector::app: Log level is enabled. level="vector=trace,codec=trace,file_source=trace,tower_limit=trace,rdkafka=trace"
Dec 19 12:49:48.571 INFO vector::app: Loading configs. path=[("/etc/vector/vector.yaml", Some(YAML))]
Dec 19 12:49:48.630 DEBUG vector::tls::settings: Fetching system root certs.
Dec 19 12:49:48.630 INFO vector::topology: Running healthchecks.
Dec 19 12:49:48.630 INFO vector::topology: Starting source. name="host_metrics"
Dec 19 12:49:48.630 INFO vector::topology: Starting source. name="local_journald"
Dec 19 12:49:48.630 INFO vector::topology: Starting transform. name="journald_remove_fields"
Dec 19 12:49:48.631 INFO vector::topology: Starting transform. name="journald_coercer"
Dec 19 12:49:48.631 INFO vector::topology: Starting transform. name="host_metrics_transformed"