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.

Newcomers DBPro Corner / Your own file extensions?

Author
Message
Soroki
18
Years of Service
User Offline
Joined: 26th Jan 2006
Location: United States
Posted: 6th Sep 2006 20:37
Is it possible to create your own file extensions? I noticed people have things such as a .map and .sav, etc. I have DB Enhanced.

If we're here to help others, what exactly are the others here for?
Sonic 91 Software
19
Years of Service
User Offline
Joined: 19th Mar 2005
Location: In a Cryptic Crossworld!
Posted: 6th Sep 2006 20:43 Edited at: 6th Sep 2006 20:46
yes you can. making up your own file extensions protects the data stored in the file from being read or edited outside the program. I think it also protects it from internet hackers. you are not limited to 3 characters in the file extensions, you can have as many as you like!

E.g.
helloworld.abc
goodbyeplanet.1n
welcomeearth.rehrtghusghcuihgruihgreuihghuiewyvcgcughschsuui
fairwell3rdplanet.:

very rarely, though, you may create a file extension that is already in use. the other day, for instance, i created a file with my initials as the extension (file.sdb) and when i went to it, the extension sdb had been recognised by the computer as an application extension file (like a .dll file).

I am a Christian and I know that God loves me. That is what makes my life so great!
Soroki
18
Years of Service
User Offline
Joined: 26th Jan 2006
Location: United States
Posted: 6th Sep 2006 20:47 Edited at: 6th Sep 2006 21:02
So...wait, hold on. You just type your extension on...wait, I'm a noob, so...yeah...duh?

EDIT: no seriously...how..WTF...I hate being a noob programmer!

If we're here to help others, what exactly are the others here for?
Zotoaster
19
Years of Service
User Offline
Joined: 20th Dec 2004
Location: Scotland
Posted: 6th Sep 2006 21:03
Simple. If you use notepad, just make the file, go to save, type in the file name + extention, then in the thing below select all file types.

In DB:


Soroki
18
Years of Service
User Offline
Joined: 26th Jan 2006
Location: United States
Posted: 6th Sep 2006 21:06
Yay! thanks. I program every night until sleep comes and takes over, but I usually work on my minigame project I started, then I figured I should have file extensions no one can open it , like Sonic 91 Software said, and edit it.

If we're here to help others, what exactly are the others here for?
Latch
18
Years of Service
User Offline
Joined: 23rd Jul 2006
Location:
Posted: 6th Sep 2006 22:18
Just for the sake of security:

A file extension can help Windows identify and associate a file with a particular application, but the file extension itself doesn't protect the file from being edited or read. I could make a text file named test.txt or test.dfg or test.001ofg and I could open them all in notepad and change them.

If the data is binary, a halfway decent hex editor is all you would need to edit the file.

While you can use any file extension you want, in fact you don't even have to use one in DBC, the file extension is not a method of protection - or rather, a very, very, very limited form of protection.

Linux doesn't use file extensions unless there is a need to identify the type of file.

If you were actually interested in protecting the file, you would want to encrypt it somehow or save the data in your own custom format that only your program could read.

Here's a very basic example. It writes a string to a file and also an "encrypted" version to another file. I hesitate to even call it encryption! I used the file extension .txt to show that I could write bytes directly to a file and it doesn't matter what the extension is. To read the file back, I just do the opposite of how I saved it. This is how you could create your own custom format.


Enjoy your day.
Silvester
18
Years of Service
User Offline
Joined: 7th Dec 2005
Location: Netherlands
Posted: 6th Sep 2006 22:19 Edited at: 6th Sep 2006 22:23
other people can still open it in notepad and edit it...

you need to Encrypt it to let it be unreadable...

Like:



Havent tested it...but i think it works.(DBP)

EDIT:

deleted some functions spelling errors...

(""(o_o)(""
Sonic 91 Software
19
Years of Service
User Offline
Joined: 19th Mar 2005
Location: In a Cryptic Crossworld!
Posted: 6th Sep 2006 23:42
Here's a little file I made with an extension that doesn't currently exist. IF anyone can get into it and get all that is hidden inside out of it, please let me know!
Quote: "the file extension itself doesn't protect the file from being edited or read."

Fancy a go, Latch?

P.S. Don't ask me for any clues, I deleted all the source code for this file after I created it!

I am a Christian and I know that God loves me. That is what makes my life so great!

Attachments

Login to view attachments
Sonic 91 Software
19
Years of Service
User Offline
Joined: 19th Mar 2005
Location: In a Cryptic Crossworld!
Posted: 6th Sep 2006 23:45
By the way, when you open it in notepad, it reads the strings, but not much else. Anyone who can tell me what all the encrypted data means deserves a medal!

I am a Christian and I know that God loves me. That is what makes my life so great!
Latch
18
Years of Service
User Offline
Joined: 23rd Jul 2006
Location:
Posted: 6th Sep 2006 23:48 Edited at: 7th Sep 2006 00:02
Quote: "if you got into this,
you are a genius, which means you may know what comes next!
"


Encrypted and having an unusual file extension are two different things. A file extension doesn't make a file encrypted, per se.

Enjoy your day.
Tinkergirl
21
Years of Service
User Offline
Joined: 1st Jul 2003
Location: United Kingdom
Posted: 7th Sep 2006 00:18
And then at the end...
Quote: "if you knew, let me know, at sonic91software@yahoo.co.uk
go on,
2"


Not going to mail you - but it looks mostly like you just spammed out ASCII codes in the middle of the file. *shrugs* Changing the file extention will put off only the most nooby of casual browsers. The next step up from that is renaming a zip file to something else. That will put off the slightly less nooby people, but not much.

Latch
18
Years of Service
User Offline
Joined: 23rd Jul 2006
Location:
Posted: 7th Sep 2006 01:11 Edited at: 7th Sep 2006 01:16
Because of the repeating byte patterns, I thought it might be an image:



Except for the strings, it's rather uniform. I was going to try polar coordinates, but someone else can do that if they want.

Enjoy your day.
Code Dragon
18
Years of Service
User Offline
Joined: 21st Aug 2006
Location: Everywhere
Posted: 7th Sep 2006 03:35
Quote: "I deleted all the source code for this file after I created it!"


I think I've figured it out, but can't decrypt it.
Did the source code look something like this?



The file this code generates, and the file you uploaded, look very, very similar. If you encrypted a message using a one time pad with a key so the encrypted message would look like this however, it is as good as unbreakable.
Mnemonix
21
Years of Service
User Offline
Joined: 2nd Dec 2002
Location: Skaro
Posted: 7th Sep 2006 06:24
If you include a checksum of the file at the beginning/end of the file, you can see if the file has been modified by something other than the program. You add a specific unseen factor into the generation of the checksum that only your program knows about. This will get rid of a lot of the idiots who want to change their money to OMGZ RICH!

WE SHALL BECOME ALL POWERFUL! CRUSH THE LESSER RACES! CONQUER THE GALAXY! UNIMAGINABLE POWER! UNLIMITED RICE PUDDING ! ! ! ETC. ! ! ! ETC.! ! !
Sonic 91 Software
19
Years of Service
User Offline
Joined: 19th Mar 2005
Location: In a Cryptic Crossworld!
Posted: 7th Sep 2006 10:44 Edited at: 7th Sep 2006 10:45
From what I remember of last night when I made the file (and that isn't much I remember!), there are strings first, then there was this:

then a few more strings, then a byte (the number 2) at the end!
Voila.

P.S. It's my 21st birthday today!

I am a Christian and I know that God loves me. That is what makes my life so great!
Soroki
18
Years of Service
User Offline
Joined: 26th Jan 2006
Location: United States
Posted: 7th Sep 2006 20:46
Quote: "P.S. It's my 21st birthday today!"


Happy Birthday. You must feel older. I'm only 16, so each birthday to me doesn't seem to make me any older. Thanks all for the codes. I just don't quite get one small thing: how do you make a file with the code itself inside and still have the program run from that file. I can't really explain...if you don't get it...don't bother

If we're here to help others, what exactly are the others here for?
Sonic 91 Software
19
Years of Service
User Offline
Joined: 19th Mar 2005
Location: In a Cryptic Crossworld!
Posted: 7th Sep 2006 20:53
Thanks, Soroki. Yes, I DO feel older! I feel REALLY old!
Quote: "Thanks all for the codes"

that's ok!
Quote: "how do you make a file with the code itself inside and still have the program run from that file"

do you mean, running the program outside the programming environment, as an executable file? Just compile it into a .exe file from the file menu in db.

I am a Christian and I know that God loves me. That is what makes my life so great!
Soroki
18
Years of Service
User Offline
Joined: 26th Jan 2006
Location: United States
Posted: 7th Sep 2006 21:43
Well, not really. But don't worry about it. I'll figure it out. I don't want to be any trouble. LOL. You feel really old? Every time my B-day comes around, I get the question from my parents, "Do you feel any older today?" I say no, and I still don't feel any older since June when I turned 16.

If we're here to help others, what exactly are the others here for?
Code Dragon
18
Years of Service
User Offline
Joined: 21st Aug 2006
Location: Everywhere
Posted: 7th Sep 2006 23:15 Edited at: 23rd Sep 2006 21:26
Happy Birthday.

To stop hackers, if you put ".LOG" in the beginning of a file, Notepad will will record the time and date when you saved it. So, if your program sees a time and date at the bottom of a file, that means a hacker has modified it. I think it might be Windows that does it though, because this code generates a file, but somehow the time and date are recorded.



Confucius Say...Programmer who makes genetic programming system loses job

Login to post a reply

Server time is: 2024-11-27 07:37:34
Your offset time is: 2024-11-27 07:37:34