This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
wilcomega's profile picture

File Protector v1.0

Started by wilcomega, 02 March 2013 - 04:09 AM
wilcomega #1
Posted 02 March 2013 - 05:09 AM
hey guys.

status update:
i have still the moderator review because i posted misc. code. but i didnt know what misc. was :\ however i have made a new background program that will protect your files.
if you guys have any idea how to call it. please tell me.

this program has 2 parts:
- the backgrounder with the utils
- the interface

this program is mainly made to protect your files. to prevent your pc from diskbootloading put a disk in a disk drive on top with the startup file.
the backgrounder will keep track of certian files and protect them of hide them. there are some basic setting in the config file.

if you open up the interface program it will not ask for a password by default. you can change that in the config.
at the top you can see the title and 2 buttons. the green one is to add a file to the system to protect or hide. the second one is to exit.
the file manager saves automaticly. when you have added you files, each file has 3 red pixels by default.
the first one is to "unprotect" it, the second one is to protect it and the last one is to hide it.
the pixels/buttons will turn green when you click them exept for the first one.
protect means that when the file gets deleted or the content is diffrent from the point that you enabled it it will replace the file with its original content.
hide means it will delete the file and any file with that same "path". when you disable hiding it write the original content to the file
when you turn off hide protect will enable. this will make sure the file gets saved agian.
WARNING: dont enable both at the same time. wierd thing will happen to your file.

the config file has the following contents:
- acces-password=password | this is for programs that want to have the files table from the backgrounder. only change this if you know what you are doing!
- filemanager-usepass=0 | change this to 1 if you want the password for the file manager enabled
- filemanager-password=password | this is the password for the file manager, if enabled
- files={} | dont change this. this si used to save the protected files between sessions

here are the download links:
startup: http://pastebin.com/EFVFDUX8
file manager: http://pastebin.com/T06j7ut9

screenie:



some feedback and suggestions would be great
Goof #2
Posted 02 March 2013 - 11:10 AM
Screenies would be very nice :D/>
wilcomega #3
Posted 03 March 2013 - 12:30 AM
added screenie
superaxander #4
Posted 03 March 2013 - 10:55 PM
The problem with this is that everyone can change the password unless you protect it. But then you can't access it yourself.
And is the program able to open the file after it has been protected or else it will not be able to read the config
wilcomega #5
Posted 03 March 2013 - 11:34 PM
you can just protect the config file. i could make it so that it will unprotect the config on shutdown between sessions so that it can save the protected files
superaxander #6
Posted 04 March 2013 - 08:01 PM
What happens When you forget your password?
wilcomega #7
Posted 05 March 2013 - 02:41 AM
you can change it in the config file
superaxander #8
Posted 05 March 2013 - 04:30 AM
And if you protected the config file
wilcomega #9
Posted 05 March 2013 - 04:35 AM
you can still read if its protected. only if its hidden you cant
superaxander #10
Posted 05 March 2013 - 08:26 AM
So everyone can get the password?
Skullblade #11
Posted 05 March 2013 - 08:28 AM
So everyone can get the password?
Don't look directly at the bugs
Pinkishu #12
Posted 05 March 2013 - 01:11 PM
So everyone can get the password?

If you can retrieve the PW its insecure anyway :3
SuicidalSTDz #13
Posted 05 March 2013 - 02:32 PM
"A" for effort and not being a door lock. Props on originality( Kinda )
superaxander #14
Posted 05 March 2013 - 07:06 PM
So everyone can get the password?
Don't look directly at the bugs
I am just trying to help
Skullblade #15
Posted 06 March 2013 - 12:33 AM
So everyone can get the password?
Don't look directly at the bugs
I am just trying to help
And I'm just joking around :P/>
SuicidalSTDz #16
Posted 06 March 2013 - 09:16 AM
So everyone can get the password?
Don't look directly at the bugs
I am just trying to help
And I'm just joking around :P/>
Is that what they call it these days? :P/>
wilcomega #17
Posted 06 March 2013 - 09:57 AM
wow this topic went from my file protector to joking around…….
Pinkishu #18
Posted 06 March 2013 - 12:34 PM
So any reason why you need a coroutine? Didn't really get why you can't just overwrite the fs functions
SuicidalSTDz #19
Posted 06 March 2013 - 12:45 PM
wow this topic went from my file protector to joking around…….
Yeah… Happens on forums, and when it does, shortly after the thread is either locked or cleaned. I do like the FileManager to be clear. Just needs some work.
CoderJohn #20
Posted 07 March 2013 - 12:20 AM
Don't store the password on file…. The password on file should be a hash of the real password. So then when you login you do:


if(hash(input) == password)then
--do stuff
end

instead of….


if(input == password)then
--do stuff
end

It's common sense… websites don't store your actual password! They store a hash of your password. To be more precise they store a one-way hash. That means it can't be decoded it can only be encoded.
superaxander #21
Posted 07 March 2013 - 03:45 AM
Don't store the password on file…. The password on file should be a hash of the real password. So then when you login you do:


if(hash(input) == password)then
--do stuff
end

instead of….


if(input == password)then
--do stuff
end

It's common sense… websites don't store your actual password! They store a hash of your password. To be more precise they store a one-way hash. That means it can't be decoded it can only be encoded.
Try the one from gravityscore for hashing
theoriginalbit #22
Posted 07 March 2013 - 04:00 AM
To be more precise they store a one-way hash.
Hashes are always one-way. if you have a two-way hash then well … you don't have a hash, you have a potentially dodgy encryption.
SuicidalSTDz #23
Posted 07 March 2013 - 01:07 PM
Don't store the password on file…. The password on file should be a hash of the real password. So then when you login you do:


if(hash(input) == password)then
--do stuff
end

instead of….


if(input == password)then
--do stuff
end

It's common sense… websites don't store your actual password! They store a hash of your password. To be more precise they store a one-way hash. That means it can't be decoded it can only be encoded.
His program, meaning he can do what he wants. If he decides to take your advice, well then good for him. He doesn't need people telling him what to do. Also it is not common sense to use an algorithm to hash information, most users that join the forum store information, passwords to be specific in tables or variables. I do, however, agree with you in this case (Shocker..). I do believe this program could be advanced by using ASCII encryption or a hash. Again, your program, your choice.

SIDE NOTE: MOST websites store your information using a hashing algorithm. Yes, that's correct, not all websites protect your information. ;)/>