Gossamer Forum
Home : General : Perl Programming :

Perl Problem - Please help

Quote Reply
Perl Problem - Please help
Hey everyone. I am trying to make an instant messenger and I am worried about security. Currently I have all the messages in a "msgs" directory and each user has a txt file named username.txt and anyone can access anyones I need some way to have it so if someone goes directly into one of the text files they cant see what it says or mess with it. The same thing for the file with the passwords (all in one file) like a small code I can add to my scripts that will encrypt and another that can decrypt. If ANYONE can help make sure you E-MAIL me because I might not be able to check back at this forum so PLEASE e-mail me. THANKS!!! miketwalker@cfl.rr.com

Quote Reply
Re: Perl Problem - Please help In reply to
Sorry I don't understand. How can they get "into" a text file?

Installations:http://www.wiredon.net/gt/

Quote Reply
Re: Perl Problem - Please help In reply to
By simply going to the url that the text file is at like http://www.theurl.com/whatever.txt They can see everything in there but if I can encrypt everything being written such as messages it will be a bunch of coding so they wont understand what is in the file. But in the same fashion I need to be able to decrypt it for when the user comes in so they can read the messages. Do you see what I mean now?

Quote Reply
Re: Perl Problem - Please help In reply to
When the program creates the .txt files, just have it set permissions 755. Then no one can view them. Just use something like this:

chmod(0755,$filebeingcreated);

Quote Reply
Re: Perl Problem - Please help In reply to
The thing is, what happens when the user logs in to there messenger account and wants to see what is in that text file because that text file has there messages.

Quote Reply
Re: Perl Problem - Please help In reply to
It will still be able to read the file. Why don't you just test it? Chmod one of the user files to 755 and then log in as that user and read your messages...

Quote Reply
Re: Perl Problem - Please help In reply to
Another thing, do you know how to encrypt and decrypt though I mean for the passwords in the users file as added security.