LOLBAS-Project / LOLBAS

Living Off The Land Binaries And Scripts - (LOLBins and LOLScripts)
https://lolbas-project.github.io
GNU General Public License v3.0
6.97k stars 981 forks source link

update wsl.exe description #378

Closed unrooted closed 4 months ago

unrooted commented 4 months ago

hi, I've made some changes to the wsl.yml file as things seem to have changed in the WSL world (I was using the default 'just' Ubuntu with WSL2 on Windows 11) image

my changes:

image

image

I hope my changes are OK. Please state if any changes should be made to my updated descriptions.

unrooted commented 4 months ago

hi, I've made some changes:

I also have an idea for possible 'side notes', however, I'm not aware on how should apply them to the current page layout, my current suggestions regarding such 'side notes', include:

P.S. sorry for using the same example over and over again, but I think it illustrates my points properly

wietze commented 4 months ago

To your point about grep, this is most likely due to quotes/escaping in cmd/powershell, especially the pipe character. As you already highlight, the below options work

wsl -- bash -c "cat /etc/os-release | grep '^VERSION'"
wsl -e bash -c "cat /etc/os-release | grep '^VERSION'"

this also works in cmd.exe, without the need of bash:

wsl -- cat /etc/os-release ^| grep '^^VERSION'

The bottom line is that this is more a matter of dealing with WSL, which is outside the scope of this project.