alecsargent@lemmy.zip to linuxmemes@lemmy.world · edit-22 months agoIt's all about those little file mode bitslemmy.zipexternal-linkmessage-square74fedilinkarrow-up1277file-text
arrow-up1277external-linkIt's all about those little file mode bitslemmy.zipalecsargent@lemmy.zip to linuxmemes@lemmy.world · edit-22 months agomessage-square74fedilinkfile-text
minus-squareMr.Chewy@lemmy.worldlinkfedilinkarrow-up25·2 months agoCat doesn’t execute anything tho, it just reads and gives output
minus-squareSaharaMaleikuhm@feddit.orglinkfedilinkarrow-up10·2 months agoThe cat command executes the cat program.
minus-squarequantumvoid0@programming.devlinkfedilinkEnglisharrow-up5·2 months agoWhat happens when u try to cat the cat program, is that considered reading or executing
minus-squareNominatedNemesis@reddthat.comlinkfedilinkarrow-up5·2 months agoBoth, they are not mutually exclusive.
minus-squareNominatedNemesis@reddthat.comlinkfedilinkarrow-up5·edit-22 months 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·2 months 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