Skip to content

Instantly share code, notes, and snippets.

Enumerate USBSTOR:
Get-ItemProperty -path HKLM:\SYSTEM\CurrentControlSet\Enum\USBSTOR\*\* |Select `
@{ n = 'Vendor'; e= { ((($_.PSParentPath -split '[\\]')[-1] -split '[&]')[-3] -split 'Ven_')[-1] } }, `
@{ n = 'Product'; e= { ((($_.PSParentPath -split '[\\]')[-1] -split '[&]')[-2] -split 'Prod_')[-1] } }, `
@{ n = 'Version'; e= { ((($_.PSParentPath -split '[\\]')[-1] -split '[&]')[-1] -split 'Rev_')[-1] } }, `
@{ n = 'Serial_Number'; e= { ($_.PSPath -split '[\\]')[-1] } }, `
@{ n = 'Unique_Serial'; e= { if ((($_.PSPath -split '[\\]')[-1]) -like '?&*'){"No"} else {"Yes"} } } | Format-Table
Enumerate MountedDevices:
@Beercow
Beercow / kape_info.py
Last active October 31, 2024 17:10
Python script to dump all fields in KAPE targets and modules, including documentation
import csv
import yaml
import argparse
import os
import sys
filenames = []
def main():