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

uudecode in batch file

102 views
Skip to first unread message

Lennert Ploeger

unread,
Oct 14, 1999, 3:00:00 AM10/14/99
to
Hi,

does anyone here know of a batch file that is capable of decoding an
uuencoded file?

TIA,
Lennert.

Nicole Hamilton

unread,
Oct 14, 1999, 3:00:00 AM10/14/99
to
Lennert Ploeger <len...@SPMSCKSnki.nl> wrote:
> does anyone here know of a batch file that is capable of decoding an
> uuencoded file?

I suppose someone may prove it's possible to do this with a
batch file, but that's going to be the hard way to do it. Here's
how uuencoding is done:

Data is encoded three bytes at a time into four printable
ASCII characters by splitting the input at 6 bit intervals
into 4 bytes, each containing data in only the lower 6 bits.
The hex value 0x20 is then added to each byte, producing
a value in the range 0x20 to 0x5f, which are all printable
ASCII characters. Thus, three bytes A, B and C of raw data
are converted to the four ASCII characters:

0x20 + (( A >> 2 ) & 0x3f)
0x20 + (((A << 4) | ((B >> 4) & 0xf)) & 0x3f)
0x20 + (((B << 2) | ((C >> 6) & 0x3)) & 0x3f)
0x20 + (( C ) & 0x3f)

The encoded data is arranged into lines of no more than
60 characters (representing at most 45 bytes of raw data)
preceded by a length character, equal to the number of
raw characters encoded plus 0x20.

What you'll want to look for is a compiled binary for your system.
I haven't looked recently (I have my own) but last I checked, there
were lots of free versions floating around on the various software
sites, e.g., Winsite.

Nicki

Lennert Ploeger

unread,
Oct 14, 1999, 3:00:00 AM10/14/99
to
> I suppose someone may prove it's possible to do this with a
> batch file, but that's going to be the hard way to do it. Here's
> how uuencoding is done:

I know how uuencoding works. The problem is that I want to transfer a
program to someone who is not (yet) capable of decoding uuencoded data and
the only kind of data that is accepted is uuencoded (or binhex) data. You
see the problem?

Thanks,
Lennert.

Nicole Hamilton

unread,
Oct 14, 1999, 3:00:00 AM10/14/99
to
Lennert Ploeger <len...@SPMSCKSnki.nl> wrote:
> I know how uuencoding works. The problem is that I want to transfer a
> program to someone who is not (yet) capable of decoding uuencoded data and
> the only kind of data that is accepted is uuencoded (or binhex) data. You
> see the problem?

Do they have access to Windows to run Winzip? Otherwise, I think you
need to search some of the various sw sites to see it you can an older DOS
version of uuencode still available somewhere.

Nicki

Lennert Ploeger

unread,
Oct 14, 1999, 3:00:00 AM10/14/99
to

Nicole Hamilton <hami...@hamiltonlabs.com> wrote in message
news:01bf1653$ccad9d90$0732180c@hamiltonlabs...

Nope. They live in a highly protected area, and receiving e-mail is reserved
for the happy few. They don't even have floppy drives! Sending uuencoded
stuff only works when I do not include the "begin 666" in the e-mail text!

Winzip was my first try as well, but then the limitations became clear.

Bye,
Lennert

Nicole Hamilton

unread,
Oct 14, 1999, 3:00:00 AM10/14/99
to
Lennert Ploeger <len...@SPMSCKSnki.nl> wrote:

> Nicole Hamilton <hami...@hamiltonlabs.com> wrote:
> > Do they have access to Windows to run Winzip?
>
> Nope.

Unless you're trying to say that the only way to get them a uuencode/decode
would be as a batch file they could type in as text (in which case we're
back to where we started, that that's a rather improbable goal), perhaps
you might try this link to a whole bunch of uuencode implementations for
DOS at the Simtel site:

http://www.simtel.net/simcgi-bin/dosfind.cgi?uuencode

Nicki

Klaus Meinhard

unread,
Oct 14, 1999, 3:00:00 AM10/14/99
to
Nicole, Lennert,

> Unless you're trying to say that the only way to get them a
uuencode/decode
> would be as a batch file they could type in as text (in which
case we're
> back to where we started, that that's a rather improbable
goal),

I agree. But it should be possible to generate a text file that
can be fed to debug to generate an exe file. If nobody pipes up
here, I´ll pose the problem to the old pros in FIDO net to see
what hey can come up with.

--
Viele Grüße, best regards,

Klaus Meinhard

Eric Pement

unread,
Oct 14, 1999, 3:00:00 AM10/14/99
to
On Thu, 14 Oct 1999 16:47:10 +0200, "Lennert Ploeger"
<len...@SPMSCKSnki.nl> wrote:

>> I suppose someone may prove it's possible to do this with a
>> batch file, but that's going to be the hard way to do it. Here's
>> how uuencoding is done:
>

>I know how uuencoding works. The problem is that I want to transfer a
>program to someone who is not (yet) capable of decoding uuencoded data and
>the only kind of data that is accepted is uuencoded (or binhex) data. You
>see the problem?

This has been solved many years ago. The solution assumes that the
recipient has access to MS-DOS and DEBUG. The recipient receives a
plaintext file of debug assembly commands. He/she then does:

debug < infile.txt

and an executable output file is created. Another solution is to use
QBASIC or (if the recipient has it) a C or Pascal compiler, and then to
mail them the source code. MANY such solutions are here:

http://oak.oakland.edu/simtel.net/msdos/00_start.html

Try the file UUDECODE.DBG (debug script) or UUDECODE.BAS (BASIC script).
After they've received that, they can upgrade to a more intelligent,
more powerful uudecode program, like uu v4.1 by Benjamin Walbeehm.
Hope this helps.

--
Eric Pement <epe...@jpusa.org>
senior editor, Cornerstone magazine Info on SED here:
http://www.cornerstonemag.com http://www.cornerstonemag.com/sed
939 W. Wilson, Chicago, IL 60640
tel: 773/561-2450, 1-(ext.)2084 fax: 773/989-2076

Lennert Ploeger

unread,
Oct 14, 1999, 3:00:00 AM10/14/99
to
> > Unless you're trying to say that the only way to get them a
> uuencode/decode
> > would be as a batch file they could type in as text (in which
> case we're
> > back to where we started, that that's a rather improbable
> goal),
>
> I agree. But it should be possible to generate a text file that
> can be fed to debug to generate an exe file. If nobody pipes up
> here, I´ll pose the problem to the old pros in FIDO net to see
> what hey can come up with.

If it's hard this means that it takes some more effort to do it! I
considered this a nice test to push the limits of msdos batch programming.

I already found a BASIC file that creates a uudecode.com application, but
this requires qbasic.exe. The idea of feeding a text file into debug sounds
cool as well.

Thanks,
Lennert.

John Savage

unread,
Oct 23, 1999, 3:00:00 AM10/23/99
to
"Lennert Ploeger" <len...@SPMSCKSnki.nl> writes:
>does anyone here know of a batch file that is capable of decoding an
>uuencoded file?

I think you might find a solution to this or further problems
among these programs. They convert 8 bit executables into 7 bit
executables, I believe. These might/might not work for NT. If not,
there probably would be NT versions in existence somewhere.

ftp ftp.simtel.net /pub/simtelnet/msdos/decode/
netrun31.zip B 7538 950630 Convert COM/EXE pgms to ASCII. No decode req'd
netsend1.zip B 9621 950617 Binary > executable 7-bit ASCII email program
--
John Savage (for email, replace "ks" with "k" and delete "n")

0 new messages