Jump to content

DUCKY 3.0 Adding Spacing to my STRINGS


RootJunky

Recommended Posts

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 :-) 

Link to comment
Share on other sites

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

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...