Skip to content

Instantly share code, notes, and snippets.

@Demonslay335
Demonslay335 / rotbuster.ps1
Created February 16, 2018 19:30
Rot Buster
# Credit: https://twitter.com/Lee_Holmes/status/964576204425580544
param([string]$a)
0..25 | % { [PSCustomObject] @{
Offset = $_
Value = & {
param($v, $o) -join ($v.ToCharArray() | % {
[char](((([int][char]$_) - ([int][char]'a') + $o) % 26) + ([int][char]'a'))
})
} $a $_
@HarmJ0y
HarmJ0y / ADC2.ps1
Last active February 16, 2024 02:18
Command and Control channel through Active Directory Object Properties
#Requires -Version 2
function New-ADPayload {
<#
.SYNOPSIS
Stores PowerShell logic in the mSMQSignCertificates of the specified -TriggerAccount and generates
a one-line launcher.
Author: @harmj0y
@pudquick
pudquick / Get-SSLThumbprint.ps1
Created May 22, 2016 15:07 — forked from lamw/Get-SSLThumbprint.ps1
Powershell snippet to help extract the SSL Thumbprint (SHA1) of a remote system
Function Get-SSLThumbprint {
param(
[Parameter(
Position=0,
Mandatory=$true,
ValueFromPipeline=$true,
ValueFromPipelineByPropertyName=$true)
]
[Alias('FullName')]
[String]$URL
@JamesMessinger
JamesMessinger / README.md
Last active March 9, 2024 17:58
VSCode GitHub Markdown Theme

GitHub Markdown Theme for Visual Studio Code

This CSS stylesheet allows you to preview markdown files in VSCode using GitHub's mardown theme. This CSS was taken directly from the official GitHub Markdown repo. I replaced their top-level .markdown-body class with the body tag so it would work in VSCode, and added styling for the html tag to match GitHub's fixed-width container.

Instructions

  1. Copy the CSS file to your computer
    Copy the github-markdown.css file below to your computer. You can put it anywhere you want, but I chose to put it in the same folder as my VSCode settings file.

  2. Edit your VSCode settings
    If you want to use this theme for all of your projects, then edit your User Settings file. If you just want to use this them

@bmoore-msft
bmoore-msft / New-KeyVaultForTemplateDeployment.ps1
Created February 22, 2016 21:40
Create an Azure KeyVault Enabled for Template Deployment (sh and ps)
#Requires -Module AzureRM.Profile
#Requires -Module AzureRM.KeyVault
#Login and Select the default subscription if needed
#Login-AzureRmAccount
#Select-AzureRmSubscription -SubscriptionName 'subscription name'
#Change the values below before running the script
$VaultName = 'myvault' #Globally Unique Name of the KeyVault
$VaultLocation = 'East US' #Location of the KeyVault
@HarmJ0y
HarmJ0y / ShareAudit.ps1
Created February 7, 2016 03:17
ShareAudit.ps1
#requires -version 2
<#
PowerSploit File: PowerView.ps1
Author: Will Schroeder (@harmj0y)
License: BSD 3-Clause
Required Dependencies: None
Optional Dependencies: None
@guitarrapc
guitarrapc / Get-EtwTraceProvider.ps1
Last active June 11, 2024 03:38
ETW (Event Tracing for Windows) Providers and their GUIDs for Windows 10 x64
#Requires -RunAsAdministrator
#Requires -Version 5.0
# requires Windows 10
Get-EtwTraceProvider | Select-Object SessionName, Guid | sort SessionName
# as Markdown
<#
#Requires -RunAsAdministrator
$result = Get-EtwTraceProvider | sort SessionName
$result | %{"|Name|GUID|";"|----|----|";}{"|$($_.SessionName)|$($_.Guid)|"}
#>
@HarmJ0y
HarmJ0y / PowerView-2.0-tricks.ps1
Last active May 13, 2024 06:52
PowerView-2.0 tips and tricks
# NOTE: the most updated version of PowerView (http://www.harmj0y.net/blog/powershell/make-powerview-great-again/)
# has an updated tricks Gist at https://gist.github.com/HarmJ0y/184f9822b195c52dd50c379ed3117993
# get all the groups a user is effectively a member of, 'recursing up'
Get-NetGroup -UserName <USER>
# get all the effective members of a group, 'recursing down'
Get-NetGroupMember -GoupName <GROUP> -Recurse
# get the effective set of users who can administer a server
@guitarrapc
guitarrapc / Install-PowerShellScriptBrowzerForISE.ps1
Created April 17, 2014 21:15
Install-PowerShellScriptBrowzerForISE
filter Show-LogoutputEX
{
"[{0}][{1}][{2}]" -f ((Get-Date).ToString("yyyy/MM/dd HH:mm:ss")),$_[0], $_[1]
}
function Invoke-ScriptBlockEX ([scriptBlock]$scriptBlock, [string]$WhatDoing)
{
begin
{
$sw = New-Object System.Diagnostics.Stopwatch