Skip to content

Instantly share code, notes, and snippets.

View Barmp's full-sized avatar
🦆
Just ducky

FaffinAboot Barmp

🦆
Just ducky
View GitHub Profile
@Barmp
Barmp / app.py
Created April 22, 2023 15:07
Python WSGI web application that will parse a string from a URL query
##### Outline
##
## App will accept URLs with an encoded string.
## App will parse the encoded string into an array of values.
## Parsing will depend on the encoding needs of the application. For this
## example we will parse into a single digit value, five three digit
## values, a checksum bit, and a long value that might be an encoded
## URL or something
## Presumably this will be BASE64 encoded but it doesn't really matter, any
## encoding that has enough bits for your data and that is easy enough
@Barmp
Barmp / Statement of Work.md
Last active March 15, 2023 09:08
Template Statement of Work (SOW) for a Contractor / Comission style engagement.

Statement of Work

The following statement of work between {customer} and {contractor} for services to be provided pursuant to the {Professional Services Agreement} dated {TBD} between {contractor} and {customer} ("Agreement").

Service Goals and Objectives

The goals and objectives of this [project, engagement, session] are to:

  • [Examples for technical work]
  • Conduct current state analysis of in scope systems and services
  • Develop high level optomized architecture for service delivery
@Barmp
Barmp / ConvertFrom-EventLogRecord.ps1
Created February 9, 2019 15:47 — forked from IISResetMe/ConvertFrom-EventLogRecord.ps1
Convert EventData fields from windows event log records to objects
function ConvertFrom-EventLogRecord
{
param(
[Parameter(Mandatory=$true,ValueFromPipeline=$true)]
[System.Diagnostics.Eventing.Reader.EventLogRecord[]]
$InputEvent,
[Parameter(Mandatory=$true,Position=1)]
[ValidateNotNullOrEmpty()]
[string[]]
@Barmp
Barmp / ConvertTo-Object.ps1
Created February 9, 2019 15:41 — forked from IISResetMe/ConvertTo-Object.ps1
Quick and dirty regex-based text-to-object parsing using named expressions groups and $Matches
function ConvertTo-Object {
param(
[Parameter(Mandatory=$true,ValueFromPipeline=$true)]
[string[]]$InputString,
[Parameter(Mandatory=$true,ValueFromRemainingArguments=$true)]
[string]$Pattern
)
process{
###
# MIT License
# Copyright (c) 2016 Greg Malone
#
# Searches specified OUs in Active Directory for Computer accounts, then
# scan those Computers for software.
#
# Any variables that require customization are located in the Configuration portion
# of the script.
###
###
# MIT License
# Copyright (c) 2016 Greg Malone
#
# Untested code, YMMV
###
Import-Module activedirectory
# Create CSV file of users and passwords reset
# Generates semi-random 8 character passwords from a limited character set.
$keylist = @("a","A","b","B","c","C","d","D","f","F","g","G","M","P","q","Q","R","T","V","y","Y","z","Z","2","3","4","6","8","#","$","&")
$pword = ""
1..8 | foreach $_ {
$x = Get-Random -Minimum 1 -Maximum 31
$pword += $keylist[$x]
}
@Barmp
Barmp / DHCPReconfiguration.ps1
Last active May 27, 2016 13:15
Reconfigures DHCP Scope Exclusions en masse.
###
# MIT License
# Copyright (c) 2016 Greg Malone
#
# Commands to remove and replace all exclusion ranges on two DHCP servers.
# Assumes a split scope configuration and adds a delay to backup server.
# I ran this manually, instead of as a script, so YMMV.
###
# Create remote sessions to DHCP servers.
@Barmp
Barmp / GetLastLogon.ps1
Created January 16, 2016 19:14
Query DCs for last log on time of each user in a domain
# Credit to Tim Rhymer
# https://www.interworks.com/blog/trhymer/2014/01/22/powershell-get-last-logon-all-users-across-all-domain-controllers
Import-Module ActiveDirectory
function Get-ADUsersLastLogon()
{
$dcs = Get-ADDomainController -Filter {Name -like "*"}
$users = Get-ADUser -Filter *
$time = 0
@Barmp
Barmp / FindServers-Get-RemoteServices.ps1
Last active May 27, 2016 14:18
Enumerate services for each computer in list of OUs.
###
# MIT License
# Copyright (c) 2015 Greg Malone
#
# Script to enumerate the services for each computer in a list of OUs.
# Returns SystemName, Service Name, Credentials, Startup Mode
# Indicates progress by printing each system scanned to console.
###
# Environment variables