alecsargent@lemmy.zip to linuxmemes@lemmy.world · 1 month agoIt's all about those little file mode bitslemmy.zipexternal-linkmessage-square74linkfedilinkarrow-up1277arrow-down126file-text
arrow-up1251arrow-down1external-linkIt's all about those little file mode bitslemmy.zipalecsargent@lemmy.zip to linuxmemes@lemmy.world · 1 month agomessage-square74linkfedilinkfile-text
minus-squareMr.Chewy@lemmy.worldlinkfedilinkarrow-up26·1 month agoCat doesn’t execute anything tho, it just reads and gives output
minus-squareSaharaMaleikuhm@feddit.orglinkfedilinkarrow-up10·1 month agoThe cat command executes the cat program.
minus-squarequantumvoid0@programming.devlinkfedilinkEnglisharrow-up5·1 month agoWhat happens when u try to cat the cat program, is that considered reading or executing
minus-squareNominatedNemesis@reddthat.comlinkfedilinkarrow-up5·1 month agoBoth, they are not mutually exclusive.
minus-squareNominatedNemesis@reddthat.comlinkfedilinkarrow-up5·1 month agoExcept if you use kitty terminal emulator with unsecure remote access. Issue Then with cat, you could execute arbitrary commands…
minus-squarefartographer@lemmy.worldlinkfedilinkarrow-up1·1 month agoOr am I??? x='dumb.txt' && echo "ls | grep $x && cat $x && rm -v $x" > $x && cat $x | bash
Cat doesn’t execute anything tho, it just reads and gives output
The cat command executes the cat program.
What happens when u try to cat the cat program, is that considered reading or executing
Both, they are not mutually exclusive.
Except if you use kitty terminal emulator with unsecure remote access. Issue
Then with cat, you could execute arbitrary commands…
Or am I???
x='dumb.txt' && echo "ls | grep $x && cat $x && rm -v $x" > $x && cat $x | bash