vbGore Free Online RPG Engine

Revolutionizing Visual Basic ORPG Development
It is currently Fri May 24, 2013 3:21 pm

All times are UTC - 8 hours




Post new topic Reply to topic  [ 18 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: A question
PostPosted: Sun Mar 22, 2009 7:14 am 
Source Code Swashbuckler

Joined: Wed Dec 31, 2008 1:15 pm
Posts: 40
Location: Canada
After I created a folder separately for the client (for when I am going to publish the game), I noticed that people can easily edit the text that the NPCs say by going to /data/NPC Chat/ then the language file.

Is there anyway to change it so that they can't edit it, maybe make it so it only needs to stay with the server, not the client?


Last edited by Rote on Sun Mar 22, 2009 7:19 am, edited 1 time in total.

Top
 Profile  
 
 Post subject: Re: A question
PostPosted: Sun Mar 22, 2009 7:16 am 
baka

Joined: Tue Jul 08, 2008 12:17 am
Posts: 2304
Location: England, UK
I wouldn't have thought it really mattered. If it's clientside then all they're going to do is mess up their own game, it's not going to affect anybody else.


Top
 Profile  
 
 Post subject: Re: A question
PostPosted: Sun Mar 22, 2009 7:20 am 
Source Code Swashbuckler

Joined: Wed Dec 31, 2008 1:15 pm
Posts: 40
Location: Canada
Yeah but still...is there a way?


Top
 Profile  
 
 Post subject: Re: A question
PostPosted: Sun Mar 22, 2009 7:22 am 
baka

Joined: Tue Jul 08, 2008 12:17 am
Posts: 2304
Location: England, UK
What's the problem with that? I mean really, what's the worst case scenario?

You could encrypt it, but that wouldn't do much good since they could still edit it. You could make it server side, or you could have it stored inside the client exe.


Top
 Profile  
 
 Post subject: Re: A question
PostPosted: Sun Mar 22, 2009 7:23 am 
Slave to the BB

Joined: Tue Jul 31, 2007 8:45 am
Posts: 3273
Location: United Kingdom
You can encrypt it. If they get the encryption key somehow, they can change it, but there's really not much they can do anyway, and it's not exactly easy to get.

http://www.vbgore.com/Encrypting_textures

Explains how to encrypt your png textures, it's not too hard to adapt for anything else.

unencrypted file:
Quote:
////////////////////////////////////////////////////////////////
// N P C C H A T I N F O R M A T I O N: //
////////////////////////////////////////////////////////////////
// This is the file used to display the NPC random chat info. //
// None of this information is used on the server. It is //
// purely on the client. In most cases, this shouldn't be a //
// problem, since it doesn't matter if the chat is sync'd, as //
// long as it gets to client in the end. The reasons this is //


Encrypted file:
Quote:
­ŠD"Ìj´¬´?%¦!3[( ‰Ê_Џ˜¼É€Ÿ‹K“œpuNÏÒ"!ámSí _ƒ—^\œêt7B½ów€×„]'‰T&7Í·IÚ‚€`ª;Ì\—ÀÚðÉø¶éÚrxGÎyÅtåô]e¼Q]@±Þ¢ÖòD†´%¡ÀÏýFm’iŸ8 ”{\@,̸Ë#1ZqXkN¤€¨S½+÷èo÷ý89ÒŠY@ 2°Ê#)ÎÐËv®¤^tEN›
©‰Þ†5ÆG™€gQEU†Ts]§ö®
"“Æ6ã´lÓ ™,¬¤.Õ:¥s;CvUðϹ«3@~ú‹Xí.%‹yv´ST}+Çk`P¿KK¦hMuqÃvšŸöNÝ%ëS•ðu¡Î¸ru\–¸é´¢^=~öÚØ‹y•ˆµ¬D8Ôôƒ©sÀäËnMÝüž€9”Ì™H#"¼ŠtÀƒ®ùa]›™ìç/‘,J–zšr³éòª¯•i)´Ð<H»öíÃÏ9¬ËZºVÝhbƒÆ¼Ëczå=Ó¬(i¾³ÿTÊÈ6„Ï6?‰4́o¬êš Ò8}|³­÷ª\Ÿ€Ðt‡£ç1‰8Ô@×>ˆÄ'R©°’ öcÑ>Ä1Ïì¾¶¢Œþµ‚qóö²%ÝøÄ¾üg?ñbtšªñÓ²
™$¡L÷ö×µFé2d)Õàí`®C:ó©sëÙgš›_l6µ¿RÛÙH
¾<† º8=²üÚÖdM—hbzYô·ýB&*\ä‚ÿ9àlWnv¤Éé:ÛÜ>{¶¨ÚeôìZ ŵ왪˾gk I G@[ ã8 )WቈgWºUm¼ïRÀï8d́œ:¹ÚŸó{ô×/—Šáþ`–Ä ƒ]¸O¢L†‘±ñ_T1mOîuñ5.¢(̵-êÈ}ùã_ÇÚݝ-”?1ŸYë^>ŸïqnSïª)6~»Ì )ļ
¡I/ÜBòôY0‰|e2ìO¸3¤ÏÚúp¡Z싐ø*„1¹}nèÑ Aâ-Jòi4á¤qÀLŠÐÏ4¹’¥…ÿ,ƒ¨¼«ÜÖM


Top
 Profile  
 
 Post subject: Re: A question
PostPosted: Sun Mar 22, 2009 7:26 am 
baka

Joined: Tue Jul 08, 2008 12:17 am
Posts: 2304
Location: England, UK
I suppose one way you could make sure they hadn't edited the file is storing an md5 hash of it inside the gameclient, then checking it against an md5 hash of the file they have.


Top
 Profile  
 
 Post subject: Re: A question
PostPosted: Sun Mar 22, 2009 7:26 am 
Source Code Swashbuckler

Joined: Wed Dec 31, 2008 1:15 pm
Posts: 40
Location: Canada
Thanks DarkFrost, just what I was looking for =)


Top
 Profile  
 
 Post subject: Re: A question
PostPosted: Sun Mar 22, 2009 7:38 am 
Slave to the BB

Joined: Sat Feb 24, 2007 11:17 pm
Posts: 2704
Location: The Aussie Land
Simple NOT encryption should do the trick. If they ever make the effort to figure it out, then it won't matter what you do :P

But the best way would be to serialize all the chats into one binary file.

@Kyori: MD5 is only one way. What's the point, you figure out they've changed it but then you can't do anything about it anyway lol.


Top
 Profile  
 
 Post subject: Re: A question
PostPosted: Sun Mar 22, 2009 7:45 am 
Slave to the BB

Joined: Tue Jul 31, 2007 8:45 am
Posts: 3273
Location: United Kingdom
There's no way to stop it completely. If you do an MD5 check, they just modify the md5 that's sent / stored in memory, and boom, that's avoided.

Etc etc.


For something like this, is doesn't really matter. Basic encryption and you'll be fine.


Top
 Profile  
 
 Post subject: Re: A question
PostPosted: Sun Mar 22, 2009 7:46 am 
Source Code Swashbuckler

Joined: Wed Dec 31, 2008 1:15 pm
Posts: 40
Location: Canada
I just want to do something basic so its not just easily accessed.

Okay, now I have encrypted them using RC4, all of the .ini files in the Data folders, now I am editing the source and changed all of the .ini files to .enc ones.

The tutorial you posted helped, but now I need to change the encryption in the source, in the tutorial it shows how to do textures only, how can I do the text files, or in this case the .enc files?


Top
 Profile  
 
 Post subject: Re: A question
PostPosted: Sun Mar 22, 2009 7:51 am 
baka

Joined: Tue Jul 08, 2008 12:17 am
Posts: 2304
Location: England, UK
bakekitsune wrote:
@Kyori: MD5 is only one way. What's the point, you figure out they've changed it but then you can't do anything about it anyway lol.

You could redownload the original file if you find that theirs has been edited :)


Top
 Profile  
 
 Post subject: Re: A question
PostPosted: Sun Mar 22, 2009 8:18 am 
Source Code Swashbuckler

Joined: Wed Dec 31, 2008 1:15 pm
Posts: 40
Location: Canada
Ok I just noticed something, won't the updater just see that the MD5 isn't the same, so it will download it from the update server, thus, changing the changes the user made to the file?


Top
 Profile  
 
 Post subject: Re: A question
PostPosted: Sun Mar 22, 2009 10:05 am 
Slave to the BB

Joined: Tue Jul 31, 2007 8:45 am
Posts: 3273
Location: United Kingdom
Yeah, but the user could just not run the updater.


Top
 Profile  
 
 Post subject: Re: A question
PostPosted: Sun Mar 22, 2009 10:18 am 
Slave to the BB

Joined: Sat Feb 24, 2007 11:17 pm
Posts: 2704
Location: The Aussie Land
Saving

Load the txt file into a byte array.

NOT each byte

Save the byte array back into the txt file.


Loading

Load the txt file into a byte array.

NOT each byte

Get string directly from RAM


Top
 Profile  
 
 Post subject: Re: A question
PostPosted: Wed Apr 01, 2009 8:39 am 
Fresh Meat

Joined: Fri Jan 23, 2009 5:37 am
Posts: 14
Location: United States
I dont understand why encryption is bad????
It's not easy breaking an encryption file and figuring out the password, you can just make a super huge mega key if they try brute force method. :spin:


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 18 posts ]  Go to page 1, 2  Next

All times are UTC - 8 hours


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group