kuyaya Posted February 27, 2020 Share Posted February 27, 2020 Hey guys, I have a question My "problem" is to escape the $SWITCH_POSITION This command here Quote Q STRING "powerShell -windowstyle hidden -ExecutionPolicy Bypass .((gwmi win32_volume -f 'label=''BashBunny''').Name+'payloads\\$SWITCH_POSITION\lazassword.ps1')" Gives that output Quote powerShell -windowstyle hidden -ExecutionPolicy Bypass .((gwmi win32_volume -f 'label=''BashBunny''').Name+'payloads\switch1\lazassword.ps1') But why is that the case? There are two \ in front of the $switch position. If you would only write one, it would just output $SWITCH_POSITION without any \, that makes sense, I understand that. But shouldn't it print out "payloads\$SWITCH_POSITION" because the switch position is escaped? Why does it print out switch1? The $SWITCH_POSITION should be escaped, shouldn't it? And what should you write when you want to print out "\$SWITCH_POSITION"? Because the code above does not work for that. Quote Link to comment Share on other sites More sharing options...
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.