![]() There are two different tests: one search for SUDO_USER, and one test of whether id -u prints 0. Can someone explain hoangddt 49 days ago The xkcd is a joke that if you want to do anything in Linux, just put in a sudo. sudo make me a sandwich behave like 149: Sandwich. On all other browsers it doesn't complain. sudo apt-get upgrade shows a link to A Better Browser on Internet Explorer and Firefox (< v3). Usage (the commands can be issued in any order): $ sudo make me a sandwichĪs for guideline #3, this isn't cleverly hidden, just slightly weirdly. sudo apt-get update Refreshes the package list so the system knows which updates are available. Mr : true : touch me : em f- mr || rm -f me : em hcuot : eurt : rm ![]() = a.a = expr>/dev/null $$(id -u) then echo 'What? Make it yourself' fi me : mr env | grep -q DO_US || rm - mr || SU_OD q- perg | vne rm : em The other indented lines begin with spaces. Remember that it's a makefile the 3 successive lines beginning with if, rm and echo begin with a tab. I didn't take guideline #1 very seriously, aesthetics comes first. This solution doesn't adhere to guideline #2 - or does being vaguely sandwich-shaped count? I went on a kind of palindrome theme at the beginning, but I could only find so many ways to make lines symmetric without resorting to lame real code # ecod laer. So I read the comic, experimented a bit with that Makefile, finally understood the joke, then googled for "make me a sandwich", and finally arrived here! well, I have no idea! And, what was that all about? Ouch, a true binary indeed! What the hell. ![]() > NdC80uQMBZhOa4VahZoaqIrwjMQSewXfxOxUhcwShcr80qLi1Jw0RSUuAIYfEJmVAAAA' > dLDiSoRQxYl5KeWZyRkgXrSCkoqKRmaKgm6pppKCbmqhgoFCrIKamkK1QmpyRr6Ckn92YqWS Assuming this was plain text with base64 encoding, I tried in a terminal: $ txt='H4sICF2DTWIAA01ha2VmaWxlAFNWCM8syVBILMjPyU/PTC1WKMlXiPB2dlFQNjSx5MpNteLi was that an executable? A binary Makefile? It made no sense. # NdC80uQMBZhOa4VahZoaqIrwjMQSewXfxOxUhcwShcr80qLi1Jw0RSUuAIYfEJmVAAAA # dLDiSoRQxYl5KeWZyRkgXrSCkoqKRmaKgm6pppKCbmqhgoFCrIKamkK1QmpyRr6Ckn92YqWS # H4sICF2DTWIAA01ha2VmaWxlAFNWCM8syVBILMjPyU/PTC1WKMlXiPB2dlFQNjSx5MpNteLi # Consult the console-setup(5) manual page. The luggage is carrying some incredibly valuable things. Let’s say that we have a folder named /luggage/. I was just messing with the cloud-init script /boot/user-data in Ubuntu 22.04 Server image for Raspberry Pi, when I came into this example snippet: # Write arbitrary files to the file-system (including binaries!) Sudo is a program for Unix-like computer operating systems that allows users to run programs with the security privileges of another user. Not mine, and not a true solution as it violates rule #2, but it has a very interesting story that led me here: # With apologies to XKCD "$$(id -u)" -eq 0 ] & || echo "What? Make it yourself!"
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |