Skip to Content.
Sympa Menu

baslinux - Re: [BL] FTP was: (pure-ftpd pppd passwd)

baslinux AT lists.ibiblio.org

Subject: Baslinux mailing list

List archive

Chronological Thread  
  • From: Lee Forrest <lforrestster AT gmail.com>
  • To: BasicLinux List <baslinux AT lists.ibiblio.org>
  • Subject: Re: [BL] FTP was: (pure-ftpd pppd passwd)
  • Date: Mon, 1 Jan 2007 10:39:05 +0000

On Tue, Jan 02, 2007 at 06:36:20AM +1300, 3aoo-cvfd AT dea.spamcon.org wrote:
> Lee Forrest wrote:
> >
> > What I'll do is reboot to debian, run tethereal (packet
> > logger) and then ncftp with the LIST command ("ls" or "dir" on
> > the ncftp commandline) and then use packet logs as a template and
> > try to write a netcat script that will do the job.
>
> (echo user anonymous
> echo pass xxx
> echo stat /pub/slackware
> echo quit) | nc ftp.slackware.com 21

Nice job, Steven. I missed the details of the STAT command the
first read through. Much better than LIST for this purpose.

>From RFC 959:

STATUS (STAT)

This command shall cause a status response to be sent over the
control connection in the form of a reply. The command may be
sent during a file transfer (along with the Telnet IP and Synch
signals--see the Section on FTP Commands) in which case the
server will respond with the status of the operation in progress,
or it may be sent between file transfers. In the latter case,
the command may have an argument field. IF THE ARGUMENT IS A
PATHNAME, THE COMMAND IS ANALOGOUS TO THE "LIST" COMMAND except
that data shall be transferred over the control connection. If a
partial pathname is given, the server may respond with a list of
file names or attributes associated with that specification. If
no argument is given, the server should return general status
information about the server FTP process. This should include
current values of all transfer parameters and the status of
connections.

/quote

My emphasis above. If you make the path "./", you get
this:

211-Status of ./:
drwxr-xr-x 3 volkerdi users 104 Oct 8 2003 .
drwxr-xr-x 3 volkerdi users 104 Oct 8 2003 ..
drwxr-xr-x 3 volkerdi users 80 May 6 2003 pub
-rw-r--r-- 1 volkerdi users 319 Apr 24 2002 welcome.msg

I'll try to make it a usable utility and consult you if
I run into problems.

"ftpls"? (already taken for a function of another utility
that does a bunch of FTP stuff, but so what?)

Lee
--
BasicLinux: Small is Beautiful
http://www.basiclinux.com.ru





Archive powered by MHonArc 2.6.24.

Top of Page