Password For Zip files

Discuss about anything related to the Irrlicht Engine, or read announcements about any significant features or usage changes.
StuCollier
Posts: 52
Joined: Tue Mar 30, 2004 12:16 pm

Password For Zip files

Post by StuCollier »

Any chance that the zip class can be updated to allow a password to be entered ?

My fear is that once projects are released - it would just take someone to rename my zip file back to ZIP and unpack .........

:)
StuC
Freeware games
www.ovine.net
Robomaniac
Posts: 602
Joined: Sat Aug 23, 2003 2:03 am
Location: Pottstown, PA
Contact:

Post by Robomaniac »

I know that you can do that in WinRAR, however, i do not know how Irrlicht Handles them.
The Robomaniac
Project Head / Lead Programmer
Centaur Force
etcaptor
Posts: 871
Joined: Fri Apr 09, 2004 10:32 pm
Location: Valhalla
Contact:

Post by etcaptor »

This is a very important feature. I need to know too.
schick
Posts: 230
Joined: Tue Oct 07, 2003 3:55 pm
Location: Germany
Contact:

Post by schick »

I do not think its implemeted in the irrlicht engine itself, but it should not be a big deal to change the source to your needs. Have a look at the irrlicht source.
Please send me an e-mail instead of a private message.
stampsm
Posts: 142
Joined: Mon Nov 10, 2003 5:52 pm
Location: Las Vegas

Post by stampsm »

actually irrlicht uses the zlib zip library so if zlib can use passwords irrlicht can probably be modified to use them but if can't irrlicht can't
Luke923
Posts: 59
Joined: Wed Nov 05, 2003 5:26 am

Post by Luke923 »

I was reading the ZLib manual, and it appears that there's no function for reading a password, unfortunately. Schade :(
"Object-oriented programming is an exceptionally bad idea which could only have originated in California."
- E.W. Dijkstra
Dataleap

Post by Dataleap »

Just to let you know, if the guy is smart enough to change file extension and unzip, he is probably smart enough to get a Zip password cracker. But again, who know :roll:
Luke923
Posts: 59
Joined: Wed Nov 05, 2003 5:26 am

Post by Luke923 »

Dataleap wrote:Just to let you know, if the guy is smart enough to change file extension and unzip, he is probably smart enough to get a Zip password cracker. But again, who know :roll:
But, a password cracker (assuming he's running brute force on a fairly large string) can take what can seem like an eternity. Most users just don't have the patience to wait for a password cracker, unless they are really desparate. Just make the password something like 40 chars mixed w/ Alphas, Numerics, and symbols. To crack a password like that, he/she will have to run the cracker for probably a month (and that's no exaggeration).
"Object-oriented programming is an exceptionally bad idea which could only have originated in California."
- E.W. Dijkstra
StuCollier
Posts: 52
Joined: Tue Mar 30, 2004 12:16 pm

Post by StuCollier »

Ive looked around and found some src code that enables Passwords to be used with the Zlib.

http://www.codeproject.com/cpp/zip.asp? ... ect=742790

Now Ive quickly looked through the source and it seems to be fairly straight forward. - but alas my C++ skill is not enough that I can update Irrlicht source.

ZipArchive.cpp seems to be the main function. Ive tried converting the password and crypt routines but get sooo many link errors its untrue.

Another lib that uses zlib and has password inclusion is http://www.artpol-software.com/index_zip.html


Has anyone the time to have a look and have a try ?
StuC
Freeware games
www.ovine.net
warui
Posts: 232
Joined: Wed Apr 14, 2004 12:06 pm
Location: Lodz, Poland
Contact:

Post by warui »

And how about instead of using password, change some bytes in a header of a file (or even in the whole file) ? For example, you can add 5 to all header bytes, and AFAIR all zip programs will have big problem with opening it. Obviously it's only useful as long as you won't publish the source code :D
Tomasz Nowakowski
Openoko - www.openoko.pl
Tequilla
Posts: 40
Joined: Mon Nov 10, 2003 3:42 pm
Location: Germany
Contact:

Post by Tequilla »

Once, I had the same problem. The way i solved it:
After making the zip-file I xored it by any byte. When the programs starts, it xores the file again by the same byte and safes the result in the temp-dir. This file can now be handled as a zip-file. On terminating the program it deletes the tmp-file.
AssiDragon
Posts: 158
Joined: Wed Apr 28, 2004 11:03 am
Location: Hungary
Contact:

Post by AssiDragon »

If someone wants to get your stuff out of your ZIP, he/she can simply do it using the gamecode... whatever you do the method how to unpack the zip will be in your game.
If you don't want people to modify the game's stuff in the zip (say cheat thsi way), a simple checksum function would do it though. :)
Staring through eyes of hate we kill
Are we controlled, or is our own will...?
(Edguy)
stampsm
Posts: 142
Joined: Mon Nov 10, 2003 5:52 pm
Location: Las Vegas

Post by stampsm »

i like the idea of inverting every byte of the file it is easy to do and even a novice programmer can figure out how to do that
example
00000000
becomes
11111111



11110000
becomes
00001111
Bel'ni
Posts: 7
Joined: Tue May 11, 2004 7:06 am
Location: The Netherlands

Post by Bel'ni »

The harder you make your protection, the more it will cost (time / money) to create such a protection. But someone will break your protection sooner or later, no matter how good it is.

Why not leave to protection out of it and see it as an extra feature for your game. If its fun to do it, your game has a plus for them. If its not fun to do (or there is no need) chance is they wont even try doing it.
Watch, Think and Tinker.
Tyn
Posts: 932
Joined: Thu Nov 20, 2003 7:53 pm
Location: England
Contact:

Post by Tyn »

Yeah, I'm a believer of the fact that if a user wants to get your files he can. The only real protection you can have is to include an art license with your product to stop commercial projects using your files, trying to stop end user's hacking your file is as rendundant as record labels trying to put protection on their album CD's.
My fear is that once projects are released - it would just take someone to rename my zip file back to ZIP and unpack .........
If a project is willing to break a license you put on your work then they are willing to find a way around your password. What's the worst that can happen? Some small time programmer who can't model uses your models without permission to put in their game? If they don't have the talent to create their own ones then I doubt you will ever see your models being paraided around the net claiming they did it. Odds are that if they can't get the help to do the models you create then noone is going to ever play their game anyway.

I understand people like to protect their content but if you are releasing it on the net then someone is going to nick it anyway, no matter what lengths you go to. I recon you shouldn't waste your time on protecting your files and work on making your project as good as it can be.
Post Reply