ftpput script: perl ?

Peter L. Peres plp-ysDPMY98cNQDDBjDh4tngg at public.gmane.org
Tue Apr 20 21:15:09 UTC 2004


On Tue, 20 Apr 2004, Zbigniew Koziol wrote:

> From: "Peter L. Peres" <plp-ysDPMY98cNQDDBjDh4tngg at public.gmane.org>
>
> >  And binary in the sense of the ftp rfc's isn't what you'd think
> > at all. It dates back to 36 bit pdp and vax abominations and such. In
> > fact, unless you are talking to a mainframe from the previous century that
> > cannot help itself you probably do not want to set binary at all I think.
>
> Does this tells us something about windows? When ftp client is run from
> there (that one which is by default installed by Microsoft) it will start in
> "ascii" mode, which means that the eighth bit will be cleared to 0 in every
> byte transfered.

You are right and I was talking bs. Sorry, my mistake. The rfc (959) says:

         3.1.1.1.  ASCII TYPE

            This is the default type and must be accepted by all FTP
            implementations.  It is intended primarily for the transfer
            of text files, except when both hosts would find the EBCDIC
            type more convenient.

            The sender converts the data from an internal character
            representation to the standard 8-bit NVT-ASCII
            representation (see the Telnet specification).  The receiver
            will convert the data from the standard form to his own
            internal form.

so I was wrong. The ascii connection IS 8 bit clean but it does NOT send
the original binary data, instead it escapes the telnet sequences (FF...).
The method using nc can still be used to transfer text files. It's just a
gimmick like those 'when in Siberia ...' instructions.

Peter
--
The Toronto Linux Users Group.      Meetings: http://tlug.ss.org
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://tlug.ss.org/subscribe.shtml





More information about the Legacy mailing list