Skip to content

Instantly share code, notes, and snippets.

View M3T4L5T3F's full-sized avatar

M3T4L5T3F M3T4L5T3F

View GitHub Profile
@M3T4L5T3F
M3T4L5T3F / PSKeyboard.ps1
Created February 1, 2019 18:12
PowerShell one-liners to disable/enable PnP keyboard
#This gist contains example code and is not a functional powershell script. Enjoy!
#
# @M3T4L5T3F
# 20190201
#
#Disable
(Get-PnpDevice | ? { $_.Class -eq 'Keyboard' } | % { $_ | Disable-PnpDevice }
#Enable
(Get-PnpDevice | ? { $_.Class -eq 'Keyboard' } | % { $_ | Enable-PnpDevice }
@M3T4L5T3F
M3T4L5T3F / PSTrack.ps1
Last active January 16, 2019 00:25
Covert Physical Tracking POC
# POC Covert Physical Tracking script
# provides lat,long and address via google geocoding API on a timed loop
# By @M3T4L5T3F
# Inspired by:
#https://stackoverflow.com/users/3694461/colsw
#https://stackoverflow.com/questions/46287792/powershell-getting-gps-coordinates-in-windows-10-using-windows-location-api
#https://docs.microsoft.com/en-us/dotnet/api/system.device.location.geocoordinatewatcher?view=netframework-4.7.2
#https://www.syspanda.com/index.php/2018/01/13/google-geocode-api-powershell/
$GoogleAPIKey = "Put your Google Geocoding API key between the quotes here"
@M3T4L5T3F
M3T4L5T3F / MonitorMayhem.ps1
Created January 14, 2019 19:23
Monitor Mayhem - Test if users are likely to report a possible malfunction or compromise with physical symptoms
# By @M3T4L5T3F
# Change values to different experience. Works on laptops. Future update will add desktop monitor support
$i=0
While ($true)
{
$i++
$brightness = Get-Random -Maximum 25
$delay = 0
@M3T4L5T3F
M3T4L5T3F / PSSay.ps1
Last active January 14, 2019 23:28
Windows Command line speech - PowerShell
# Use Windows Speech engine with PowerShell
#
# Usage example: powershell .\PSSay.ps1 'This is a test'
#
# Thanks to Greg Foss for the original example!
# https://gist.github.com/gfoss
param( [string]$comment = $_ )
Add-Type -AssemblyName System.speech
$speak = New-Object System.Speech.Synthesis.SpeechSynthesizer