| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
first please for give because of my english;
I am a student in computer engineering, and I realy want a answer to my question; I want to put password to a txt file in windows but I can't find the way or the code to do this;when I double click the txt file I want my program to run to ask password. I write the all program codes but I cant find the way to do this.. please help me! |
|
#2
|
|||
|
|||
|
Hey! Litmus...your english is quite allright
. The idea to hide a password inside a txt file is good, as long as you encrypt the file. If not, the idea doesn't work at all. So, write an encryption function and insert the password (encrypted, of course) inside the text in a position you know. So when the program is asked to pick up the file, you just prompt for the password and compare it to the one allready stored in the text. For example: kjhakdsjhfajdshfalkjdhfajhfdasjhfdjj3l3jh58eroi2h39 hpw fbnqwebfpq7erg23978 where the characters in bold, are the stored password. That's the simplest way to do it. It's not what an expert on security would advice, but it should work for the moment. Good Luck! Anibal. PS: remember to remove the password when the text is decrypted! If the text isn't long enough to hide the password within, just add a lot of meaningless characters to hide it (which should be removed along with the password after decrypted). |
|
#3
|
|||
|
|||
|
thanks a lot for your help... I understand the way !
if you are not bored I have one more question: I cant understand the way of workıng passwording programs, so what ? let me give you one example: when you use these kind of programs you, you have folder which is named "priority" in the Windows when you double clicked this folder, a window of passwording program appears and you enter your pass. How does it work ? I am studiying in c and I dont know a command for this, so I tried to find another way and I entered regedit but I cant find anything!! please help me! ( I cant sleep really I have interesting character that if I think somethink I cant sleep) |
|
#4
|
|||
|
|||
|
No problem...it happens to me too. Let me see if I understand correctly: you want to know how to put a password to a folder? For example, doble click on a folder (to open it) and be prompted for a password? That's not so simple..you'll see. All Windows using fat 32 (or 16) as file system don't use permision over folders as oposed to NTFS (which is prepared to do so). There's nothing in C, except what you know to do so. So if you want to set permits on a determin folder you can either:
- Program a new shell, so every command is recived by your shell (then, you can do anything) - Replace windows explorer for a program of your own, which prompts for password on certain folders (remember to disable all access to windows explorer) The first option is clearly more eficient and secure. However, it may requiere programming in other languages apart from C. But, if you simply want to sleep , try the second one first (easier to implement). Don't eliminate access to Windows explorer at once...try it first to see if you like it. Good Luck...by the way....what is your first language (I can speak a few, so maybe I know your own) Anibal. PS: I know you're going to ask, so I answer before you do so...in your new program, you'll have to create files, which hold the password and profile of access to the folders. To protect those files, you can use the way we talked about before! |
![]() |
| Viewing: Dev Articles Community Forums > Programming > C/C++ Help > Programmers please help |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|