Thread: Ftp Connection with C?

  1. #1
    Registered User
    Join Date
    Dec 2009
    Posts
    4

    Ftp Connection with C?

    Do you give me an example about connecting an ftp with c.

  2. #2
    Registered User slingerland3g's Avatar
    Join Date
    Jan 2008
    Location
    Seattle
    Posts
    603
    Have your researched any FTP c libraries for this, such as ftplib?

    ftplib

  3. #3
    Registered User
    Join Date
    Dec 2009
    Posts
    4
    I am new at c, i searched for examples but i just found c++ or c# examples.
    Thanks by the way, i'll check it now.

  4. #4
    Jack of many languages Dino's Avatar
    Join Date
    Nov 2007
    Location
    Chappell Hill, Texas
    Posts
    2,332
    You could also use libcurl.
    Mainframe assembler programmer by trade. C coder when I can.

  5. #5
    Registered User
    Join Date
    Apr 2007
    Posts
    137
    On Windows, you don't need anything.
    Just use FTP apis.

  6. #6
    Registered User
    Join Date
    Dec 2009
    Posts
    4
    @Alex31; but i want to give this program to people, they shouldn't see or find out the password.

    I thought i can encrypt the c code but i need to decrypt it for connecting ftp, i am stucked here.

  7. #7
    Registered User slingerland3g's Avatar
    Join Date
    Jan 2008
    Location
    Seattle
    Posts
    603
    If you are using anonymous you can, i guess, hard code that, but for more secure accounts, just have the use input those at the command line as arguments. You should never hard code anything thought to be secure as far as account logins go, unless for debugging purposes.

    If my typing is off, sorry i'm on a train.....

  8. #8
    Registered User
    Join Date
    Apr 2007
    Posts
    137
    Quote Originally Posted by ulaas View Post
    @Alex31; but i want to give this program to people, they shouldn't see or find out the password.
    What's the problem ?!
    Just use FTP apis and encode/decode password !

  9. #9
    Registered User
    Join Date
    Dec 2009
    Posts
    4
    I don't know how to use ftp apis, if you can give me an example, i'll be happy.

    For being clear, i'll say again; i want to save password in program source.

  10. #10
    Registered User slingerland3g's Avatar
    Join Date
    Jan 2008
    Location
    Seattle
    Posts
    603
    If you use any FTP library you are making use of their API. If you are not sure how to work with APIs ( application program interface) with FTP then you are biting off more than you can chew here writing your own FTP client. Also if you insist in hard-coding secure passwords in your program, you must be careful how you do this as anyone can run the command 'strings' against your source code to pull out any strings within your code, this includes function names and text surrounded by "".

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. multiple forks in one client connection (ftpclient)
    By Dynamo in forum Networking/Device Communication
    Replies: 5
    Last Post: 01-16-2011, 12:41 PM
  2. ftp connection error
    By illusionist in forum Networking/Device Communication
    Replies: 2
    Last Post: 10-29-2009, 09:02 AM
  3. ftp data connection problem!!
    By gooddevil in forum Networking/Device Communication
    Replies: 1
    Last Post: 12-11-2004, 07:32 AM
  4. Headers that use each other
    By nickname_changed in forum C++ Programming
    Replies: 7
    Last Post: 10-03-2003, 04:25 AM
  5. c library for ftp connection in unix
    By dennis_777 in forum C Programming
    Replies: 0
    Last Post: 12-12-2001, 09:33 PM

Tags for this Thread