Jan 29, 2014 02:31 PM
(This post was last modified: Jan 29, 2014 02:35 PM by Qmz_.)
I was going to make a tutorial for a builder/stub, which would include the GUI but the source itself is quite self explanatory.
Simple downloader/builder, with GUI.
Stub size would be 1kb(!) but because of the builder and resource stuff it's 4kb.
It's not FUD, it's using the most detected way to download file - which is URLDownloadToFileA ;)
It adds the URL as icon to the stub file. Stub then reads it's own 'icon' and downloads & executes the file.
Builder is C++ and the stub is C. If you're going to add C++ code to stub, remember to configure the linker..
TODO:
Encrypt the URL
Add option to change name for the saved file
Better error handling
...and of course, make it FUD. Don't use URLDownloadToFile.
+ Lots of other stuff, this is just an example
Screen of the builder:
![[Image: HE7HoZA.png]](https://i.imgur.com/HE7HoZA.png)
Download sources: http://www.sendspace.com/file/8fajrx
Nothing special, but good example for total beginners.
Ps. code could be better, I've just got into GUI's with resources.
Edit: No uppercase letters on the link! By default UpdateResource adds PADDINGXX to the resources, and the stub will remove all uppercase letters. Better solution would be remove all characters after *.exe but it was just a temp solution :P
Simple downloader/builder, with GUI.
Stub size would be 1kb(!) but because of the builder and resource stuff it's 4kb.
It's not FUD, it's using the most detected way to download file - which is URLDownloadToFileA ;)
It adds the URL as icon to the stub file. Stub then reads it's own 'icon' and downloads & executes the file.
Builder is C++ and the stub is C. If you're going to add C++ code to stub, remember to configure the linker..
TODO:
Encrypt the URL
Add option to change name for the saved file
Better error handling
...and of course, make it FUD. Don't use URLDownloadToFile.
+ Lots of other stuff, this is just an example
Screen of the builder:
![[Image: HE7HoZA.png]](https://i.imgur.com/HE7HoZA.png)
Download sources: http://www.sendspace.com/file/8fajrx
Nothing special, but good example for total beginners.
Ps. code could be better, I've just got into GUI's with resources.
Edit: No uppercase letters on the link! By default UpdateResource adds PADDINGXX to the resources, and the stub will remove all uppercase letters. Better solution would be remove all characters after *.exe but it was just a temp solution :P
RtlCreateIrlObjectA



![[Image: FtwuQgr.gif]](https://i.imgur.com/FtwuQgr.gif)
