Skip to content

Instantly share code, notes, and snippets.

View KurtDeGreeff's full-sized avatar

Kurt De Greeff KurtDeGreeff

View GitHub Profile
@KurtDeGreeff
KurtDeGreeff / Set-RemotePasswordGUI.ps1
Created October 3, 2017 18:45 — forked from aaronpmiller/Set-RemotePasswordGUI.ps1
Powershell WPF Form for setting a remote password via netapi32.netuserchangepassword
PARAM (
$domainFQDN = $((Get-WmiObject Win32_ComputerSystem).Domain)
)
#The XAML Form
[string]$formXAML = @"
<Window x:Class="MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="Remote Password Reset" Height="300" Width="500" ResizeMode="NoResize" SizeToContent="WidthAndHeight" MinWidth="500" WindowStartupLocation="CenterScreen">
function Convert-FolderContentToMarkdownTableOfContents{
<#
.SYNOPSIS
Create a Table of Contents in markdown
.DESCRIPTION
This function can be used to generate a markdown file that contains a Table of Contents based on the contents of a folder
.PARAMETER BaseFolder
It’s the folder’s location on the disk
.PARAMETER BaseURL
to build the URL for each file. This will be added as a link
@KurtDeGreeff
KurtDeGreeff / Update-INIFiles.ps1
Created September 17, 2017 17:33 — forked from keithga/Update-INIFiles.ps1
Update CustomSettings.ini file.
<#
.SYNOPSIS
Update CustomSettings.ini file.
.DESCRIPTION
Updates one or more CUstomSettings.ini files with a common value.
Calling powershell.exe instance must have read/write privelages to the share.
@KurtDeGreeff
KurtDeGreeff / New-WPFClock
Created September 15, 2017 14:26 — forked from SMSAgentSoftware/New-WPFClock
A clock widget for PowerShell using the free Arction Gauge control
Function New-WPFClock {
## Generates a clock displaying the current system time
## Requires the Arction WPF Gauges, a free download from https://www.arction.com/free-gauges/
## Set the location of the Arction Gauges dll on line 26
[CmdletBinding()]
Param
(
[Parameter(Mandatory=$false,Position=0)]
function Invoke-ExcelMacroPivot{
<#
.AUTHOR
Matt Nelson (@enigma0x3)
.SYNOPSIS
Pivots to a remote host by using an Excel macro and Excel's COM object
.PARAMETER Target
Remote host to pivot to
.PARAMETER RemoteDocumentPath
Local path on the remote host where the payload resides
<#
.SYNOPSIS
<Overview of script>
.DESCRIPTION
<Brief description of script>
.PARAMETER <Parameter_Name>
<Brief description of parameter input required. Repeat this attribute if required>
.INPUTS
<Inputs if any, otherwise state None>
.OUTPUTS Log File
<#
.SYNOPSIS
Get Weather of a City
.DESCRIPTION
Fetches Weather report of a City from website - http://wttr.in/ courtsey Igor Chubin [Twitter- @igor_chubin]
.PARAMETER City
Name of City
@KurtDeGreeff
KurtDeGreeff / New-WPFMessageBox
Created August 24, 2017 16:27 — forked from SMSAgentSoftware/New-WPFMessageBox
PowerShell function to display a customizable WPF message box / window
Function New-WPFMessageBox {
# For examples for use, see my blog:
# https://smsagent.wordpress.com/2017/08/24/a-customisable-wpf-messagebox-for-powershell/
# Define Parameters
[CmdletBinding()]
Param
(
# The popup Content
@KurtDeGreeff
KurtDeGreeff / akagi_41.c
Created August 17, 2017 16:08 — forked from hfiref0x/akagi_41.c
UAC bypass using CMSTPLUA COM interface
typedef interface ICMLuaUtil ICMLuaUtil;
typedef struct ICMLuaUtilVtbl {
BEGIN_INTERFACE
HRESULT(STDMETHODCALLTYPE *QueryInterface)(
__RPC__in ICMLuaUtil * This,
__RPC__in REFIID riid,
_COM_Outptr_ void **ppvObject);
@KurtDeGreeff
KurtDeGreeff / Get-LogonSession.ps1
Created August 13, 2017 20:28
Gets logon sessions of computer with ability to filter on LogonID or samaccountname
<#
ORIGINAL VERSION - Modified by Micah Joiner
Author: Lee Christensen (@tifkin_)
License: BSD 3-Clause
Required Dependencies: None
Optional Dependencies: None
#>
function Get-LogonSession
{
param