Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Discussion / Crypting files?

Author
Message
bunghole
21
Years of Service
User Offline
Joined: 10th Feb 2004
Location: Finland
Posted: 7th Sep 2004 20:21
When saving normal text in files (like saves: coordinates, money and so on), you can change them too easily. Can DBC crypt files so that the player can't modify them??
blanky
20
Years of Service
User Offline
Joined: 3rd Aug 2004
Location: ./
Posted: 8th Sep 2004 05:09
[edit] i just realised the following talks about numbers. Still, USE NUMBERS for money and stuff, and if you need to have something in text, you can painstakingly convert each letter to a number (use Int or Hex or something). [/edit]

[edit2] (EASIEST SOLUTION EVER) Hide the file somewhere weird... like.. uhh... in the registry, or in a file somewhere in the /windows folder (keeps newbies out with the 'do not mess with these files' warning when they try to browse it whilst if you don't choose the filename of something important (like system.dat) keeping the computer 100% intact!) with an extension belonging to something else... like.. uh....... .GIF or .bmp or .png or something. And give it a convincing name like... staple.[/edit2]

Just make it complicated!

The easiest way is to use numbers; I mean come on, how many average gamers are going to figure out you're using DarkBasic, and download the 'trial just to change the gamesaves?


Also, you might do something weird with the numbers like store them as decimal numbers and put in the save instead of the normal number, put a number divided by 3.467 or 4.789 or something. Even better, make the divided number different for each thing.

By now, either you (or in the future, the player of your game) is/are/will be completely addled/baffled/ehwhatthehell'd.

[img src=http://blanky.pt-web.net/ddd.gif] >::p
Mentor
22
Years of Service
User Offline
Joined: 27th Aug 2002
Location: United Kingdom
Posted: 8th Sep 2004 05:31
try reading through this thread, I give an example of encoding files lower down (applies to gamesaves too), just adopt that.

http://forum.thegamecreators.com/?m=forum_view&t=37752&b=1

Mentor.

PC1: P4 3ghz, 1gig mem, 2x160gig hd`s, Radeon 9800pro w cooler (3rd gfx card), 6 way speakers.
PC2: AMD 2ghz, 512mb ram, FX5200 ultra, 16 bit SB.
Mini ATX cases suck.
Underworld 1020
21
Years of Service
User Offline
Joined: 2nd Mar 2004
Location: NY, USA
Posted: 8th Sep 2004 05:35
Is there any way to stop the player from opening the file at all.

Maybe making it a hidden folder or a password or something like that?
blanky
20
Years of Service
User Offline
Joined: 3rd Aug 2004
Location: ./
Posted: 8th Sep 2004 05:43
uh try... ummmm... well, basically, no, not really. if you change the extension to a .dat, in xp when they try and load it it will work, but it'll tell them that 'DAT files are system files'

[img src=http://blanky.pt-web.net/ddd.gif] >::p
Phaelax
DBPro Master
22
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 9th Sep 2004 10:02
you could always write your own RSA encryption.

"eureka" - Archimedes
blanky
20
Years of Service
User Offline
Joined: 3rd Aug 2004
Location: ./
Posted: 10th Sep 2004 02:14
Yes, you could. (GOOD LUCK)

[img src=http://blanky.pt-web.net/ddd.gif] >::p
Phaelax
DBPro Master
22
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 10th Sep 2004 09:07
lol, well in java you could do it.

"eureka" - Archimedes
Indian Homie G
21
Years of Service
User Offline
Joined: 23rd Jan 2004
Location: San Jose, CA
Posted: 12th Sep 2004 15:44
NOPE, that windows directory idea won't work. IF you want to overwrite a file for saving, you cant, cuz goddamn windows OS doesnt let you delete files from the windows directory (or any dir for that matter, i think), cuz they dont want us programmers to write a program like:


Yeah... i tried this when I was trying to write a keylogger

AMD Athlon XP 3000+, S3 Deltachrome s8, 512 PC3200 RAM, 160 GB HD
Jess T
Retired Moderator
21
Years of Service
User Offline
Joined: 20th Sep 2003
Location: Over There... Kablam!
Posted: 12th Sep 2004 16:07
Give me 10 minutes to try something, and I'll get back to you on a lil trick I learnt when I used to hac... I mean, play around with Windows

10...
9...

Jess.


Team EOD :: Programmer/Logical Engineer/All-Round Nice Guy
Jess T
Retired Moderator
21
Years of Service
User Offline
Joined: 20th Sep 2003
Location: Over There... Kablam!
Posted: 12th Sep 2004 16:38
Ok, Never mind...

The trick was that when you create a directory, if you have one of the following:
- 'funny sound.{0003000D-0000-0000-C000-000000000046}'
- 'control panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}'
- 'aX0023sys.{ECD4FC4F-521C-11D0-B792-00A0C90312E1}'
- 'internet explorer.{FBF23B42-E3F0-101B-8488-00AA003E56F8}'
- 'keys.{BD84B380-8CA2-1069-AB1D-08000948F534}'
- 'Dial-Up networking.{992CFFA0-F557-101A-88EC-00DD010CCC48}'
as the filename ( without the ' things ) then it would become the corresponding system file, and thus, would execute, say, The control panel when double clicked. Instead of opening a directory..

I tried to get it to do this in DB, but it doesn't seem to make the directory...

You can see it in action by making a new folder yourself, then renaming it to one of those.

Jess.


Team EOD :: Programmer/Logical Engineer/All-Round Nice Guy
Dot Merix
21
Years of Service
User Offline
Joined: 15th Oct 2003
Location: Canada
Posted: 16th Sep 2004 06:21
You could do something similar to the code/tutorial i've listed here...

http://forum.thegamecreators.com/?m=forum_view&t=39145&b=7

- Merix
Harvester
20
Years of Service
User Offline
Joined: 17th Sep 2004
Location: Infront of my computer
Posted: 17th Sep 2004 13:57
Another way to do it is to save all your game data in an array(I dont know if dbc can save memblocks) just use something like this

*code*

DIM Player_Data(2)

Player_Data(1) = Player_Gold
Player_Data(2) = Player_Experience

SAVE ARRAY "player saved data.psd", Player_Data(0)

rem to load, just do this

DIM Player_Loaded_Game

LOAD ARRAY "player saved data.psd", Player_Loaded_Game(0)

*endcode*

windows won't let you open a file with an unknown extension,
so people trieng to edit their saved games won't even be able to open the file unless they have db and know that your game was writin in db, and then they have to write a program to do it.
hope it helps
blanky
20
Years of Service
User Offline
Joined: 3rd Aug 2004
Location: ./
Posted: 21st Sep 2004 06:41
if you've got a command-line and parameter-based hex editor, you could save it inside the DB executable (i tried it once, it worked!)

Score$="YOOHOO!!!"

blhex.exe -find YOOHOO!!! -replace 34 points

(If only blhex.exe actually existed... )

[img src=http://blanky.pt-web.net/ddd.gif] >::p

Login to post a reply

Server time is: 2025-05-24 16:54:18
Your offset time is: 2025-05-24 16:54:18