Skip to content

Instantly share code, notes, and snippets.

View rjt's full-sized avatar

Robert Townley rjt

View GitHub Profile
@mttaggart
mttaggart / electron-versions.csv
Last active November 18, 2023 03:15
CVE-2023-4863 Electron App Tracker | THIS LIST IS NOW DEPRECATED. PLEASE VISIT https://github.com/mttaggart/electron-app-tracker FOR THE LATEST DATA
app_name repo electron_version vulnerable
1Clipboard https://github.com/wiziple/1clipboard
1Password None 25.8.1 FALSE
3CX Desktop App 19.0.8 TRUE
5EClient None
Abstract None
Account Surfer None
Advanced REST Client https://github.com/advanced-rest-client/arc-electron ^17.0.0 TRUE
Aedron Shrine None
Aeon https://github.com/leinelissen/aeon 23.2.0 TRUE
@rjt
rjt / Reset-WindowsUpdate.ps1
Last active August 24, 2023 18:51 — forked from desbest/Reset-WindowsUpdate.ps1
Reset Windows Update Client Settings Script
<#
.SYNOPSIS
Reset-WindowsUpdate.ps1 - Resets the Windows Update components
.DESCRIPTION
This script will reset all of the Windows Updates components to DEFAULT SETTINGS.
.OUTPUTS
Results are printed to the console. Future releases will support outputting to a log file.
@ststeiger
ststeiger / offline_mdn_docs.md
Last active April 30, 2024 10:53 — forked from zed-dz/offline_mdn_docs.md
Offline MDN Docs
@Jaykul
Jaykul / Invoke-WithRetry.ps1
Created January 20, 2021 17:55
There are so many ways to write this...
function Invoke-WithRetry {
<#
.SYNOPSIS
Invoke a ScriptBlock until it returns a value (or until a certain ammount of time elapses)
.DESCRIPTION
Invokes the given ScriptBlock on $RetryEvery interval until it returns a value.
If the $Limit time passes without a value, returns nothing.
.EXAMPLE
$Time = (Get-Date).AddMinutes(0.5)
Invoke-WithRetry { if($Time -lt (Get-Date)) { return $Time } }
@desbest
desbest / Reset-WindowsUpdate.ps1
Last active February 18, 2024 17:03
Reset Windows Update Client Settings Script
<#
.SYNOPSIS
Reset-WindowsUpdate.ps1 - Resets the Windows Update components
.DESCRIPTION
This script will reset all of the Windows Updates components to DEFAULT SETTINGS.
.OUTPUTS
Results are printed to the console. Future releases will support outputting to a log file.
@elovelan
elovelan / Get-ParameterValues.ps1
Created October 10, 2018 19:05 — forked from Jaykul/Get-ParameterValues.ps1
Rather better than `$PSBoundParameters`
function Get-ParameterValues {
<#
.Synopsis
Get the actual values of parameters which have manually set (non-null) default values or values passed in the call
.Description
Unlike $PSBoundParameters, the hashtable returned from Get-ParameterValues includes non-empty default parameter values.
NOTE: Default values that are the same as the implied values are ignored (e.g.: empty strings, zero numbers, nulls).
.Link
https://gist.github.com/Jaykul/72f30dce2cca55e8cd73e97670db0b09/
.Link
@rjt
rjt / RecycleBin.ps1
Created October 23, 2017 02:21 — forked from lazywinadmin/RecycleBin.ps1
RecycleBin PowerShell script
<#
This script creates object which correctly works with ntfs streams and reparse points
Usage samples:
'.\*.bak' | recycle -WipeOut -> multiplies objects by zero
recycle -Path '.\*.ini' -> sends objects to Recycle Bin
$RecycleBin.Measure() -> returns true size of all items in Recycle Bin
$RecycleBin.Clear() -> this is obvious
$RecycleBin.List() -> returns friendly items list
<#
.Synopsis
Scans a host or network for the MS17-010 vulnerability and output results as a
table that you can pipe to other PowerShell functions such as Invoke-Command or
Export-CSV.
.DESCRIPTION
This script will use a custom NMap NSE script to scan a destination host on
port 445 for the MS17-010 vulnerability. If the host is not online or is blocking
@Jaykul
Jaykul / Get-ParameterValues.ps1
Created April 27, 2016 06:41
Rather better than `$PSBoundParameters`
function Get-ParameterValues {
<#
.Synopsis
Get the actual values of parameters which have manually set (non-null) default values or values passed in the call
.Description
Unlike $PSBoundParameters, the hashtable returned from Get-ParameterValues includes non-empty default parameter values.
NOTE: Default values that are the same as the implied values are ignored (e.g.: empty strings, zero numbers, nulls).
.Example
function Test-Parameters {
[CmdletBinding()]
@lazywinadmin
lazywinadmin / RecycleBin.ps1
Created April 20, 2015 14:37
RecycleBin PowerShell script
<#
This script creates object which correctly works with ntfs streams and reparse points
Usage samples:
'.\*.bak' | recycle -WipeOut -> multiplies objects by zero
recycle -Path '.\*.ini' -> sends objects to Recycle Bin
$RecycleBin.Measure() -> returns true size of all items in Recycle Bin
$RecycleBin.Clear() -> this is obvious
$RecycleBin.List() -> returns friendly items list