RootJunky Posted August 21, 2022 Share Posted August 21, 2022 STRING (netsh wlan show profiles) | Select-String ":(.+)$" | % {$name=$_.Matches.Groups[1].Value.Trim(); $_} | %{(netsh wlan show profile name="$name" key=clear)} | Select-String "Key Content\W+\:(.+)$" | % {$pass=$_.Matches.Groups[1].Value.Trim(); $_} | %{[PSCustomObject]@{ PROFILE_NAME=$name;PASSWORD=$pass }} | Format-Table -AutoSize Turns Into this in powershell ( netsh wlan show profiles ) | Select - String ": ( . + ) $" | % {$name=$_.Matches.Groups[1].Value.Trim(); $_} | % { ( netsh wlan show profile name="$name" key=clear ) } | Select - String "Key Content\W + \: ( . + ) $" | % {$pass=$_.Matches.Groups[1].Value.Trim(); $_} | % {[PSCustomObject]@{ PROFILE_NAME=$name;PASSWORD=$pass }} | Format - Table - AutoSize So some reason it adds spaces by these symbols - . + ) $ % { The Inject.bin file is created in Payload Studio Pro Please Help :-) Quote Link to comment Share on other sites More sharing options...
Darren Kitchen Posted August 21, 2022 Share Posted August 21, 2022 Is your STRING command indented? Try it unindented and report back? 1 Quote Link to comment Share on other sites More sharing options...
RootJunky Posted August 21, 2022 Author Share Posted August 21, 2022 48 minutes ago, Darren Kitchen said: Is your STRING command indented? Try it unindented and report back? Yes it was indented. That totally fixed the problem. Now the question is why does that happen when it is indented? Thank you Darren Quote Link to comment Share on other sites More sharing options...
Korben Posted August 26, 2022 Share Posted August 26, 2022 PayloadStudio 1.1.0 is out and addresses this issue. 1 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.