Support Forums
[VB.NET] Modify Own Attributes [SRC] - Printable Version

+- Support Forums (https://www.supportforums.net)
+-- Forum: Categories (https://www.supportforums.net/forumdisplay.php?fid=87)
+--- Forum: Coding Support Forums (https://www.supportforums.net/forumdisplay.php?fid=18)
+---- Forum: Visual Basic and the .NET Framework (https://www.supportforums.net/forumdisplay.php?fid=19)
+---- Thread: [VB.NET] Modify Own Attributes [SRC] (/showthread.php?tid=5509)



[VB.NET] Modify Own Attributes [SRC] - Drakeā„¢ - 04-05-2010

Here are a few codes that I found that you can use.

I re-write this so that it will work on your keylogger, rat, etc...

Imports:

Code:
System.IO.File

To make it read only:

Code:
Dim attribute as System.IO.FileAttributes = FileAttributes.ReadOnly
File.SetAttributes(Application.ExecutablePath, attribute)

To makeit not a hidden file:

Code:
dim attribute as System.IO.FileAttributes=IO.FileAttributes.Normal
System.IO.File.SetAttributes(Application.ExecutablePath,attribute)

To set the file's last accessed date:

Code:
System.IO.File.SetLastAccessTime(Application.ExecutablePath, Date.Now)

To mark the file as being a system file:

Code:
Dim attribute As System.IO.FileAttributes = IO.FileAttributes.System
System.IO.File.SetAttributes(Application.ExecutablePath, attribute)

To make the file compressed:

Code:
Dim attribute As System.IO.FileAttributes = IO.FileAttributes.Compressed
        System.IO.File.SetAttributes(Application.ExecutablePath, attribute)

To make the file a temporary file:

Code:
Dim attribute As System.IO.FileAttributes = IO.FileAttributes.Temporary
        System.IO.File.SetAttributes(Application.ExecutablePath, attribute)



RE: [VB.NET] Modify Own Attributes [SRC] - RaZoR03 - 04-18-2010

Awesome tut man...Thanks