-
Apr 14th, 2006, 12:07 PM
#1
Thread Starter
Lively Member
[2005] deleting
Is there a way my program deletes itself and all the files in the same folder?
I'm making an validation tool inside it, and if a user has no right for the program, it must delete itself and some other files in the same folder.
-
Apr 14th, 2006, 12:23 PM
#2
Frenzied Member
Re: [2005] deleting
I don't think you can make the program delete it self. What you could do is write a small app that would do the deleting. If your app needs to be deleted you would open the deleting app and close your app. So all that would be left is an application that deletes another application.
-
Apr 14th, 2006, 12:32 PM
#3
Thread Starter
Lively Member
Re: [2005] deleting
hmm yeah that's an interesting idea
now I've changed my program.exe to program.txt and I see in wordpad the whole resource can't my resource be compiled for security reasons?
-
Apr 14th, 2006, 12:36 PM
#4
Fanatic Member
Re: [2005] deleting
Do you mean that you can see the program's VB code when you open it up with Wordpad?
-
Apr 14th, 2006, 12:43 PM
#5
Thread Starter
Lively Member
Re: [2005] deleting
not all, but the most important:
my complete resource (an javascript.js)
and the mySQL librarys etc :s
not the whole code
-
Apr 14th, 2006, 12:46 PM
#6
Re: [2005] deleting
Why not add a registration feature where if they dont register it, it wont run?
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum.
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it!
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6
-
Apr 14th, 2006, 12:50 PM
#7
Thread Starter
Lively Member
-
Apr 14th, 2006, 12:53 PM
#8
Fanatic Member
Re: [2005] deleting
I have wondered about this actually. I have created a few programs that when opened in Notepad, show some of the program's code or resources. I would be interested to find out if this is possible too...
-
Apr 14th, 2006, 12:57 PM
#9
Re: [2005] deleting
You're seeing your resources because they're embedded into your application. They're not encrypted, they're just embedded. Also, you may be seeing some MSIL because that is what your program is compiled into.
If you don't want others getting your resources, you're going to ahve to encrypt them and then import them.
-
Apr 14th, 2006, 12:59 PM
#10
Thread Starter
Lively Member
Re: [2005] deleting
and how do i encrypt them and lets my program decrypt them?
and is there no solution for that my database password is visible? :|
-
Apr 14th, 2006, 01:02 PM
#11
Re: [2005] deleting
Originally Posted by Wytse Talsma
and how do i encrypt them and lets my program decrypt them?
and is there no solution for that my database password is visible? :|
This is one of the reasons I recommend doing research before developing a project in a language instead of trying to find ways around how it's supposed to work.
If you want to encrypt them, you can do it multiple ways. You can use an external program (but you may have to package that with your app to do the decryption) or you can use the Cryptography namespace to encrypt and decrypt resources. Just search the forum, there are tons of coding examples.
As for the database password being visible, I believe someone posted a solution in the CodeBank, otherwise you can encrypt that as well or if you're using VS 2005, you may be able to serialize a SecureString class containing the password.
-
Apr 14th, 2006, 01:03 PM
#12
Re: [2005] deleting
Another solution (that I would recommend over what you're trying to do) and remove the database functionality from your application. Most servers (I'd say 99.9%+) do not allow you to connect to their MySQL database unless you're on the localhost (meaning on the machine itself) and they do that for a reason; security. You may want to create several PHP scripts to add and remove data from the database that your application can call instead. Then there is no visible MySQL password.
-
Apr 14th, 2006, 01:06 PM
#13
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum.
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it!
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6
-
Apr 14th, 2006, 01:25 PM
#14
Thread Starter
Lively Member
Re: [2005] deleting
Tnx for the link robdog888
how do I use the SecureString class? I do can it make readonly... but that isn't working
-
Apr 14th, 2006, 01:37 PM
#15
Re: [2005] deleting
Are you following the code example in the link I posted?
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum.
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it!
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6
-
Apr 14th, 2006, 01:41 PM
#16
Re: [2005] deleting
Originally Posted by Wytse Talsma
Tnx for the link robdog888
how do I use the SecureString class? I do can it make readonly... but that isn't working
A SecureString class does not work with Strings directly as everything you do ANYTHING as a string, .Net creates a copy of it and there is no guarentee when it will be destroyed, thus making Strings insecure and inefficient.
SecureString can read in a Character Array to store your string securly. Getting data out of it is a different story.
See this thread
-
Apr 14th, 2006, 01:51 PM
#17
Thread Starter
Lively Member
-
Apr 14th, 2006, 01:56 PM
#18
Re: [2005] deleting
That's easy to crack. Gimme 5 minutes with an MSIL decompiler and I'll be able to see your entire method of putting the string together
Security through obscurity is not security.
-
Apr 14th, 2006, 01:59 PM
#19
Re: [2005] deleting
Than that means Dotfuscator is 100% useless.
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum.
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it!
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6
-
Apr 14th, 2006, 02:02 PM
#20
Re: [2005] deleting
Originally Posted by RobDog888
Than that means Dotfuscator is 100% useless.
Well, all it does it rename your methods and variables. It has options to encrypt (but you pay $1000 for that version) which is nice but it only encrypts strings (as far as I know). An Obfusticator should not be regarded as security for your application. It only makes it less obvious what your code is doing. It can still be pieced together much easier than someone decompiling C++ code.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|