- Do not save kernel source to a
/mnt/cpath, compile from the linux user home directory. Windows is case-insensitive, will cause random "file not found" compilation errors. - I'm using the Kali Windows store installation to do all these steps, this is especially important if you plan on using 8814au drivers (I don't believe they are compatible with Ubuntu)
- Windows 10, latest windows updates & WSL.
- The steps related to 8814au drivers can be modified as necessary.
- For changes to take effect, WSL requires the "6 second rule" between restarts when modifying WSL related configuration files. Meaning if you issue a
wsl --shutdownwait 6 seconds before issuingwsl.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Setup-DevEnvironment.ps1 | |
| # Find the latest Visual Studio installation | |
| $vswhere = "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe" | |
| $vsPath = & $vswhere -latest -property installationPath | |
| if (-not $vsPath) { | |
| Write-Error "Visual Studio installation not found. Please ensure Visual Studio Build Tools are installed." | |
| exit 1 | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #Requires -RunAsAdministrator | |
| [CmdletBinding()] | |
| Param ( | |
| $LogProfile = $null, | |
| [switch]$Dump = $false | |
| ) | |
| Set-StrictMode -Version Latest |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import cv2 | |
| # Example code that detects license plates in an image: | |
| # Load the image and convert it to grayscale | |
| image = cv2.imread('license_plate.jpg') | |
| gray = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY) | |
| # Apply Gaussian blur to the grayscale image | |
| gray = cv2.GaussianBlur(gray, (5, 5), 0) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Function to calculate the annual costs of the licenses assigned to a user account | |
| Function Get-LicenseCosts { | |
| [CmdletBinding()] | |
| param ( | |
| [array]$Licenses | |
| ) | |
| [int]$Costs = 0 | |
| foreach ($License in $Licenses) { | |
| $LicenseCost = $PricingHashTable[$License] | |
| if ([float]$LicenseCost) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Convenient DeDRM Scripts | |
| ------------------------- | |
| **NOTE**: read https://blog.quaintous.com/2021/02/16/remove-drm-from-ebooks/ to find out what this gist is good for. | |
| * ./init.sh: extracts Adobe Digital Editions private key and required files to DeDRM. | |
| * ./dedrm: removes DRM from given ebook (pdf/epub) | |
| If you are using this for the first time, make sure that you have authenticated your Adobe Digital Editions (ADE) and run './init.sh'. Import any DRM-protected file into ADE and run 'dedrm.sh': |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Check these threads before proceeding: | |
| # https://github.com/microsoft/WSL/discussions/5857 | |
| # https://github.com/microsoft/WSL/issues/5821 | |
| if (-Not ([Security.Principal.WindowsPrincipal] [Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole] 'Administrator')) { | |
| $CmdLine = "-File `"" + $MyInvocation.MyCommand.Path + "`" " + $MyInvocation.UnboundArguments | |
| Start-Process -FilePath PowerShell.exe -Verb Runas -ArgumentList $CmdLine | |
| Exit | |
| } | |
| # Restart the Host Network Service | |
| Restart-Service -Force -Name hns |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <Windows.h> | |
| #include <ImageHlp.h> | |
| #include <strsafe.h> | |
| #include "loaded_psp_drivers.h" | |
| #include <set> | |
| #include <string> | |
| #include <algorithm> | |
| #pragma comment(lib, "crypt32.lib") |
This is a note for myself describing various Visual Basic macros construction strategies that could be used for remote code execution via malicious Document vector. Nothing new or fancy here, just a list of techniques, tools and scripts collected in one place for a quick glimpse of an eye before setting a payload.
All of the below examples had been generated for using as a remote address: 192.168.56.101.
List:
- Page substiution macro for luring user to click Enable Content
- The Unicorn Powershell based payload
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 2070 Paradigm Shift Transcript | |
| Transcribed by Edwin Finch | |
| Sam, you're a legend. Enjoy | |
| ============================== | |
| Whew. | |
| Hey. |
NewerOlder