The MASM Forum Archive 2004 to 2012

General Forums => The Workshop => Topic started by: zcoder on February 17, 2006, 09:30:25 PM

Title: FTP testing.
Post by: zcoder on February 17, 2006, 09:30:25 PM
I am writting a FTP program, becouse I have never done one before
and becouse I want this to be an example source I will release on
the FTP protocall.

I got to the point where it is connecting to the FTP server and
displaying a list in a listview, and you can browse the folders on
the server. it does not download or upload yet.

I put drag and drop into the program but like I said what ever
you drop into it right now just pops up a message showing
the files that was droped as I have not finished the rest.

I stoped working on it, as I need to know if it works
(1). on other servers. (am I doing the handshaking right?)
(2) will it work on other OS's besides win98, Xp Pro?

When I get this done I will release this as an example of a full
assembly program written in asm, source code will be made availible.

Zcoder....

[attachment deleted by admin]
Title: Re: FTP testing.
Post by: Mark Jones on February 17, 2006, 11:26:10 PM
Nice work! Kinda scary though, just an executable... but it's uncompressed. Run UPX on it and it shrinks to 40kb! :toothy
Title: Re: FTP testing.
Post by: arafel on February 17, 2006, 11:42:25 PM
Seems nice  :U

Some issues though:
Incorrect addresses aren't handled properly. ftp.exe simply crashes.
Also it's a good idea to send "anonymous" for USER instead of just bare USER command if the username and password fields are not specified. Usually when an user leaves those fields clear he expects an anonymous login. Most servers will expect in this case "anonymous" for username, and any string terminated with "@" for the password ("somerandomstuff@").


P.S. I am a bit curious about the executable size. 600+ kb ?  :dazzled:
Title: Re: FTP testing.
Post by: zcoder on February 18, 2006, 12:28:56 AM
Yeah I was going to later use a form to fill
in details of the account info and stroe it
then they could check anonymous ect.

The size is due to alot of icons I put in for
diffrent types of files found on the server.
I could shrink it ALOT by using system ICON's
for the view.

And thanks for that tip about the Incorrect addresses not
being handled properly, I will fix that while I am thinking about it :dazzled:

and about the size I just might use system incon for the files.

thanks for the input and I really think, when this is done it will be a
good example of a complete APP in asm that everyone can study the
code and maybe inhance it as well.

Zcoder....
Title: Re: FTP testing.
Post by: zcoder on February 18, 2006, 05:55:22 AM
ok, i FIXED the problem with invalid hostname
and I changed the way I was displaying the
Icons in the FTP view box, I opped for a
system icons, which means if there is no
Icon that means php for example on the system
it will just show a icon for unKnown or I default
Icon.

But it made the file from 600+K down to 50K
got rid of all those Icons.

Zcoder....
Title: Re: FTP testing.
Post by: elmo on April 20, 2011, 07:08:52 AM
hi zcoder,
how did you list a file?
did you combine the following API:
-InternetFindNextFile
-FtpFindFirstFile

your app work great in my NET :U
I wonder how do you list it?
may I know how?

I will give you how to deletefile on NET, create/remove directory on NET, upload/download file to NET
Title: Re: FTP testing.
Post by: donkey on April 20, 2011, 08:14:10 AM
This thread is 5 years old and zCoder hasn't been seen in these parts for a couple of years, he's not likely to answer your question. I think Bogdan has already asked you not to re-open these ancient threads.
Title: Re: FTP testing.
Post by: elmo on April 20, 2011, 08:20:00 AM
ok, my guest was right
combine:
-InternetFindNextFile
-FtpFindFirstFile :dance:

hi, donkey, Bogdan has already asked me not to re-open topic from 2005.
this topic 2006 :lol
Title: Re: FTP testing.
Post by: zcoder on April 20, 2011, 10:45:46 PM
Has it been that long?

Elmo I do not remember this project to well, but I know I was not using
NET, just winsock API's and pure assembly.


...
Title: Re: FTP testing.
Post by: hutch-- on April 20, 2011, 11:52:42 PM
Hi Z, good to see you are still with us.
Title: Re: FTP testing.
Post by: elmo on April 21, 2011, 02:16:06 AM
hi I have a problem to get file icon in the WEB here:
http://www.masm32.com/board/index.php?topic=13452.30

please help me, I really struggle but not found other way to get file icon.
i usually get icon with API SHGETFILEINFO