|
| [WD20] - How to embed and executable in application and... |
| Iniciado por guest, 09,mar. 2018 08:09 - 11 respuestas |
| |
| | | |
|
| |
| Publicado el 09,marzo 2018 - 08:09 |
Hello,
I have received a request which is very odd 
The user need an application in which a ready to use executable (.exe) is pre-compiled in the application built in WD.
Now at run time the WD generate app should run the embedded executable by extracting to memory (without having to save it hard disk) and execute it under certain conditions.
Is something like this possible at all in WD?
If yes then please guide me as to how to do it or point me to any documentation that I can refer to?
A few ideas that I have : 1. Can we encode the executable to a Base64 file and then at run time decode it in a variable and execute it directly? 2. Can we store it in a database file and extract it to a variable from database and execute it in some manner?
TIA |
| |
| |
| | | |
|
| | |
| |
| Publicado el 09,marzo 2018 - 11:27 |
| |
| |
| | | |
|
| | |
| |
| Publicado el 09,marzo 2018 - 15:03 |
| So they want a Trojan Horse? |
| |
| |
| | | |
|
| | |
| |
| Publicado el 09,marzo 2018 - 15:15 |
Hello,
No they are not asking for any malware.
Actually I have developed a utility that will connect with a server and check for validity of license. This exe is built in Delphi while the main application is built in WD.
I had to build the original application in Delphi because I am using quite a lot of low lever functions to retrieving quite a lot of hardware and OS and network node related.
For example to read HDD firmware number without using WMI I have to use a .vxd file and call it dynamically at runtime. Doing such jugglery in WD would be sheer nightmare at best so I had to do this in Delphi.
So technically the exe that I need to embed is also programmed by me.
TIA |
| |
| |
| | | |
|
| | |
| |
| Publicado el 09,marzo 2018 - 16:43 |
So it seems to me.
The encoded exe within the WD-exe is hidden from a virus scanner. The exe is run "under certain conditions" - means it is triggered by some event and will look at some data / steal data / spy on ... and will disappear as soon as it is not needed anymore. |
| |
| |
| | | |
|
| | |
| |
| Publicado el 09,marzo 2018 - 17:07 |
Hi,
a Long time ago, I used a ram-disk, which was set up when starting the Computer. At that time hard disks were about 20 MB and my ram-disk around 3 MB. With each power-off the ram-disk was cleared,. The purpose of that was just Speed, which increased enormous compared to disk reads and writes. Of course the data was saved regularly on hard disk. As today we have flash-disks for that reason, I am not sure, whether ram-disks are still supported by the os. But if so, you could easily copy and run any Software from there without any use of hard disks.
g
Erik |
| |
| |
| | | |
|
| | |
| |
| Publicado el 09,marzo 2018 - 17:35 |
by the way, it really looks like these customers are asking you to write some type of malware... In your shoes, I would strongly worry about legal responsibility, as you have no way of knowing what that executable will really do when ran, even more than about feasibility.
Best regards |
| |
| |
| | | |
|
| | |
| |
| Publicado el 09,marzo 2018 - 17:35 |
| Since you also have the Delphi code I would create a DLL, export the required functions and call them directly from your Windev app. |
| |
| |
| | | |
|
| | |
| |
| Publicado el 09,marzo 2018 - 18:05 |
Hi,
oh my dear, you're using the hard disk of the computer like a 'dongle'? Why not use the UUID of the computer? The UUID is on the mainboard and therefore the least likely part of the computer to die. Btw, reading the UUID is a snap ( http://27130.foren.mysnip.de/read.php… and https://www.nextofwindows.com/how-to-find-out-bios-motherboard-and-cpu-info-from-command-line ) . There's no problem to use WD for it. SSDs and HDDs wear out with time and will die. If you want to give your customers some freedom by being able to move their application from one (defective) computer to another computer, a simple memory stick will do! Cheap USB memory sticks have unique serial numbers and you can check them using WD as well. If we're talking about big numbers, memory sticks can be customized. And there are regular dongles like those PC Soft is using. The unfriendly part ist that one has to buy big numbers of them beforehand. And if you run out of dongles there's some delivery time to be taken in account. |
| |
| |
| | | |
|
| | |
| |
| Publicado el 10,marzo 2018 - 07:11 |
Quote Arie
Since you also have the Delphi code I would create a DLL, export the required functions and call them directly from your Windev app. Thanks for the suggestion. That did strike me but I believe that calling the DLL to perform various task would actually hold up the main software till the task is not completed. Actually the DLL will send the details in background to a web server. On this there is a REST API that will receive the data and process it and generate a file which be downloaded on users PC and saved in the folder where the application is running from. |
| |
| |
| | | |
|
| | |
| |
| Publicado el 11,marzo 2018 - 13:37 |
Hi
as you are coding the other exe, just create a .net assembly out of it, call it from your windev application, and if you don't want to wait, do it in a secondary thread...
Best regards |
| |
| |
| | | |
|
| | |
| |
| Publicado el 12,marzo 2018 - 05:05 |
Hello Fabrice,
Quote Fabrice Harari
as you are coding the other exe, just create a .net assembly out of it, call it from your windev application, and if you don't want to wait, do it in a secondary thread... Avtually Delphi does not support compiling into .net assembles. |
| |
| |
| | | |
|
| | | | |
| | |
|