HTTP Download & Exe in resource

Hello!

I want to do updater and I have 2 questions:

1. can I download .exe, .dll and other files via sockets using HTTP ? for example getting a.exe and a.dll from site.com using header like this or does it only work with .txt files?

GET / HTTP/1.0\nHost: www.site.com\r\n\r\n

2. is it possible to include updater.exe into my resource file and then run it inside of my app? so I won't have standalone updater.exe in folder

also how can I protect my apps? I mean, is it possible to actually read source code of compiled .exe ? (I'm storing mysql data in variables, such as username, pw, host to my database etc..)
someone?
1. look at this:

http://curl.haxx.se/

it should provide what you need

2. Theoretically: The binary persists in your resouce file and you create an .exe file and execute it. That might cause several problems like rights and firewall and such.

Why not make it a function of your program?

is it possible to actually read source code of compiled .exe ?
Not source code, but the strings (like username etc). You might want to encrypt them
1. well I don't like to use external libs, that's why I asked about winsock and http requests

2. well, how can I make .exe update itself? for example I have app p2p.exe, without any other dlls etc, I want to make it download new p2p.exe (updated) and replace the old one, so is there any way to do it instead of creating standalone updater.exe?

3. how do I have to encrypt it ? I mean, can I create functions, encrypt/decrypt that will get ascii number of char, for example 90, and then *3 so it will be 270 and then convert it back? will this work? or can someone read my functions too?
I don't like to use external libs
Good luck. tons of pitfalls are waiting for you (which are mended by libraries)

I want to make it download new p2p.exe (updated) and replace the old one
Yes, no problem to replace the current exe with the new one. start the new and end the old.

will this work?
Sure, why not. Usually you do that with xor operator ^

can someone read my functions too?
As a disassembly, but with a tremendous effort
Topic archived. No new replies allowed.