ChrisCana 07-18-2003, 12:30 PM Ok, this is sort of an oddball question.
My VB app runs the shell command out to a dos exe, using VBhide to mask the fact that it is running.
I would like to encrypt that exe, or hide it somewhere, so that the end user will not be able to run it manually. Can it be put in a dll, or how can I go about doing something like this?
Thanks
Iceplug 07-18-2003, 12:33 PM I thought that all EXEs are 'encrypted' already.
And why do you want to hide it somewhere so that I can't use it... that bothers me.
And what app is hidden?
ChrisCana 07-18-2003, 12:44 PM It is a command line program that play music tones. I am writing a vbform that shells to it and plays files, but I want the user to use the vbprogram and NOT the command line exe (is is essental to the program.), so I would like it somehow encrypted, or put into a dll, or something to that effect.
I thought that all EXEs are 'encrypted' already.
And why do you want to hide it somewhere so that I can't use it... that bothers me.
And what app is hidden?
Iceplug 07-18-2003, 12:54 PM No, the command prompt can access ALL executables... you cannot hide it from the command prompt. At least, I don't *think* so...
ChrisCana 07-18-2003, 12:55 PM Another option is that I have the C code to the dos exe i am shelling too. but I know nothing about C or where i would even start with doing something like that.
I thought that all EXEs are 'encrypted' already.
And why do you want to hide it somewhere so that I can't use it... that bothers me.
And what app is hidden?
Even if it were possible, it would be very easy to use for malicious purposes, so is against our posting guidelines. However, since you have the C source, why not just convert it to VB and incorporate all in one app, instead of shelling one from the other?
ChrisCana 07-18-2003, 01:10 PM How do you convert from C to VB code? Is it an easy thing?
Even if it were possible, it would be very easy to use for malicious purposes, so is against our posting guidelines. However, since you have the C source, why not just convert it to VB and incorporate all in one app, instead of shelling one from the other?
Optikal 07-18-2003, 01:25 PM just read the C code, understand what it is doing, then recreate that functionality in VB.
Or just compile the C code into a DLL and call that from your VB app.
ChrisCana 07-18-2003, 01:33 PM Ok.. think is i dont exactly know c and vb enough to do the translation myself. If i just take the c code as-is, no changes, can it be made into a dll and accessed from vb?
just read the C code, understand what it is doing, then recreate that functionality in VB.
Or just compile the C code into a DLL and call that from your VB app.
Optikal 07-18-2003, 01:54 PM you would have to make changes to the code to make it into a DLL. If you don't know C and VB very well, not much advice we can give other than learn them better.
blindwig 07-18-2003, 02:09 PM Here's a quick and dirty way to do it:
Rename your EXE to something like MyFile.000
In your VB Program, rename it to .EXE, call it, then rename it back to .000
This isn't a very secure way, beacuse any inquisitive user would see the EXE headers in the file, but it would work in a simple way.
VBJoe 07-18-2003, 03:24 PM Call the "hidden" executable using a command line parameter that is hidden in your own (VB compiled) executable. For example:
Shell "hiddenfile.exe param123", vbHide
In the hidden file's source, check the parameter value and if it isn't correct, terminate itself.
|