Fun with zip files!

Write tutorials here
There are more tutorials here http://community.linuxmint.com/tutorial/welcome
Forum rules
Please don't add support questions to tutorials,start your own thread in the appropriate sub-forum instead. Before you post please read this
User avatar
dagon
Level 7
Level 7
Posts: 1670
Joined: Mon Dec 06, 2010 4:33 am
Location: Kungälv, Sweden
Contact:

Fun with zip files!

Postby dagon » Mon Jul 09, 2012 12:09 pm

The geek factor of what you're about to read is probably close to redefining 'geek'.
You have been warned. :shock:

Here goes...
As a zip file has it's specifications in the end, while most other files has it in the beginning(header), you can concatenate a zipfile in the end of another file if that file has a header that defines it's length (.gif, .wav, ... you name it!). This way all you need to do is to rename it *.zip for the OS to read it as an archive or, as a .gif(if that's what you've got) to open it as a picture. In the case of Linux, omit the suffix and the OS will read the magic numbers in the beginning of the file and treat it accordingly.


In short, this is how you do it:
zip a text file:

Code: Select all

zip output.zip text.txt


put the .gif and the .zip file in that order in the same file:

Code: Select all

cat picture.gif output.zip > output2


Now, if you want to present someone with the pretty picture containing a hidden message you rename the file as a picture:

Code: Select all

mv output2 pretty-picture.gif


Example1:
gif.zip
(8.49 KiB) Downloaded 43 times

Example2, rename this one as either a .zip or a .wav:
zipped-soundfile.zip
(57.45 KiB) Downloaded 34 times


Here is where I got this stuff. I only made a more general interpretation of it and "tutorialised it".
http://gayhacker.wordpress.com/2009/04/ ... well-well/
http://www.cs.cmu.edu/~dst/DeCSS/Gallery/Stego/index.html

8) - I'm simply not a nice person!
Last edited by dagon on Mon Jul 09, 2012 5:52 pm, edited 2 times in total.
Reason: Changed to a less elusive title.

User avatar
remoulder
Level 17
Level 17
Posts: 7653
Joined: Fri May 09, 2008 1:14 pm
Contact:

Re: Fun with zip files!

Postby remoulder » Mon Jul 09, 2012 4:58 pm

Ho not very nice geek, methinks you made a boo boo in your cat example :lol: :lol: :lol:
[Edit] your original post and add [SOLVED] once your question is resolved.

“The people are my God” stressing the factor determining man’s destiny lies within man not in anything outside man, and thereby defining man as the dominator and remoulder of the world.

User avatar
dagon
Level 7
Level 7
Posts: 1670
Joined: Mon Dec 06, 2010 4:33 am
Location: Kungälv, Sweden
Contact:

Re: Fun with zip files!

Postby dagon » Mon Jul 09, 2012 5:57 pm

Fixed, I think... 8)
I found it crazy hard to keep track on what thing went were and why on this one...


Return to “Tutorials”

Who is online

Users browsing this forum: No registered users and 6 guests