C/C++ Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsProgrammingC/C++ Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old January 31st, 2005, 05:31 PM
litmus litmus is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jan 2005
Posts: 3 litmus User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 53 m 28 sec
Reputation Power: 0
Question Programmers please help

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!

Reply With Quote
  #2  
Old January 31st, 2005, 06:17 PM
Anibal Anibal is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jan 2005
Posts: 176 Anibal User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 Day 4 h 20 m 48 sec
Reputation Power: 4
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).

Reply With Quote
  #3  
Old January 31st, 2005, 06:53 PM
litmus litmus is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jan 2005
Posts: 3 litmus User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 53 m 28 sec
Reputation Power: 0
Unhappy

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)





Reply With Quote
  #4  
Old February 1st, 2005, 11:05 AM
Anibal Anibal is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jan 2005
Posts: 176 Anibal User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 Day 4 h 20 m 48 sec
Reputation Power: 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!

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingC/C++ Help > Programmers please help


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway
Stay green...Green IT