A Gift to a Geek from a Geek
It's the birthday of your friend, and you want to give him a gift. It's a hard mission, because he simply have everything you can imagine...
Why not give to him something special and original?
For example, you could give to him a collection of great musics, photos/videos/slideshow of your best moments ,a private key of a wallet with money you just created for him or any file you want.
You may asking for yourself: What's the deal?
I've been thinking about easter eggs with a toy inside. But not a real easter egg. A virtual easter egg.
I mean files inside of a file like a .zip does.
But what I'll teach here is not how to "zip" files.
It's about hacking a file (in a good cause).
In this tutorial I will teach you how to deal with cat.
No! Not this cat, but a Linux command. By the way, this is my friend, mr. Espeto.
According to Linux man , cat do the following:
"Concatenate files and print on the standard output"
But he will use this in a different way. We will use to write bytes of a file in the end of another one.
What you will need:
- Linux
- Pendrive
- Creativity
[email protected] Larry Ewing and The GIMP [Attribution or CC0], via Wikimedia Commons
Let's go then:
- Create a folder(directory) inside your home folder. We can name it "stuff" for example.
- Open a terminal and cd (change directory) to this directory you just created.
cd /home/username/stuff/
- Copy all the files you want to give to your friend inside this directory.
- Select all your files and create a zip file. You can use the right mouse button for this.
- Open Libre Office Writter and create a pdf. (This pdf will be the container of the zip. The pdf is the easter egg and the zip the toy.)
- Let's paste bytes of zip into the end of pdf file. (Don't forget to backup before doing this)
cat files.zip >> happy_birthday.pdf
- Now the files.zip and the pdf are one single large pdf.
- Open the pdf to see if this works. (Don't try edit this pdf, because you can mess the already messed file. : -) )
- Let's test the extraction of the files.zip from the pdf. The first thing you need to know is the size in bytes of files.zip
du -b files.zip
- Use this bytes size information (NUMBER) you got with du -b files.zip in the following command
tail -c NUMBER files.zip > new_files.zip
- The new_files.zip is created. Open it and test it.
Video
* Watch this video in fullscreen mode
https://youtu.be/r98zGRTT7yc
Important
Don't forget to put the instructions in the pdf about how to catch a cat by the tail command! 😊
Image Source
FAQ
- Can I use these commands in another operating system?
Sure! You can use it in Windows using the Mingw or Mac, the same command but the parameters may vary. I suggest you to use Linux in a Virtual Machine or boot it liveCD(you don't need to install). - Is it dangerous to open a file like this?
No. Since the Adobe Reader and other softwares avoid execution of binary data, this will result in nothing.
SUGGESTIONS
You can give a high capacity pendrive with this file inside.
By Ranjithsiji (Own work) [GFDL or CC BY-SA 3.0], via Wikimedia CommonsYou can upload this to any serve that support the file format you are using and share the link. Ex.: Google Docs, Dropbox, etc...
Image SouceYou can make a pps slideshow instead of pdf, why not?
FOTO:FORTEPAN / MHSZ [CC BY-SA 3.0], undefinedYou can make a game "search for the clues".
By Penarc (Own work) [GFDL or CC BY-SA 3.0], via Wikimedia CommonsYou can make a Geek box with pendrive and candies.
Image SourceYou can make a good use of a 3D printer and make a weird case for a pendrive or mini cd
Por Bradina [CC0], undefinedYou can make a program in basic language and save it into a rom to run in ancient computers with z-80(zilog) based architecture, that is possible with the use of a... Eh... Please forget this one.
© Nevit Dilmen [CC BY-SA 3.0 undefined GFDL], undefined
That's it! Thank you for reading!
You have an interesting writing style. You are very creative and also explain things well. My favorite idea is the high capacity pendrive with the file inside. I'm going to use this one day for sure. Thanks for the Resteem of one of my posts also.
Thank you! I have some weird ideas, and it's hard to make people understand it. If you got it, I'm happy!
image source
You posted an awesome article about Quantum Teleportation, and this is awesome! Things being teleported from one place to another. If the content is good I'll resteem it for sure! I love all these posts about new technologies and science.
Here https://g4sky.net/ also a few cool gifts for geeks!