home *** CD-ROM | disk | FTP | other *** search
-
- Windows Sockets FTP Client Application - - Version 93.12.05
-
- Written by:
- John A. Junod Internet: <junodj@gordon-css583.army.mil>
- 267 Hillwood Street <zj8549@trotter.usma.edu>
- Martinez, GA 30907 Compuserve: 72321,366 AOL: jjunod
-
- THE INFORMATION AND CODE PROVIDED IS PROVIDED AS IS WITHOUT WARRANTY
- OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
- THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- PURPOSE. IN NO EVENT SHALL JOHN A. JUNOD BE LIABLE FOR ANY DAMAGES
- WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS
- OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF JOHN A. JUNOD HAS BEEN
- ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
-
- This program executable and all source code is released into the public
- domain. It would be nice (but is not required) to give me a little
- credit for any use of this code. The primary purpose of this application
- was to learn what it takes to write a Windows Sockets Application.
-
- The user interface for this FTP client is designed with the novice FTP user
- in mind. Usage should (??) be obvious with the possible exception of the
- the transfer mode; ascii, binary or l8. All controls are standard Windows
- controls.
-
- My development and testing was all completed at home on two 386 PC's using
- the Trumpet Windows Sockets DLL Alpha 15 with NCSA Telnet and WinQVT/Net 2.6
- and 3.94 as the remote host. Source code may be compiled with Borland C++
- in large mode.
-
- Some code concepts and names are based on code that is copyright by the
- Regents of the University of California or code published in UNIX Network
- Programming by W. Richard Stevens or code in WATTCP or other public sources.
- The rest is based on my knowledge of Windows programming and my
- interpretation of RFC 969 and the Windows Sockets API version 1.1.
-
- Known problems:
-
- 1) May not work correctly for some FTP servers due to the directory
- listing that comes back. In this case the directories and files
- dialog boxes will remain empty and the full directory listing will
- be visible by clicking the [LONGDIR] button. If you have a host that
- doesn't work, e-mail me a listing of that listing and the output
- of the remote FTP help command.
-
- 2) No restart of aborted transfers coded.
-
- 3) No abort of transfers coded other than pressing [CLOSE] or [EXIT].
-
- 4) No support for EBCDIC (does anyone use this??) transfers.
-
- 5) Use of menu items in the debug window may be confusing to the novice
- user.
-
- 6) Makes use of blocking socket calls.
-
- Still to do:
- 1. Make it use ASYNC calls. (anyone want to help???)
- 2. Support abort on transfers and restarts if necessary.
- 3. Eliminate debug window. (It could be gone now! Any comments?)
- 4. Windows 3.1 style directory list boxes.
-
- 93.10.01
- Fixed the gethostbyname problem.
- Fixed WinQVT/Net 3.x directory expansion problem.
- Fixed transfer abort problem with [CLOSE] or [EXIT].
-
- 93.10.05
- added host remembering
- added automatic password for anonymous userid (option mail address)
- corrected problem going to biochemistry.cwru.edu
- corrected linked directories problem (??)
-
- 93.10.10
- moved options button to main window
- fixed options, including prompting, bell, receive_unique
- added filename conversion for illegal dos filenames
- added timeout editing in host dialog
- changed listen timeout from 5 seconds to standard timeout
- changed messages going to status window
- set nolinger on socket close
- rewrote error module to eliminate possible copyright problem
- cleaned/colored main window
- added MS Visual C++ makefile
-
- 93.10.17
- added host linked userids, passwords, initial directory and hosttype
- added support for new host types (note that these are mostly untested)
- moved debug window routines to ws_debug.c
- changed bind address to 0 for vxdtcp (seems to work ok for Trumpet also,
- so I left it in, even though I never could get vxdtcp to work reliably.
- vxdtcp bind returned a WSAEADDRNOTAVAIL (or something like that))
- corrected bug in filename conversion
- changed anonymous userid processing (must select a check box, now)
-
- NOTE: While WS_FTP allows you to save a password for a host and does some
- minor encryption, it is not intended to be secure and is not recommended
- to be used for private accounts! It was added on request.
-
- 93.10.24
- more clean up of the source code
- attempt to fix problems with Unisys 5000 EXOS (junk) ftp daemon
- fix remote to local name conversion when multiple dots/spaces exist
- fix timeout problem. timeouts ONLY happen when connecting or
- waiting for control message responses. send and receive processing
- contains no timeout processing. timeouts limited to 65 seconds
- rewrote host information routines to use global memory so number of
- saved names may be increased. userid automatically saved for
- each host. timeouts saved by host.
- released HBRUSH resources properly
-
- 93.11.12
- uses port 21 if "services" file not found
- added two line scrolling status window
- updated debug and paint procedures to multi-window versions
- added period to end of names not having an extention for viewer
- modified about dialog box
- temporary files are now located in the %TEMP% directory instead
- of root of current drive.
-
- 93.12.04
- fixed VMS name parsing (hopefully) (93.11.15)
- used protocol 6 if "protocol" file not found
- incorporated AMS gateway (firewall) machine connection (thanks
- to Jeff Welty for code modification)
- lifted restriction on userid and password length
- fixed MVS/VM name parsing
- incorporated account processing (not tested)
- prompt for password if not entered
- added support for ftp.uwp.edu (use WinQVT/Net)
- eliminated blank lines in VM listing
- added support for NT ftp daemon (use IBMPC TCP/IP)
- added std support (autodetect) for another NT ftpd
- allow a timeout on on initial connection if FTP_PRELIM
- eliminated setsockopt(linger) for Lanera (also fixed problem with
- WinQVT/Net ftp server)
- fixed setdisk problem for MSC++ (uses _chdrive)
-
- 93.12.05 (beta of new functions)
- Reworked HOST dialog box and all HOST routines. Now allows
- unlimited save of configurations, and allows deletions.
- Reworked GATEWAY host dialogs. (Gateways are saved for each config)
- Now uses own WS_FTP.INI file (in Windows directory) You will
- "lose" all previous hosts. (If you need information from the
- earlier version, print out the WINDOWS\winsock.ini file.)
- For a good start, copy the WS_FTP.INI file to your Windows dir.
- Implemented DRAG/DROP processing. You drag one or more files from
- the Windows File Manager and drop anywhere on the main FTP window
- (or when iconized) and they will be transfered to the current
- directory on the remote host using the current transfer mode.
- This does support file name prompting for name changes. Default
- name will be the lowercase basename of the file. You can't drag
- directories and you can't drag from the remote host to another
- process.
-
- STILL NEED A WINDOWS HELP FILE FOR THIS THING.....
-
-
-
- NT port comments by L. Kahn
-
- You need to customize/and copy the ws_ftp.ini file to your winnt directory.
-
-
- The Windows NT port was much harder than expected, I have been slowly
- fixing problems and making enchancements to the system. The following is a
- list of some of the changes made that I can remember. If you want to
- actually look at all the changes get the original source from 129.29.64.246.
-
-
- added support for NTFS long file names. The system will not truncate on
- NTFS up to 220 char. names. with a max path name of 140 chars.
- On a fat file system it will truncate/rename to 8.3. (now only truncates
- on fat on win nt 3.1 since on 3.5 long names are now supported)
-
- fixed problems where lparam and wparam were incorrectly used for
- messages and all the dialgs were screwed up. Also changed all the api
- and dialog entries to use the new win32 format.
-
- fixed problem with the selection of a new setup name not filling in the
- remainder of the fields. Changed lparam which should have been wparam.
-
- added support to get other ftp server types by issueing the SYST
- command. The newer version of this program (source unavailable, see below does
- this). Also added support for new ftp server types such as NT.
-
- Added a new system option -d which enables the debugging window,
- otherwise it does not pop up as before.
-
- fixed problem with doing a strcpy and not checking for a null variable
- that caused an access violation under NT. Also fixed problem with newer
- version of qvt/winsock ftp server.
-
- Added support so that double clicking on a local file uploads it, double
- clicking on a remote file downloads it. By default you had to use the
- -> or <- arrows. There was a problem with the param. used for double
- clicking, howord(lparam) instead of hiword(wparam) was being used for
- the LBN_DBLCLK message.
-
- fixed dialog box routines since makeprocinstance and freeprocinstance is
- not necessary under win32.
-
- fixed problem with vax vms where when you switch to an empty directory there is no ..
- to switch back. This is still even broken in current 16 bit version.
-
- changed throughput messages on upload/download so that if it is over 1k it
- prints out stats in K/sec rather than bps.
-
-
-
- NOTES: There is a newer version of this program available for windows 3.1.
- It seems to have addressed many of the problems I have fixed and other
- enhancements. Unfortunately, when I sent a message to
- the original author describing the problems porting and all the fixes I had
- made, he didn't respond. The latest source available for this program
- is as of DEC. 1993 and this is the version I used as a starting point.
- It appears the author does not want to make a newer source available
- since I asked for this and he did not respond.
-
- Notes: on our new version of the solaris ftp server there is a bug when
- issueing the remotehelp command. It hangs. This program normally uses this
- command to try and figure out the server commands. IT will hang if you attempt
- to connect to a version of the solaris server that has this problem. To get
- around this I have added a type solaris-unix set it to this and everything
- should work fine. IF you don't believe me try the nt native ftp app and issue
- the remotehelp command and the same problem will occur. i.e it will hang.
- (note this only occurs on solaris 5.2 it is fixed on solaris 5.3 it happened
- because the server was not sending the terminating line)
-
- If other problems are found, please let me know at kahn@drcoffist.com
- or 71534,600 on compuserve. No promises but as I have time available I
- will try to look at specific problems with the NT version. If someone
- else makes fixes/changes please forward me a copy of the updated source.
-
- Thanks and good luck
-
- larry kahn
- 910-630-0412
- kahn@kahn.pdial.interpath.net or kahn@drcoffsite.com or kahn@csn.org
- 71534,600 on compuserve
-
-
- newer version changes (06 94)
-
- fixed stuff so fat partitions on nt daytona work with long file names.
- Also now support names such as name.name.name
- (on nt 3.1 fat it still will truncate names to 8.3)
-
- Fixed startup parameters so that if you start up ws_ftp with the command
-
- ws_ftp hostname:path/filename where there can be additional / in the path it
- will automatically sign on with user name anonymous and download the file.
- This is the behavior in the newer 16 bit version of ws_ftp and I'm mimicking
- it here so that you can interface with other tools such as warchie for instance.
- This also allows you to automatically use ws_ftp to download files as long
- as anonymous is enabled on the remote system. It would not be hard to also
- add support for username password on the command line instead of anonymous logins
- if enough people are insterested I will implement it.
-
- On installation also copy the file ws_ftp.ini to your winnt directory.
-
-
- added muti-threading in NT so that while remote operations are pending
- local operations can be performed. This also enables message processing
- to happen during long remote operations so that the window is not all
- screwed up and you can now shrink it during a download
-
-
- Changed display to view
-
- added an abort button but cannot get aborted remote operations to
- work reliably so for no no-oped out.
-
- Updated connect/close buttons so that when relevant they are enabled or
- disabled.
-
- Added text edit field boxes for directory selection like on the 16 bit
- newer version. However for now cannot figure out how to interpret if a
- return key is pressed so you will have to click on another button or
- in the listing windows to get it to fire off after changing the text (ie you will have to change
- the focus. Note that this is case sensitive for the remote end because
- many unix system are case sensitive and also sensitive to whether or not
- the . is on a file name.
-
- Also fixed a problem with vms files since fat (on daytona) now supports the entire
- file name is was downloading files like abc.de;1 ... Got rid of the
- final ; version number info (even though this may someday be desireable)
- it is a pain.
-
- new version 06/29/94
-
- finally got the abort code marginally working
-
- had to wait for correct response on control socket if this does not
- occur withing 15 seconds times out and prints a message that you may
- need to close/exit the app since the abort failed.
-
- You can now abort during downloads or uploads. A warning is printed out
- since many servers do not handle the abort correctly and will abort but
- subsequent operations may not work. IF this happens you can enable debuggin
- by running ws_ftp32 -d and send me the log. However, for many servers
- there is nothing I can do as is evident by this working on other servers.
-
- If you abort during a remote directory operation you will not get the directory
- and will have to execute the change dir command to get a directory listing.
-
- Also fixed stuff so when aborting it will close an open download file so it
- can be deleted.
-
- Also fixed a bug in the read routine that would hang ws_ftp because it
- thought a return value = 0 when the server didn't return anything meant
- continuation.
-
- new version 10/06/94
-
- Still works on either NT 3.1 or daytona NT 3.5
-
- Will not work on windows under win32s since it uses multi-threads.
-
- added a retries box to host dialog and to the ws_ftp.ini
- This field contries the number of retries for loggin on to a site.
- It can be used so that you can keep trying automatically all day et.,
- to log onto difficult sites such as cica that have a limited number of
- connections. Because this could take a while it will ring
- (asterisk sound) when connection
- is complete if you have the bell enabled in the options menu, or ding
- (exclamation sound) if the connection fails after a certain number of retries.
-
-
- Also added a mirror or download/upload directory and subdirectories function.
- Thanks for the idea Patty.
- This function will download or upload an
- entiry directory tree(s). Now you can select more than one directory in the
- local or remote directory window. If you try to do this and then select the
- chgdir button an appropriate error message will appear. However, if you select
- at least one legal directory (ie not [-a-] or ..) and also have no files
- selected (file selection overrides directory selection) and then hit either
- the upload or download arrows (--> or <--) all the files in
- the directory or directories selected and subdirectories will be downloaded or
- uploaded. Directories will be created along the way if necessary. At the
- end of this entire operation a status message will be printed telling you how
- many files were transfered and how many directories were created and the overall
- throughput. NOTE: You cannot do any local operations while this mirror operation
- is processing since both the remote and local dir windows are used, for this
- reason these windows and the local buttons and selection field
- are tuned off during the operation. The remote buttons don't have to
- be turned off since there is already a check in place to only allow 1
- remote operation at a time. Also you can get into an infinite loop
- if copying directories from you machine back to your own machine and the
- form and to directories coincide. Ie if copying from e:\net to e:\net\test you
- will put yourself in an endless loop. I warned you...
- Also If you can't figure out a way to easily turn off the last selected item
- in a list (necessary so that you can de-select all files to select only directories
- to start the mirror operation), you need to hit the cntrl key and then
- select the last item with the mouse.
- I have also turned off (hidden) the remote and local dir windows and file list
- windows, and disabled the local action buttons during a mirror operation
- since these windows are used and if the user selected something in one
- of them or did some operation this would screw up the mirror operation.
- They will be turned back on at the end of the operation or after aborting.
-
- I have also added new boxes on the host dialog popup for ftp server port.
- There were a few requests for this to enable connection to ftp servers
- that use non-standard ports. The default is still the normal port (21). This
- setting is also saved in the ws_ftp.ini file just like the new retries setting.
-
- Since Ive put quite a lot of effort into this new version donations will gladly
- be accepted. Also I'm thinking of an x-windows unix version of the program
- if interested drop me a line.
-
-
-
- larry kahn
- 6550 countryside drive
- fayetteville, nc. 28311
- 910-630-0412
- kahn@kahn.pdial.interpath.net or kahn@drcoffsite.com or kahn@csn.org
- 71534,600 on compuserve
-
-
- Addendum:
-
- I know the user has also done a port of wsftp to windows NT,, he
- however will not respond to any email I have sent him about the bugs I
- encountered and fixed/etc. I did send him my original port to nt...
-
- Anyway I believe my version is better than his as with my multi-threading
- I can do a local operation while a remote one is pending and also resize/move
- the window around. this cannot be done on his version ported to NT...
- and also the new retries and mirror directory function.
-
- See for yourself what you think... I have put my version up here since the
- authors port is here and I thought that you may want to compare..
-
- larry kahn
-