File Locker with password

Posts 1–11 of 11 · Page 1 of 1
File Locker with password
Hello can someone help me to finish my project ! i just made one program where you can select folder/program and lock it but i want to set password on this folder/program is there any chance for this ?
No this is highly unlikely not possible because vb.net can't be used to write a kernal mode driver but it is possible on C# but it is really hard to do i suggest you use winrar and just add everything to a rar and password protect it really easy and simple and less time taking
Quote Originally Posted by deadzeye View Post
No this is highly unlikely not possible because vb.net can't be used to write a kernal mode driver but it is possible on C# but it is really hard to do i suggest you use winrar and just add everything to a rar and password protect it really easy and simple and less time taking
>> Implies C# can do it
>> Says VB can't.
>> Implying C# can access rings lower than 3.

GG.

@OP there's a way I've heard of ( Well *did* would be the more accurate term ) in the past using some registry tricks ( and/or folder name tricks ) Try googling around for those topics and you'll find it.
Thank you for the answer !
If you can lock and unlock a folder than just add a password to your program and if the password is correct then unlock the folder.
Quote Originally Posted by AuT03x3C View Post
If you can lock and unlock a folder than just add a password to your program and if the password is correct then unlock the folder.
ye that should work but i think he wants it to have a folder icon and when double clicked a popup pops up and asks for a password
Rewrite kernel

- - - Updated - - -

Quote Originally Posted by AuT03x3C View Post
If you can lock and unlock a folder than just add a password to your program and if the password is correct then unlock the folder.
Yeah just add a string so everyone with the least reversing knowledge can easily find it.
no. Hashing and encrypting is the way to go
Quote Originally Posted by user590177 View Post
Yeah Just Add A String So Everyone With The Least Reversing Knowledge Can Easily Find It.
No. Hashing And Encrypting Is The Way To Go
I think every coder should know how to hash or encrypt a password.
So I thought it would be useless to write it.
Quote Originally Posted by AuT03x3C View Post
I think every coder should know how to hash or encrypt a password.
So I thought it would be useless to write it.
Not encrypting the password rather the files locked, password hash is then used as a key, and why not use a IV to get it even deeper.
. @Raydenman @ლ(ಠ_ಠლ) There's a function called Private message, if you wish to argue then do so privately not in somebody's else topic.
This code can be used to lock and unlock a selected folder.It mainly used for authentication purpose.
1.Make a window form which contains a textbox named as txtbxBrowseFolderName,3 buttons names as btnBrowse, btnLock, btnUnlock.

2.Insert FolderBrowserDialog1 control..

3.Insert the following Namespace

(a)Imports System.Security.AccessControl

(b)Imports System****

4.Then insert the following piece of code.



PrivateSub btnBrowse_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnBrowse.Click

With FolderBrowserDialog1

If .ShowDialog() = DialogResult.OK Then

txtbxBrowseFolderName.Text = .SelectedPath

EndIf

EndWith

EndSub



PrivateSub btnLock_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnLock.Click

Dim fs AsFileSystemSecurity = File.GetAccessControl(txtbxBrowseFolderName.Text)

fs.AddAccessRule(NewFileSystemAccessRule(Environme nt.UserName, FileSystemRights.FullControl, AccessControlType.Deny))

File.SetAccessControl(txtbxBrowseFolderName.Text, fs)

EndSub



PrivateSub btnUnlock_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnUnlock.Click

Dim fs AsFileSystemSecurity = File.GetAccessControl(txtbxBrowseFolderName.Text)

fs.RemoveAccessRule(NewFileSystemAccessRule(Enviro nment.UserName, FileSystemRights.FullControl, AccessControlType.Deny))

File.SetAccessControl(txtbxBrowseFolderName.Text, fs)

EndSub



5.Now you can choose a folder that you want to lock .then click the lock button.

6.Then you can test it by clicking the folder manumally it will show you a message that you are unable to access the folder.

7.For accessing the folder again you need to unlock the folder.
Posts 1–11 of 11 · Page 1 of 1

Post a Reply

Similar Threads

Tags for this Thread

None

Talk with us