Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

.exe file to text file and back

3 views
Skip to first unread message

radu

unread,
May 29, 2008, 7:00:28 AM5/29/08
to
i have to make 2 programs: a program that converts .exe or .dll
or .zip etc. into text file and a program that reads same text file
and writes same binary file back. example data.exe->data.txt-
>(transfer)->data.txt->data.exe
the final text file can look like 4d 5a 90 00 etc. or 1100010011110
etc. or À ¾Bÿ ¾@e@ etc. or ascii(021) ascii(019) ascii(077)
ascii(111), i dont care.
why i need it: else program transfers files from a location to another
like email atachments but only accepts text files.
i expect that on the other side, after conversion, the .exe file
or .zip file etc. will work.
i found it very difficult reading binary files with blockread and how
does it looks what it reads?
any help or explaining would be much apreciated. thank you.

Marco van de Voort

unread,
May 29, 2008, 7:16:58 AM5/29/08
to
On 2008-05-29, radu <lungu...@gmail.com> wrote:
> i have to make 2 programs: a program that converts .exe or .dll
> or .zip etc. into text file and a program that reads same text file
> and writes same binary file back. example data.exe->data.txt-
>>(transfer)->data.txt->data.exe
> the final text file can look like 4d 5a 90 00 etc. or 1100010011110
> etc. or タ セB セ@e@ etc. or ascii(021) ascii(019) ascii(077)
> ascii(111), i dont care.

These have existed for aeons, search for uuencode/uudecode or mime/unmime.

> i found it very difficult reading binary files with blockread and how
> does it looks what it reads?

It doesn't. It reads binary, IOW it just looks up the address in memory of
whatever variable you pass, and starts banging <count> bytes into it. And it
doesn't care if it fits.

0 new messages