[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4787: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3922)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4789: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3922)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4790: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3922)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4791: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3922)
InsideQC Forums • View topic - Pk3 archives protected by password in FTEQW

Pk3 archives protected by password in FTEQW

Discuss programming topics for the various GPL'd game engine sources.

Moderator: InsideQC Admins

Pk3 archives protected by password in FTEQW

Postby toneddu2000 » Thu Jan 29, 2015 5:45 pm

Hy guys, I asked a modeler to do some models for my game but he said "I don't feel confortable to know that everyone that buys your game can unzip data archives and see/use my models". Which, of course, seen from a external freelance modeler point of view is not so unreasonable. So, I''m asking you engine gurus, there's a way to tell the engine (I use FTEQW) to search for a password (at least for a specific .pk3 file) before open a .pk3 archive?

Please guys help me! :D

EDIT: An hardcoded solution (search for password 'foobar' in protected.pk3) would be still great! Thanks!
- my first commercial game, made with FTEQW game engine
toneddu2000
 
Posts: 1395
Joined: Tue Feb 24, 2009 4:39 pm
Location: Italy

Re: Pk3 archives protected by password in FTEQW

Postby Spirit » Thu Jan 29, 2015 6:47 pm

Sorry, but that is an idiotic viewpoint of him. You can pretty extract everything from every game ever, often easily. How on earth does he want things to be instead?

What prevents someone to simply check what password your engine uses?
Improve Quaddicted, send me a pull request: https://github.com/SpiritQuaddicted/Quaddicted-reviews
Spirit
 
Posts: 1037
Joined: Sat Nov 20, 2004 9:00 pm

Re: Pk3 archives protected by password in FTEQW

Postby Jay Dolan » Thu Jan 29, 2015 6:51 pm

Yea, because your engine is open source (it is, right?), this would simply never work. The artist needs to get over his fears (and himself, from the sound of it). Despite his paranoia, "hackers" aren't waiting eagerly to leak or repurpose models from free Quake mods. Either he wants to help you out, or he doesn't. He ain't gettin' rich either way :lol:

Edit: Wait a minute, you're selling your Quake-based game? Do you have a commercial license for idTech, or are you selling an open source game?
User avatar
Jay Dolan
 
Posts: 59
Joined: Tue Jan 22, 2008 7:16 pm
Location: Naples, FL

Re: Pk3 archives protected by password in FTEQW

Postby toneddu2000 » Thu Jan 29, 2015 7:07 pm

- my first commercial game, made with FTEQW game engine
toneddu2000
 
Posts: 1395
Joined: Tue Feb 24, 2009 4:39 pm
Location: Italy

Re: Pk3 archives protected by password in FTEQW

Postby Spirit » Thu Jan 29, 2015 7:53 pm

I didn't mean to insult him, just the thought. And I am honestly interested how he thinks it should be "protected". Has he sold models previously? How was it handled there.

It will be trivial for someone experienced (with reverse engineering or peaking at binaries) to get the model out in any case. It just takes one to publish it then.

You can't technically limit this. Instead, the model is protected by copyright and that should really be enough in my opinion.
Improve Quaddicted, send me a pull request: https://github.com/SpiritQuaddicted/Quaddicted-reviews
Spirit
 
Posts: 1037
Joined: Sat Nov 20, 2004 9:00 pm

Re: Pk3 archives protected by password in FTEQW

Postby Spike » Thu Jan 29, 2015 9:26 pm

firstly, remember that its a pk3. yes its a zip, but your average user will not necessarily know that and won't try opening it (and windows won't guess based upon anything but the extension).

you could just use a pak instead, which do require more specialist tools to read+write properly.

if you're really desperate, you can use/make a filesystem plugin, an example is the mpq filesystem plugin (spirit may remember the diablo2 thing). again, people will be able to decode that if they know what it is and they can find appropriate tools.
if you made a similar plugin that 'contains' a single pk3, you could can hardcode pretty much all the logic to act as a passthrough to decrypt the embedded data, and depend upon fte's nested package support in order to load it using its built-in pk3 loading. of course, filesystem plugins depend upon engine headers, so you can't really get away from the gpl.
and even if you could, a user could just configure a server to allow its contents to be downloaded, or could write some qc to read the files and write them out to a new name that isn't inside a package (or do it in the engine).

it might be interesting to store per-file passwords as some postfix on the filename or something, and have the gamecode specify the passwords that way. you'd need some sort of algorithm to generate the (per-file) passwords to avoid the strings being seen in plain text (at least stored in the string table away from the mdl names), and there's always a problem with people decompiling mods.
however, there's some file types that would be hard to provide passwords for in this way, stuff like textures and shader files.


lots of options, and none of them with any real protection.
which I guess is why you'd be happy with a hardcoded password.


tl:dr:
fte doesn't support any encryption in pk3s.
there's a plugin for mpq (which does still support compression+obfuscation) if you can find tools to write them.
whatever you do, someone can hack the engine to write the file out to disk after any decryption.
.
Spike
 
Posts: 2914
Joined: Fri Nov 05, 2004 3:12 am
Location: UK

Re: Pk3 archives protected by password in FTEQW

Postby frag.machine » Thu Jan 29, 2015 10:54 pm

I know FrikaC made a cgi-bin version of the quakec interpreter once and wrote part of his website in QuakeC :) (LordHavoc)
User avatar
frag.machine
 
Posts: 2120
Joined: Sat Nov 25, 2006 1:49 pm

Re: Pk3 archives protected by password in FTEQW

Postby Baker » Fri Jan 30, 2015 3:20 am

FTE doesn't support that in the code, so one possibiility rather that going to all that trouble is to skip all of that and overwrite some of the bytes in the zip file to cause it to be invalid.

Store the bytes in a string in the engine source code (const char[] zipbytes = "zAtZkLL40 ..."). Write those bytes to the .pk3 on engine startup causing it to be valid. To be more thorough, you would do it memory and never touch the disk file.

Newbie dudes would not be able to access the file (how can you open an invalid file missing directory header?)

It would be a quick and dirty solution. And I wouldn't recommend it. But if your only problem is someone feeling secure, it would solve your problem.

A more legitimate way would be to store the model in the executable, thus it is never available as an individual file. On Windows you could add the file to resources (.rc section). Someone very determined or knowledgeable would be able to find tools to extract out of the executable, but a casual person wouldn't likely know the right words to even begin that journey in a search engine.
The night is young. How else can I annoy the world before sunsrise? 8) Inquisitive minds want to know ! And if they don't -- well like that ever has stopped me before ..
User avatar
Baker
 
Posts: 3666
Joined: Tue Mar 14, 2006 5:15 am

Re: Pk3 archives protected by password in FTEQW

Postby toneddu2000 » Fri Jan 30, 2015 11:45 am

- my first commercial game, made with FTEQW game engine
toneddu2000
 
Posts: 1395
Joined: Tue Feb 24, 2009 4:39 pm
Location: Italy

Re: Pk3 archives protected by password in FTEQW

Postby Baker » Fri Jan 30, 2015 2:02 pm

The night is young. How else can I annoy the world before sunsrise? 8) Inquisitive minds want to know ! And if they don't -- well like that ever has stopped me before ..
User avatar
Baker
 
Posts: 3666
Joined: Tue Mar 14, 2006 5:15 am

Re: Pk3 archives protected by password in FTEQW

Postby toneddu2000 » Fri Jan 30, 2015 4:38 pm

- my first commercial game, made with FTEQW game engine
toneddu2000
 
Posts: 1395
Joined: Tue Feb 24, 2009 4:39 pm
Location: Italy

Re: Pk3 archives protected by password in FTEQW

Postby revelator » Fri Jan 30, 2015 6:57 pm

Still problems atleast on my end, the reply page takes several minutes to load and i have a 100/100 mb connection :shock: also the entire site takes ages to load.
Productivity is a state of mind.
User avatar
revelator
 
Posts: 2605
Joined: Thu Jan 24, 2008 12:04 pm
Location: inside tha debugger

Re: Pk3 archives protected by password in FTEQW

Postby frag.machine » Sat Jan 31, 2015 1:24 am

I know FrikaC made a cgi-bin version of the quakec interpreter once and wrote part of his website in QuakeC :) (LordHavoc)
User avatar
frag.machine
 
Posts: 2120
Joined: Sat Nov 25, 2006 1:49 pm

Re: Pk3 archives protected by password in FTEQW

Postby toneddu2000 » Sat Jan 31, 2015 11:43 am

- my first commercial game, made with FTEQW game engine
toneddu2000
 
Posts: 1395
Joined: Tue Feb 24, 2009 4:39 pm
Location: Italy

Re: Pk3 archives protected by password in FTEQW

Postby frag.machine » Sat Jan 31, 2015 2:30 pm

I know FrikaC made a cgi-bin version of the quakec interpreter once and wrote part of his website in QuakeC :) (LordHavoc)
User avatar
frag.machine
 
Posts: 2120
Joined: Sat Nov 25, 2006 1:49 pm

Next

Return to Engine Programming

Who is online

Users browsing this forum: No registered users and 2 guests