Skip to content

Instantly share code, notes, and snippets.

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<httpErrors errorMode="Detailed" />
<handlers>
<add name="PowerShell" path="*.ps1" verb="*" modules="CgiModule" scriptProcessor="C:\Windows\System32\cmd.exe /Q /V:ON /C powershell.exe -NoLogo -NoProfile -NonInteractive -ExecutionPolicy Bypass -File !PATH_TRANSLATED!" resourceType="File" requireAccess="Script" />
</handlers>
</system.webServer>
</configuration>
@krisdb2009
krisdb2009 / style.css
Last active July 30, 2020 03:18
ADFS Below Average Theme
/* Below Average Changes Start (Place at EOF) */
#header {
position: absolute;
width: 100px;
height: 100px;
top: -50px;
left: calc(50% - 50px);
background-color: white;
border-radius: 50px;
@krisdb2009
krisdb2009 / SuperSerial.ps1
Last active March 12, 2020 18:37
Freedom Pay Serial Gathering Tool
$version = "1"
$tries = 10
$services =
"MsrLibHost",
"FCCClientSvc"
function Stop-Services {
foreach($service in $services) {
try {
@krisdb2009
krisdb2009 / pf_update_npt_mappings.ps1
Last active July 2, 2020 04:49
pfSense Update NPT
#pfSense update NPT Mappings. (/56 Only)
$rt = "ba-rt1" #Router Hostname
$un = "root" #UserName
$ke = ".\ssh_key" #Key File
$it = "lagg0.4094" #IPv6 Tracked Interface
$mp = ".\mappings.xml" #NPT Mappings File
$fp = "C:\Jobs\pfSense\Update NPT\" #This File Location
$ln = 3 #Line # to extract v6 Address
$r1 = " inet6 " #Remove from line
$r2 = " prefixlen 64" #Remove from line
@krisdb2009
krisdb2009 / MenuItemBitmap.cs
Created November 22, 2019 21:51
Allows Menu Item's to have icons.
using System;
using System.Runtime.InteropServices;
using System.Windows.Forms;
using System.Drawing;
namespace SuperGrate
{
static class MenuItemBitmap
{
[DllImport("user32.dll")]
@krisdb2009
krisdb2009 / udger-to-paminemeld.ps1
Created November 12, 2019 14:39
Udger.com to Palo Alto Mine Meld format.
#Udger to Palo Alto Mine Meld
#Author: Dylan Bickerstaff
#Date: Tuesday, November 12th 2019
#Version: 0
$UdgerAccessKey = ""
$MineMeldOutFile = ".\minemeld.out.txt"
"Downloading Udger Database..."
Invoke-WebRequest -Uri "http://data.udger.com/$($UdgerAccessKey)/udgerdb_v3.dat" -OutFile ".\udgerdb_v3.dat"
<html>
<head>
<title>CPIT - Hub</title>
<style>
* {
font-family:Arial;
color:black;
}
#menubar {
position:fixed;
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>below average - login</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<style>
* {
font-family:arial;
}
@krisdb2009
krisdb2009 / MDTUpgradeSuperLTI.ps1
Last active May 17, 2019 01:01
Replaces all sub-folders in MDT Applications folder with a new SuperLTI.exe if a sub-folder contains SuperLTI.exe
$ChildDirectories = Get-ChildItem -Directory -Path "." #Gets all Applications Sub Folders
foreach($Directory in $ChildDirectories) { #Loops through each Applications Sub Folder
$Files = $Directory.GetFiles() #Gets all files within each Applications Sub Folder
foreach($File in $Files) { #Loops through each file within each Applications Sub Folder
if($File.Name -eq "SuperLTI.exe") { #If a sub directory within an Applications Sub Folder contains SuperLTI.exe
Copy-Item -Path "SuperLTI.exe" -Destination $Directory #Replace it with a copy at Applications root.
}
}
}
$computer = Read-Host -Prompt "Enter PC Name"
Write-Host "Pinging $computer..."
if (Test-Connection -Computername $computer -BufferSize 16 -Count 1 -Quiet) {
Write-Host "Starting WinRM on $computer..."
Start-Process -WindowStyle Hidden -FilePath "wmic.exe" -ArgumentList "/node:`"$computer`" process call create `"cmd.exe /c winrm quickconfig -quiet -force`"" -Wait
Write-Host "Connecting to $computer..."
Enter-PSSession -ComputerName $computer
}